| 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 #ifndef V8_CONTEXTS_H_ | 5 #ifndef V8_CONTEXTS_H_ |
| 6 #define V8_CONTEXTS_H_ | 6 #define V8_CONTEXTS_H_ |
| 7 | 7 |
| 8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Heap-allocated activation contexts. | 61 // Heap-allocated activation contexts. |
| 62 // | 62 // |
| 63 // Contexts are implemented as FixedArray objects; the Context | 63 // Contexts are implemented as FixedArray objects; the Context |
| 64 // class is a convenience interface casted on a FixedArray object. | 64 // class is a convenience interface casted on a FixedArray object. |
| 65 // | 65 // |
| 66 // Note: Context must have no virtual functions and Context objects | 66 // Note: Context must have no virtual functions and Context objects |
| 67 // must always be allocated via Heap::AllocateContext() or | 67 // must always be allocated via Heap::AllocateContext() or |
| 68 // Factory::NewContext. | 68 // Factory::NewContext. |
| 69 | 69 |
| 70 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ | 70 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ |
| 71 V(IS_ARRAYLIKE, JSFunction, is_arraylike) \ | 71 V(IS_ARRAYLIKE, JSFunction, is_arraylike) \ |
| 72 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ | 72 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ |
| 73 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ | 73 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ |
| 74 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ | 74 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ |
| 75 V(OBJECT_FREEZE, JSFunction, object_freeze) \ | 75 V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \ |
| 76 V(OBJECT_GET_PROTOTYPE_OF, JSFunction, object_get_prototype_of) \ | 76 V(OBJECT_DEFINE_PROPERTY, JSFunction, object_define_property) \ |
| 77 V(OBJECT_IS_EXTENSIBLE, JSFunction, object_is_extensible) \ | 77 V(OBJECT_FREEZE, JSFunction, object_freeze) \ |
| 78 V(OBJECT_IS_FROZEN, JSFunction, object_is_frozen) \ | 78 V(OBJECT_GET_PROTOTYPE_OF, JSFunction, object_get_prototype_of) \ |
| 79 V(OBJECT_IS_SEALED, JSFunction, object_is_sealed) \ | 79 V(OBJECT_IS_EXTENSIBLE, JSFunction, object_is_extensible) \ |
| 80 V(OBJECT_KEYS, JSFunction, object_keys) \ | 80 V(OBJECT_IS_FROZEN, JSFunction, object_is_frozen) \ |
| 81 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ | 81 V(OBJECT_IS_SEALED, JSFunction, object_is_sealed) \ |
| 82 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ | 82 V(OBJECT_KEYS, JSFunction, object_keys) \ |
| 83 V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \ | 83 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ |
| 84 V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \ | 84 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ |
| 85 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ | 85 V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \ |
| 86 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ | 86 V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \ |
| 87 V(ORDINARY_HAS_INSTANCE_INDEX, JSFunction, ordinary_has_instance) \ | 87 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ |
| 88 V(MATH_FLOOR, JSFunction, math_floor) \ | 88 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ |
| 89 V(ORDINARY_HAS_INSTANCE_INDEX, JSFunction, ordinary_has_instance) \ |
| 90 V(MATH_FLOOR, JSFunction, math_floor) \ |
| 89 V(MATH_SQRT, JSFunction, math_sqrt) | 91 V(MATH_SQRT, JSFunction, math_sqrt) |
| 90 | 92 |
| 91 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ | 93 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ |
| 92 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ | 94 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ |
| 93 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ | 95 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ |
| 94 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ | 96 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ |
| 95 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ | 97 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ |
| 96 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ | 98 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ |
| 97 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ | 99 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ |
| 98 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ | 100 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 #endif | 559 #endif |
| 558 | 560 |
| 559 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 561 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 560 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 562 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 561 }; | 563 }; |
| 562 | 564 |
| 563 } // namespace internal | 565 } // namespace internal |
| 564 } // namespace v8 | 566 } // namespace v8 |
| 565 | 567 |
| 566 #endif // V8_CONTEXTS_H_ | 568 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |