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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ | 76 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ |
77 V(CONCAT_ITERABLE_TO_ARRAY_INDEX, JSFunction, concat_iterable_to_array) \ | 77 V(CONCAT_ITERABLE_TO_ARRAY_INDEX, JSFunction, concat_iterable_to_array) \ |
78 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ | 78 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ |
79 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ | 79 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ |
80 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ | 80 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ |
81 V(NON_NUMBER_TO_NUMBER_INDEX, JSFunction, non_number_to_number) \ | 81 V(NON_NUMBER_TO_NUMBER_INDEX, JSFunction, non_number_to_number) \ |
82 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ | 82 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ |
83 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ | 83 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ |
84 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ | 84 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ |
85 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ | 85 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ |
86 V(TO_LENGTH_FUN_INDEX, JSFunction, to_length_fun) \ | |
87 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) | 86 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) |
88 | 87 |
89 | 88 |
90 #define NATIVE_CONTEXT_JS_BUILTINS(V) \ | 89 #define NATIVE_CONTEXT_JS_BUILTINS(V) \ |
91 V(APPLY_PREPARE_BUILTIN_INDEX, JSFunction, apply_prepare_builtin) \ | 90 V(APPLY_PREPARE_BUILTIN_INDEX, JSFunction, apply_prepare_builtin) \ |
92 V(CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX, JSFunction, \ | 91 V(CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX, JSFunction, \ |
93 concat_iterable_to_array_builtin) \ | 92 concat_iterable_to_array_builtin) \ |
94 V(REFLECT_APPLY_PREPARE_BUILTIN_INDEX, JSFunction, \ | 93 V(REFLECT_APPLY_PREPARE_BUILTIN_INDEX, JSFunction, \ |
95 reflect_apply_prepare_builtin) \ | 94 reflect_apply_prepare_builtin) \ |
96 V(REFLECT_CONSTRUCT_PREPARE_BUILTIN_INDEX, JSFunction, \ | 95 V(REFLECT_CONSTRUCT_PREPARE_BUILTIN_INDEX, JSFunction, \ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 V(REFERENCE_ERROR_FUNCTION_INDEX, JSFunction, reference_error_function) \ | 151 V(REFERENCE_ERROR_FUNCTION_INDEX, JSFunction, reference_error_function) \ |
153 V(SET_ADD_METHOD_INDEX, JSFunction, set_add) \ | 152 V(SET_ADD_METHOD_INDEX, JSFunction, set_add) \ |
154 V(SET_DELETE_METHOD_INDEX, JSFunction, set_delete) \ | 153 V(SET_DELETE_METHOD_INDEX, JSFunction, set_delete) \ |
155 V(SET_FROM_ARRAY_INDEX, JSFunction, set_from_array) \ | 154 V(SET_FROM_ARRAY_INDEX, JSFunction, set_from_array) \ |
156 V(SET_HAS_METHOD_INDEX, JSFunction, set_has) \ | 155 V(SET_HAS_METHOD_INDEX, JSFunction, set_has) \ |
157 V(STACK_OVERFLOW_BOILERPLATE_INDEX, JSObject, stack_overflow_boilerplate) \ | 156 V(STACK_OVERFLOW_BOILERPLATE_INDEX, JSObject, stack_overflow_boilerplate) \ |
158 V(SYNTAX_ERROR_FUNCTION_INDEX, JSFunction, syntax_error_function) \ | 157 V(SYNTAX_ERROR_FUNCTION_INDEX, JSFunction, syntax_error_function) \ |
159 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ | 158 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ |
160 to_complete_property_descriptor) \ | 159 to_complete_property_descriptor) \ |
161 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \ | 160 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \ |
162 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \ | |
163 V(TYPE_ERROR_FUNCTION_INDEX, JSFunction, type_error_function) \ | 161 V(TYPE_ERROR_FUNCTION_INDEX, JSFunction, type_error_function) \ |
164 V(URI_ERROR_FUNCTION_INDEX, JSFunction, uri_error_function) \ | 162 V(URI_ERROR_FUNCTION_INDEX, JSFunction, uri_error_function) \ |
165 NATIVE_CONTEXT_JS_BUILTINS(V) | 163 NATIVE_CONTEXT_JS_BUILTINS(V) |
166 | 164 |
167 #define NATIVE_CONTEXT_FIELDS(V) \ | 165 #define NATIVE_CONTEXT_FIELDS(V) \ |
168 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ | 166 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ |
169 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ | 167 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ |
170 /* Below is alpha-sorted */ \ | 168 /* Below is alpha-sorted */ \ |
171 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ | 169 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ |
172 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ | 170 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 548 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
551 #endif | 549 #endif |
552 | 550 |
553 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 551 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
554 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 552 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
555 }; | 553 }; |
556 | 554 |
557 } } // namespace v8::internal | 555 } } // namespace v8::internal |
558 | 556 |
559 #endif // V8_CONTEXTS_H_ | 557 #endif // V8_CONTEXTS_H_ |
OLD | NEW |