OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 6240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6251 Context* JSFunction::context() { | 6251 Context* JSFunction::context() { |
6252 return Context::cast(READ_FIELD(this, kContextOffset)); | 6252 return Context::cast(READ_FIELD(this, kContextOffset)); |
6253 } | 6253 } |
6254 | 6254 |
6255 | 6255 |
6256 JSObject* JSFunction::global_proxy() { | 6256 JSObject* JSFunction::global_proxy() { |
6257 return context()->global_proxy(); | 6257 return context()->global_proxy(); |
6258 } | 6258 } |
6259 | 6259 |
6260 | 6260 |
| 6261 Context* JSFunction::native_context() { return context()->native_context(); } |
| 6262 |
| 6263 |
6261 void JSFunction::set_context(Object* value) { | 6264 void JSFunction::set_context(Object* value) { |
6262 DCHECK(value->IsUndefined() || value->IsContext()); | 6265 DCHECK(value->IsUndefined() || value->IsContext()); |
6263 WRITE_FIELD(this, kContextOffset, value); | 6266 WRITE_FIELD(this, kContextOffset, value); |
6264 WRITE_BARRIER(GetHeap(), this, kContextOffset, value); | 6267 WRITE_BARRIER(GetHeap(), this, kContextOffset, value); |
6265 } | 6268 } |
6266 | 6269 |
6267 ACCESSORS(JSFunction, prototype_or_initial_map, Object, | 6270 ACCESSORS(JSFunction, prototype_or_initial_map, Object, |
6268 kPrototypeOrInitialMapOffset) | 6271 kPrototypeOrInitialMapOffset) |
6269 | 6272 |
6270 | 6273 |
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7888 #undef WRITE_INT64_FIELD | 7891 #undef WRITE_INT64_FIELD |
7889 #undef READ_BYTE_FIELD | 7892 #undef READ_BYTE_FIELD |
7890 #undef WRITE_BYTE_FIELD | 7893 #undef WRITE_BYTE_FIELD |
7891 #undef NOBARRIER_READ_BYTE_FIELD | 7894 #undef NOBARRIER_READ_BYTE_FIELD |
7892 #undef NOBARRIER_WRITE_BYTE_FIELD | 7895 #undef NOBARRIER_WRITE_BYTE_FIELD |
7893 | 7896 |
7894 } // namespace internal | 7897 } // namespace internal |
7895 } // namespace v8 | 7898 } // namespace v8 |
7896 | 7899 |
7897 #endif // V8_OBJECTS_INL_H_ | 7900 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |