Chromium Code Reviews| 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 16 matching lines...) Expand all Loading... | |
| 27 | 27 |
| 28 // Heap-allocated activation contexts. | 28 // Heap-allocated activation contexts. |
| 29 // | 29 // |
| 30 // Contexts are implemented as FixedArray objects; the Context | 30 // Contexts are implemented as FixedArray objects; the Context |
| 31 // class is a convenience interface casted on a FixedArray object. | 31 // class is a convenience interface casted on a FixedArray object. |
| 32 // | 32 // |
| 33 // Note: Context must have no virtual functions and Context objects | 33 // Note: Context must have no virtual functions and Context objects |
| 34 // must always be allocated via Heap::AllocateContext() or | 34 // must always be allocated via Heap::AllocateContext() or |
| 35 // Factory::NewContext. | 35 // Factory::NewContext. |
| 36 | 36 |
| 37 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ | 37 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ |
| 38 V(IS_ARRAYLIKE, JSFunction, is_arraylike) \ | 38 V(IS_ARRAYLIKE, JSFunction, is_arraylike) \ |
| 39 V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \ | 39 V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \ |
| 40 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ | 40 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ |
| 41 V(MAKE_ERROR_INDEX, JSFunction, make_error) \ | 41 V(MAKE_ERROR_INDEX, JSFunction, make_error) \ |
| 42 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ | 42 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ |
| 43 V(MAKE_SYNTAX_ERROR_INDEX, JSFunction, make_syntax_error) \ | 43 V(MAKE_SYNTAX_ERROR_INDEX, JSFunction, make_syntax_error) \ |
| 44 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ | 44 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ |
| 45 V(MAKE_URI_ERROR_INDEX, JSFunction, make_uri_error) \ | 45 V(MAKE_URI_ERROR_INDEX, JSFunction, make_uri_error) \ |
| 46 V(OBJECT_CREATE, JSFunction, object_create) \ | 46 V(OBJECT_CREATE, JSFunction, object_create) \ |
| 47 V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \ | 47 V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \ |
| 48 V(OBJECT_DEFINE_PROPERTY, JSFunction, object_define_property) \ | 48 V(OBJECT_DEFINE_PROPERTY, JSFunction, object_define_property) \ |
| 49 V(OBJECT_FREEZE, JSFunction, object_freeze) \ | 49 V(OBJECT_FREEZE, JSFunction, object_freeze) \ |
| 50 V(OBJECT_GET_PROTOTYPE_OF, JSFunction, object_get_prototype_of) \ | 50 V(OBJECT_GET_PROTOTYPE_OF, JSFunction, object_get_prototype_of) \ |
| 51 V(OBJECT_IS_EXTENSIBLE, JSFunction, object_is_extensible) \ | 51 V(OBJECT_IS_EXTENSIBLE, JSFunction, object_is_extensible) \ |
| 52 V(OBJECT_IS_FROZEN, JSFunction, object_is_frozen) \ | 52 V(OBJECT_IS_FROZEN, JSFunction, object_is_frozen) \ |
| 53 V(OBJECT_IS_SEALED, JSFunction, object_is_sealed) \ | 53 V(OBJECT_IS_SEALED, JSFunction, object_is_sealed) \ |
| 54 V(OBJECT_KEYS, JSFunction, object_keys) \ | 54 V(OBJECT_KEYS, JSFunction, object_keys) \ |
| 55 V(REGEXP_INTERNAL_MATCH, JSFunction, regexp_internal_match) \ | 55 V(REGEXP_INTERNAL_MATCH, JSFunction, regexp_internal_match) \ |
| 56 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ | 56 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ |
| 57 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ | 57 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ |
| 58 V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \ | 58 V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \ |
| 59 V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \ | 59 V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \ |
| 60 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ | 60 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ |
| 61 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ | 61 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ |
| 62 V(MATH_FLOOR_INDEX, JSFunction, math_floor) \ | 62 V(MATH_FLOOR_INDEX, JSFunction, math_floor) \ |
| 63 V(MATH_POW_INDEX, JSFunction, math_pow) \ | 63 V(MATH_POW_INDEX, JSFunction, math_pow) \ |
| 64 V(NEW_PROMISE_CAPABILITY_INDEX, JSFunction, new_promise_capability) \ | 64 V(NEW_PROMISE_CAPABILITY_INDEX, JSFunction, new_promise_capability) \ |
| 65 V(PROMISE_INTERNAL_CONSTRUCTOR_INDEX, JSFunction, \ | 65 V(PROMISE_INTERNAL_CONSTRUCTOR_INDEX, JSFunction, \ |
| 66 promise_internal_constructor) \ | 66 promise_internal_constructor) \ |
| 67 V(IS_PROMISE_INDEX, JSFunction, is_promise) \ | 67 V(IS_PROMISE_INDEX, JSFunction, is_promise) \ |
| 68 V(PERFORM_PROMISE_THEN_INDEX, JSFunction, perform_promise_then) \ | 68 V(PERFORM_PROMISE_THEN_INDEX, JSFunction, perform_promise_then) \ |
| 69 V(PROMISE_CREATE_AND_SET_INDEX, JSFunction, promise_create_and_set) \ | 69 V(PROMISE_CREATE_AND_SET_INDEX, JSFunction, promise_create_and_set) \ |
| 70 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \ | 70 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \ |
| 71 V(PROMISE_THEN_INDEX, JSFunction, promise_then) \ | 71 V(PROMISE_THEN_INDEX, JSFunction, promise_then) \ |
| 72 V(PROMISE_HANDLE_INDEX, JSFunction, promise_handle) \ | 72 V(PROMISE_HANDLE_INDEX, JSFunction, promise_handle) \ |
| 73 V(PROMISE_HANDLE_REJECT_INDEX, JSFunction, promise_handle_reject) | 73 V(PROMISE_HANDLE_REJECT_INDEX, JSFunction, promise_handle_reject) \ |
| 74 V(ASYNC_GENERATOR_AWAIT_CAUGHT, JSFunction, async_generator_await_caught) \ | |
| 75 V(ASYNC_GENERATOR_AWAIT_UNCAUGHT, JSFunction, \ | |
| 76 async_generator_await_uncaught) \ | |
| 77 V(ASYNC_GENERATOR_YIELD, JSFunction, async_generator_yield) | |
| 74 | 78 |
| 75 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ | 79 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ |
| 76 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ | 80 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ |
| 77 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ | 81 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ |
| 78 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ | 82 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ |
| 79 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ | 83 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ |
| 80 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ | 84 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ |
| 81 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ | 85 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ |
| 82 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ | 86 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ |
| 83 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ | 87 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 fast_holey_double_array_value_iterator_map) \ | 194 fast_holey_double_array_value_iterator_map) \ |
| 191 V(GENERIC_ARRAY_VALUE_ITERATOR_MAP_INDEX, Map, array_value_iterator_map) | 195 V(GENERIC_ARRAY_VALUE_ITERATOR_MAP_INDEX, Map, array_value_iterator_map) |
| 192 | 196 |
| 193 #define NATIVE_CONTEXT_FIELDS(V) \ | 197 #define NATIVE_CONTEXT_FIELDS(V) \ |
| 194 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ | 198 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ |
| 195 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ | 199 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ |
| 196 /* Below is alpha-sorted */ \ | 200 /* Below is alpha-sorted */ \ |
| 197 V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \ | 201 V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \ |
| 198 accessor_property_descriptor_map) \ | 202 accessor_property_descriptor_map) \ |
| 199 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ | 203 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ |
| 204 V(ASYNC_GENERATOR_AWAIT_REJECT_SHARED_FUN, SharedFunctionInfo, \ | |
| 205 async_generator_await_reject_shared_fun) \ | |
| 206 V(ASYNC_GENERATOR_AWAIT_RESOLVE_SHARED_FUN, SharedFunctionInfo, \ | |
| 207 async_generator_await_resolve_shared_fun) \ | |
| 208 V(ASYNC_ITERATOR_VALUE_UNWRAP_SHARED_FUN, SharedFunctionInfo, \ | |
| 209 async_iterator_value_unwrap_shared_fun) \ | |
| 200 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ | 210 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ |
| 201 V(ARRAY_BUFFER_MAP_INDEX, Map, array_buffer_map) \ | 211 V(ARRAY_BUFFER_MAP_INDEX, Map, array_buffer_map) \ |
| 202 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ | 212 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ |
| 203 V(ASYNC_FUNCTION_FUNCTION_INDEX, JSFunction, async_function_constructor) \ | 213 V(ASYNC_FUNCTION_FUNCTION_INDEX, JSFunction, async_function_constructor) \ |
| 214 V(ASYNC_GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \ | |
| 215 async_generator_function_function) \ | |
| 204 V(BOOL16X8_FUNCTION_INDEX, JSFunction, bool16x8_function) \ | 216 V(BOOL16X8_FUNCTION_INDEX, JSFunction, bool16x8_function) \ |
| 205 V(BOOL32X4_FUNCTION_INDEX, JSFunction, bool32x4_function) \ | 217 V(BOOL32X4_FUNCTION_INDEX, JSFunction, bool32x4_function) \ |
| 206 V(BOOL8X16_FUNCTION_INDEX, JSFunction, bool8x16_function) \ | 218 V(BOOL8X16_FUNCTION_INDEX, JSFunction, bool8x16_function) \ |
| 207 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \ | 219 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \ |
| 208 V(BOUND_FUNCTION_WITH_CONSTRUCTOR_MAP_INDEX, Map, \ | 220 V(BOUND_FUNCTION_WITH_CONSTRUCTOR_MAP_INDEX, Map, \ |
| 209 bound_function_with_constructor_map) \ | 221 bound_function_with_constructor_map) \ |
| 210 V(BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX, Map, \ | 222 V(BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX, Map, \ |
| 211 bound_function_without_constructor_map) \ | 223 bound_function_without_constructor_map) \ |
| 212 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ | 224 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ |
| 213 call_as_constructor_delegate) \ | 225 call_as_constructor_delegate) \ |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 226 V(FAST_ALIASED_ARGUMENTS_MAP_INDEX, Map, fast_aliased_arguments_map) \ | 238 V(FAST_ALIASED_ARGUMENTS_MAP_INDEX, Map, fast_aliased_arguments_map) \ |
| 227 V(FAST_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, FixedArray, \ | 239 V(FAST_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, FixedArray, \ |
| 228 fast_template_instantiations_cache) \ | 240 fast_template_instantiations_cache) \ |
| 229 V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \ | 241 V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \ |
| 230 V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \ | 242 V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \ |
| 231 V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \ | 243 V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \ |
| 232 V(FUNCTION_FUNCTION_INDEX, JSFunction, function_function) \ | 244 V(FUNCTION_FUNCTION_INDEX, JSFunction, function_function) \ |
| 233 V(GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \ | 245 V(GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \ |
| 234 generator_function_function) \ | 246 generator_function_function) \ |
| 235 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ | 247 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ |
| 248 V(ASYNC_GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \ | |
| 249 async_generator_object_prototype_map) \ | |
| 236 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX, JSObject, \ | 250 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX, JSObject, \ |
| 237 initial_array_iterator_prototype) \ | 251 initial_array_iterator_prototype) \ |
| 238 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \ | 252 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \ |
| 239 initial_array_iterator_prototype_map) \ | 253 initial_array_iterator_prototype_map) \ |
| 240 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \ | 254 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \ |
| 241 V(INITIAL_GENERATOR_PROTOTYPE_INDEX, JSObject, initial_generator_prototype) \ | 255 V(INITIAL_GENERATOR_PROTOTYPE_INDEX, JSObject, initial_generator_prototype) \ |
| 242 V(INITIAL_ITERATOR_PROTOTYPE_INDEX, JSObject, initial_iterator_prototype) \ | 256 V(INITIAL_ITERATOR_PROTOTYPE_INDEX, JSObject, initial_iterator_prototype) \ |
| 257 V(INITIAL_ASYNC_ITERATOR_PROTOTYPE_INDEX, JSObject, \ | |
|
caitp
2017/01/10 04:13:42
I don't think these are necessarily needed.
| |
| 258 initial_async_iterator_prototype) \ | |
| 259 V(INITIAL_ASYNC_FROM_SYNC_ITERATOR_MAP_INDEX, Map, \ | |
| 260 initial_async_from_sync_iterator_map) \ | |
| 243 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ | 261 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ |
| 244 V(INT16_ARRAY_FUN_INDEX, JSFunction, int16_array_fun) \ | 262 V(INT16_ARRAY_FUN_INDEX, JSFunction, int16_array_fun) \ |
| 245 V(INT16X8_FUNCTION_INDEX, JSFunction, int16x8_function) \ | 263 V(INT16X8_FUNCTION_INDEX, JSFunction, int16x8_function) \ |
| 246 V(INT32_ARRAY_FUN_INDEX, JSFunction, int32_array_fun) \ | 264 V(INT32_ARRAY_FUN_INDEX, JSFunction, int32_array_fun) \ |
| 247 V(INT32X4_FUNCTION_INDEX, JSFunction, int32x4_function) \ | 265 V(INT32X4_FUNCTION_INDEX, JSFunction, int32x4_function) \ |
| 248 V(INT8_ARRAY_FUN_INDEX, JSFunction, int8_array_fun) \ | 266 V(INT8_ARRAY_FUN_INDEX, JSFunction, int8_array_fun) \ |
| 249 V(INT8X16_FUNCTION_INDEX, JSFunction, int8x16_function) \ | 267 V(INT8X16_FUNCTION_INDEX, JSFunction, int8x16_function) \ |
| 250 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \ | 268 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \ |
| 251 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ | 269 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ |
| 252 V(JS_ARRAY_FAST_SMI_ELEMENTS_MAP_INDEX, Map, \ | 270 V(JS_ARRAY_FAST_SMI_ELEMENTS_MAP_INDEX, Map, \ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 V(SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP, Map, \ | 331 V(SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP, Map, \ |
| 314 slow_object_with_null_prototype_map) \ | 332 slow_object_with_null_prototype_map) \ |
| 315 V(SLOW_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, UnseededNumberDictionary, \ | 333 V(SLOW_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, UnseededNumberDictionary, \ |
| 316 slow_template_instantiations_cache) \ | 334 slow_template_instantiations_cache) \ |
| 317 V(STRICT_ARGUMENTS_MAP_INDEX, Map, strict_arguments_map) \ | 335 V(STRICT_ARGUMENTS_MAP_INDEX, Map, strict_arguments_map) \ |
| 318 V(ASYNC_FUNCTION_MAP_INDEX, Map, async_function_map) \ | 336 V(ASYNC_FUNCTION_MAP_INDEX, Map, async_function_map) \ |
| 319 V(STRICT_FUNCTION_MAP_INDEX, Map, strict_function_map) \ | 337 V(STRICT_FUNCTION_MAP_INDEX, Map, strict_function_map) \ |
| 320 V(STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \ | 338 V(STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \ |
| 321 strict_function_without_prototype_map) \ | 339 strict_function_without_prototype_map) \ |
| 322 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \ | 340 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \ |
| 341 V(ASYNC_GENERATOR_FUNCTION_MAP_INDEX, Map, async_generator_function_map) \ | |
| 323 V(CLASS_FUNCTION_MAP_INDEX, Map, class_function_map) \ | 342 V(CLASS_FUNCTION_MAP_INDEX, Map, class_function_map) \ |
| 324 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ | 343 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ |
| 325 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \ | 344 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \ |
| 326 V(STRING_ITERATOR_MAP_INDEX, Map, string_iterator_map) \ | 345 V(STRING_ITERATOR_MAP_INDEX, Map, string_iterator_map) \ |
| 327 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \ | 346 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \ |
| 328 V(WASM_FUNCTION_MAP_INDEX, Map, wasm_function_map) \ | 347 V(WASM_FUNCTION_MAP_INDEX, Map, wasm_function_map) \ |
| 329 V(WASM_INSTANCE_CONSTRUCTOR_INDEX, JSFunction, wasm_instance_constructor) \ | 348 V(WASM_INSTANCE_CONSTRUCTOR_INDEX, JSFunction, wasm_instance_constructor) \ |
| 330 V(WASM_INSTANCE_SYM_INDEX, Symbol, wasm_instance_sym) \ | 349 V(WASM_INSTANCE_SYM_INDEX, Symbol, wasm_instance_sym) \ |
| 331 V(WASM_MEMORY_CONSTRUCTOR_INDEX, JSFunction, wasm_memory_constructor) \ | 350 V(WASM_MEMORY_CONSTRUCTOR_INDEX, JSFunction, wasm_memory_constructor) \ |
| 332 V(WASM_MEMORY_SYM_INDEX, Symbol, wasm_memory_sym) \ | 351 V(WASM_MEMORY_SYM_INDEX, Symbol, wasm_memory_sym) \ |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 628 VariableMode* variable_mode); | 647 VariableMode* variable_mode); |
| 629 | 648 |
| 630 // Code generation support. | 649 // Code generation support. |
| 631 static int SlotOffset(int index) { | 650 static int SlotOffset(int index) { |
| 632 return kHeaderSize + index * kPointerSize - kHeapObjectTag; | 651 return kHeaderSize + index * kPointerSize - kHeapObjectTag; |
| 633 } | 652 } |
| 634 | 653 |
| 635 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) { | 654 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) { |
| 636 // Note: Must be kept in sync with the FastNewClosure builtin. | 655 // Note: Must be kept in sync with the FastNewClosure builtin. |
| 637 if (IsGeneratorFunction(kind)) { | 656 if (IsGeneratorFunction(kind)) { |
| 638 return GENERATOR_FUNCTION_MAP_INDEX; | 657 return IsAsyncFunction(kind) ? ASYNC_GENERATOR_FUNCTION_MAP_INDEX |
| 658 : GENERATOR_FUNCTION_MAP_INDEX; | |
| 639 } | 659 } |
| 640 | 660 |
| 641 if (IsAsyncFunction(kind)) { | 661 if (IsAsyncFunction(kind)) { |
| 642 return ASYNC_FUNCTION_MAP_INDEX; | 662 return ASYNC_FUNCTION_MAP_INDEX; |
| 643 } | 663 } |
| 644 | 664 |
| 645 if (IsClassConstructor(kind)) { | 665 if (IsClassConstructor(kind)) { |
| 646 // Like the strict function map, but with no 'name' accessor. 'name' | 666 // Like the strict function map, but with no 'name' accessor. 'name' |
| 647 // needs to be the last property and it is added during instantiation, | 667 // needs to be the last property and it is added during instantiation, |
| 648 // in case a static property with the same name exists" | 668 // in case a static property with the same name exists" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 706 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 687 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 707 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 688 }; | 708 }; |
| 689 | 709 |
| 690 typedef Context::Field ContextField; | 710 typedef Context::Field ContextField; |
| 691 | 711 |
| 692 } // namespace internal | 712 } // namespace internal |
| 693 } // namespace v8 | 713 } // namespace v8 |
| 694 | 714 |
| 695 #endif // V8_CONTEXTS_H_ | 715 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |