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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 V(OBJECT_KEYS, JSFunction, object_keys) \ | 52 V(OBJECT_KEYS, JSFunction, object_keys) \ |
53 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ | 53 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ |
54 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ | 54 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ |
55 V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \ | 55 V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \ |
56 V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \ | 56 V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \ |
57 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ | 57 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ |
58 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ | 58 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ |
59 V(MATH_FLOOR_INDEX, JSFunction, math_floor) \ | 59 V(MATH_FLOOR_INDEX, JSFunction, math_floor) \ |
60 V(MATH_POW_INDEX, JSFunction, math_pow) | 60 V(MATH_POW_INDEX, JSFunction, math_pow) |
61 | 61 |
62 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ | 62 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ |
63 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ | 63 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ |
64 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ | 64 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ |
65 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ | 65 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ |
66 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ | 66 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ |
67 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ | 67 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ |
68 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ | 68 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ |
69 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ | 69 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ |
70 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ | 70 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ |
71 V(ASYNC_FUNCTION_AWAIT_INDEX, JSFunction, async_function_await) \ | 71 V(ASYNC_FUNCTION_AWAIT_INDEX, JSFunction, async_function_await) \ |
72 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ | 72 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ |
73 V(ERROR_FUNCTION_INDEX, JSFunction, error_function) \ | 73 V(ERROR_FUNCTION_INDEX, JSFunction, error_function) \ |
74 V(ERROR_TO_STRING, JSFunction, error_to_string) \ | 74 V(ERROR_TO_STRING, JSFunction, error_to_string) \ |
75 V(EVAL_ERROR_FUNCTION_INDEX, JSFunction, eval_error_function) \ | 75 V(EVAL_ERROR_FUNCTION_INDEX, JSFunction, eval_error_function) \ |
76 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ | 76 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ |
77 V(MAP_DELETE_METHOD_INDEX, JSFunction, map_delete) \ | 77 V(MAP_DELETE_METHOD_INDEX, JSFunction, map_delete) \ |
78 V(MAP_GET_METHOD_INDEX, JSFunction, map_get) \ | 78 V(MAP_GET_METHOD_INDEX, JSFunction, map_get) \ |
79 V(MAP_HAS_METHOD_INDEX, JSFunction, map_has) \ | 79 V(MAP_HAS_METHOD_INDEX, JSFunction, map_has) \ |
80 V(MAP_SET_METHOD_INDEX, JSFunction, map_set) \ | 80 V(MAP_SET_METHOD_INDEX, JSFunction, map_set) \ |
81 V(OBJECT_VALUE_OF, JSFunction, object_value_of) \ | 81 V(OBJECT_VALUE_OF, JSFunction, object_value_of) \ |
82 V(OBJECT_TO_STRING, JSFunction, object_to_string) \ | 82 V(OBJECT_TO_STRING, JSFunction, object_to_string) \ |
83 V(PROMISE_CATCH_INDEX, JSFunction, promise_catch) \ | 83 V(PROMISE_CATCH_INDEX, JSFunction, promise_catch) \ |
84 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \ | 84 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \ |
85 V(PROMISE_FUNCTION_INDEX, JSFunction, promise_function) \ | 85 V(PROMISE_FUNCTION_INDEX, JSFunction, promise_function) \ |
86 V(PROMISE_HAS_USER_DEFINED_REJECT_HANDLER_INDEX, JSFunction, \ | 86 V(PROMISE_HAS_USER_DEFINED_REJECT_HANDLER_INDEX, JSFunction, \ |
87 promise_has_user_defined_reject_handler) \ | 87 promise_has_user_defined_reject_handler) \ |
88 V(PROMISE_REJECT_INDEX, JSFunction, promise_reject) \ | 88 V(PROMISE_REJECT_INDEX, JSFunction, promise_reject) \ |
89 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \ | 89 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \ |
90 V(PROMISE_CREATE_RESOLVED_INDEX, JSFunction, promise_create_resolved) \ | 90 V(PROMISE_THEN_INDEX, JSFunction, promise_then) \ |
91 V(PROMISE_CREATE_REJECTED_INDEX, JSFunction, promise_create_rejected) \ | 91 V(RANGE_ERROR_FUNCTION_INDEX, JSFunction, range_error_function) \ |
92 V(PROMISE_THEN_INDEX, JSFunction, promise_then) \ | 92 V(REJECT_PROMISE_NO_DEBUG_EVENT_INDEX, JSFunction, \ |
93 V(RANGE_ERROR_FUNCTION_INDEX, JSFunction, range_error_function) \ | 93 reject_promise_no_debug_event) \ |
94 V(REFERENCE_ERROR_FUNCTION_INDEX, JSFunction, reference_error_function) \ | 94 V(REFERENCE_ERROR_FUNCTION_INDEX, JSFunction, reference_error_function) \ |
95 V(SET_ADD_METHOD_INDEX, JSFunction, set_add) \ | 95 V(SET_ADD_METHOD_INDEX, JSFunction, set_add) \ |
96 V(SET_DELETE_METHOD_INDEX, JSFunction, set_delete) \ | 96 V(SET_DELETE_METHOD_INDEX, JSFunction, set_delete) \ |
97 V(SET_HAS_METHOD_INDEX, JSFunction, set_has) \ | 97 V(SET_HAS_METHOD_INDEX, JSFunction, set_has) \ |
98 V(SYNTAX_ERROR_FUNCTION_INDEX, JSFunction, syntax_error_function) \ | 98 V(SYNTAX_ERROR_FUNCTION_INDEX, JSFunction, syntax_error_function) \ |
99 V(TYPE_ERROR_FUNCTION_INDEX, JSFunction, type_error_function) \ | 99 V(TYPE_ERROR_FUNCTION_INDEX, JSFunction, type_error_function) \ |
100 V(URI_ERROR_FUNCTION_INDEX, JSFunction, uri_error_function) | 100 V(URI_ERROR_FUNCTION_INDEX, JSFunction, uri_error_function) |
101 | 101 |
102 #define NATIVE_CONTEXT_FIELDS(V) \ | 102 #define NATIVE_CONTEXT_FIELDS(V) \ |
103 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ | 103 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ |
104 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ | 104 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ |
105 /* Below is alpha-sorted */ \ | 105 /* Below is alpha-sorted */ \ |
106 V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \ | 106 V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \ |
107 accessor_property_descriptor_map) \ | 107 accessor_property_descriptor_map) \ |
108 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ | 108 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ |
109 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ | 109 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 #endif | 530 #endif |
531 | 531 |
532 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 532 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
533 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 533 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
534 }; | 534 }; |
535 | 535 |
536 } // namespace internal | 536 } // namespace internal |
537 } // namespace v8 | 537 } // namespace v8 |
538 | 538 |
539 #endif // V8_CONTEXTS_H_ | 539 #endif // V8_CONTEXTS_H_ |
OLD | NEW |