Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: src/contexts.h

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: simplify AsyncIteratorValueUnwrap Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/types.cc ('k') | src/factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) \
78 V(ASYNC_GENERATOR_RAW_YIELD, JSFunction, async_generator_raw_yield)
74 79
75 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ 80 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \
76 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ 81 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \
77 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ 82 V(ARRAY_POP_INDEX, JSFunction, array_pop) \
78 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ 83 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \
79 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ 84 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \
80 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ 85 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \
81 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ 86 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \
82 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ 87 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \
83 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ 88 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 fast_holey_double_array_value_iterator_map) \ 195 fast_holey_double_array_value_iterator_map) \
191 V(GENERIC_ARRAY_VALUE_ITERATOR_MAP_INDEX, Map, array_value_iterator_map) 196 V(GENERIC_ARRAY_VALUE_ITERATOR_MAP_INDEX, Map, array_value_iterator_map)
192 197
193 #define NATIVE_CONTEXT_FIELDS(V) \ 198 #define NATIVE_CONTEXT_FIELDS(V) \
194 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ 199 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \
195 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ 200 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \
196 /* Below is alpha-sorted */ \ 201 /* Below is alpha-sorted */ \
197 V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \ 202 V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \
198 accessor_property_descriptor_map) \ 203 accessor_property_descriptor_map) \
199 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ 204 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \
205 V(ASYNC_GENERATOR_AWAIT_REJECT_SHARED_FUN, SharedFunctionInfo, \
206 async_generator_await_reject_shared_fun) \
207 V(ASYNC_GENERATOR_AWAIT_RESOLVE_SHARED_FUN, SharedFunctionInfo, \
208 async_generator_await_resolve_shared_fun) \
209 V(ASYNC_ITERATOR_VALUE_UNWRAP_SHARED_FUN, SharedFunctionInfo, \
210 async_iterator_value_unwrap_shared_fun) \
200 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \ 211 V(ARRAY_BUFFER_FUN_INDEX, JSFunction, array_buffer_fun) \
201 V(ARRAY_BUFFER_MAP_INDEX, Map, array_buffer_map) \ 212 V(ARRAY_BUFFER_MAP_INDEX, Map, array_buffer_map) \
202 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ 213 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \
203 V(ASYNC_FUNCTION_FUNCTION_INDEX, JSFunction, async_function_constructor) \ 214 V(ASYNC_FUNCTION_FUNCTION_INDEX, JSFunction, async_function_constructor) \
215 V(ASYNC_GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \
216 async_generator_function_function) \
204 V(BOOL16X8_FUNCTION_INDEX, JSFunction, bool16x8_function) \ 217 V(BOOL16X8_FUNCTION_INDEX, JSFunction, bool16x8_function) \
205 V(BOOL32X4_FUNCTION_INDEX, JSFunction, bool32x4_function) \ 218 V(BOOL32X4_FUNCTION_INDEX, JSFunction, bool32x4_function) \
206 V(BOOL8X16_FUNCTION_INDEX, JSFunction, bool8x16_function) \ 219 V(BOOL8X16_FUNCTION_INDEX, JSFunction, bool8x16_function) \
207 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \ 220 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \
208 V(BOUND_FUNCTION_WITH_CONSTRUCTOR_MAP_INDEX, Map, \ 221 V(BOUND_FUNCTION_WITH_CONSTRUCTOR_MAP_INDEX, Map, \
209 bound_function_with_constructor_map) \ 222 bound_function_with_constructor_map) \
210 V(BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX, Map, \ 223 V(BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX, Map, \
211 bound_function_without_constructor_map) \ 224 bound_function_without_constructor_map) \
212 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 225 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
213 call_as_constructor_delegate) \ 226 call_as_constructor_delegate) \
(...skipping 12 matching lines...) Expand all
226 V(FAST_ALIASED_ARGUMENTS_MAP_INDEX, Map, fast_aliased_arguments_map) \ 239 V(FAST_ALIASED_ARGUMENTS_MAP_INDEX, Map, fast_aliased_arguments_map) \
227 V(FAST_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, FixedArray, \ 240 V(FAST_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, FixedArray, \
228 fast_template_instantiations_cache) \ 241 fast_template_instantiations_cache) \
229 V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \ 242 V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \
230 V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \ 243 V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \
231 V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \ 244 V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \
232 V(FUNCTION_FUNCTION_INDEX, JSFunction, function_function) \ 245 V(FUNCTION_FUNCTION_INDEX, JSFunction, function_function) \
233 V(GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \ 246 V(GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \
234 generator_function_function) \ 247 generator_function_function) \
235 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ 248 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \
249 V(ASYNC_GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \
250 async_generator_object_prototype_map) \
236 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX, JSObject, \ 251 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX, JSObject, \
237 initial_array_iterator_prototype) \ 252 initial_array_iterator_prototype) \
238 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \ 253 V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \
239 initial_array_iterator_prototype_map) \ 254 initial_array_iterator_prototype_map) \
240 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \ 255 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \
241 V(INITIAL_GENERATOR_PROTOTYPE_INDEX, JSObject, initial_generator_prototype) \ 256 V(INITIAL_GENERATOR_PROTOTYPE_INDEX, JSObject, initial_generator_prototype) \
242 V(INITIAL_ITERATOR_PROTOTYPE_INDEX, JSObject, initial_iterator_prototype) \ 257 V(INITIAL_ITERATOR_PROTOTYPE_INDEX, JSObject, initial_iterator_prototype) \
258 V(INITIAL_ASYNC_FROM_SYNC_ITERATOR_MAP_INDEX, Map, \
259 initial_async_from_sync_iterator_map) \
243 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ 260 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
244 V(INT16_ARRAY_FUN_INDEX, JSFunction, int16_array_fun) \ 261 V(INT16_ARRAY_FUN_INDEX, JSFunction, int16_array_fun) \
245 V(INT16X8_FUNCTION_INDEX, JSFunction, int16x8_function) \ 262 V(INT16X8_FUNCTION_INDEX, JSFunction, int16x8_function) \
246 V(INT32_ARRAY_FUN_INDEX, JSFunction, int32_array_fun) \ 263 V(INT32_ARRAY_FUN_INDEX, JSFunction, int32_array_fun) \
247 V(INT32X4_FUNCTION_INDEX, JSFunction, int32x4_function) \ 264 V(INT32X4_FUNCTION_INDEX, JSFunction, int32x4_function) \
248 V(INT8_ARRAY_FUN_INDEX, JSFunction, int8_array_fun) \ 265 V(INT8_ARRAY_FUN_INDEX, JSFunction, int8_array_fun) \
249 V(INT8X16_FUNCTION_INDEX, JSFunction, int8x16_function) \ 266 V(INT8X16_FUNCTION_INDEX, JSFunction, int8x16_function) \
250 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \ 267 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \
251 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ 268 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \
252 V(JS_ARRAY_FAST_SMI_ELEMENTS_MAP_INDEX, Map, \ 269 V(JS_ARRAY_FAST_SMI_ELEMENTS_MAP_INDEX, Map, \
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 V(SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP, Map, \ 330 V(SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP, Map, \
314 slow_object_with_null_prototype_map) \ 331 slow_object_with_null_prototype_map) \
315 V(SLOW_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, UnseededNumberDictionary, \ 332 V(SLOW_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, UnseededNumberDictionary, \
316 slow_template_instantiations_cache) \ 333 slow_template_instantiations_cache) \
317 V(STRICT_ARGUMENTS_MAP_INDEX, Map, strict_arguments_map) \ 334 V(STRICT_ARGUMENTS_MAP_INDEX, Map, strict_arguments_map) \
318 V(ASYNC_FUNCTION_MAP_INDEX, Map, async_function_map) \ 335 V(ASYNC_FUNCTION_MAP_INDEX, Map, async_function_map) \
319 V(STRICT_FUNCTION_MAP_INDEX, Map, strict_function_map) \ 336 V(STRICT_FUNCTION_MAP_INDEX, Map, strict_function_map) \
320 V(STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \ 337 V(STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \
321 strict_function_without_prototype_map) \ 338 strict_function_without_prototype_map) \
322 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \ 339 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \
340 V(ASYNC_GENERATOR_FUNCTION_MAP_INDEX, Map, async_generator_function_map) \
323 V(CLASS_FUNCTION_MAP_INDEX, Map, class_function_map) \ 341 V(CLASS_FUNCTION_MAP_INDEX, Map, class_function_map) \
324 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ 342 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \
325 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \ 343 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \
326 V(STRING_ITERATOR_MAP_INDEX, Map, string_iterator_map) \ 344 V(STRING_ITERATOR_MAP_INDEX, Map, string_iterator_map) \
327 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \ 345 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \
328 V(WASM_FUNCTION_MAP_INDEX, Map, wasm_function_map) \ 346 V(WASM_FUNCTION_MAP_INDEX, Map, wasm_function_map) \
329 V(WASM_INSTANCE_CONSTRUCTOR_INDEX, JSFunction, wasm_instance_constructor) \ 347 V(WASM_INSTANCE_CONSTRUCTOR_INDEX, JSFunction, wasm_instance_constructor) \
330 V(WASM_INSTANCE_SYM_INDEX, Symbol, wasm_instance_sym) \ 348 V(WASM_INSTANCE_SYM_INDEX, Symbol, wasm_instance_sym) \
331 V(WASM_MEMORY_CONSTRUCTOR_INDEX, JSFunction, wasm_memory_constructor) \ 349 V(WASM_MEMORY_CONSTRUCTOR_INDEX, JSFunction, wasm_memory_constructor) \
332 V(WASM_MEMORY_SYM_INDEX, Symbol, wasm_memory_sym) \ 350 V(WASM_MEMORY_SYM_INDEX, Symbol, wasm_memory_sym) \
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 VariableMode* variable_mode); 646 VariableMode* variable_mode);
629 647
630 // Code generation support. 648 // Code generation support.
631 static int SlotOffset(int index) { 649 static int SlotOffset(int index) {
632 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 650 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
633 } 651 }
634 652
635 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) { 653 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) {
636 // Note: Must be kept in sync with the FastNewClosure builtin. 654 // Note: Must be kept in sync with the FastNewClosure builtin.
637 if (IsGeneratorFunction(kind)) { 655 if (IsGeneratorFunction(kind)) {
638 return GENERATOR_FUNCTION_MAP_INDEX; 656 return IsAsyncFunction(kind) ? ASYNC_GENERATOR_FUNCTION_MAP_INDEX
657 : GENERATOR_FUNCTION_MAP_INDEX;
639 } 658 }
640 659
641 if (IsAsyncFunction(kind)) { 660 if (IsAsyncFunction(kind)) {
642 return ASYNC_FUNCTION_MAP_INDEX; 661 return ASYNC_FUNCTION_MAP_INDEX;
643 } 662 }
644 663
645 if (IsClassConstructor(kind)) { 664 if (IsClassConstructor(kind)) {
646 // Like the strict function map, but with no 'name' accessor. 'name' 665 // Like the strict function map, but with no 'name' accessor. 'name'
647 // needs to be the last property and it is added during instantiation, 666 // needs to be the last property and it is added during instantiation,
648 // in case a static property with the same name exists" 667 // in case a static property with the same name exists"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 705 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
687 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 706 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
688 }; 707 };
689 708
690 typedef Context::Field ContextField; 709 typedef Context::Field ContextField;
691 710
692 } // namespace internal 711 } // namespace internal
693 } // namespace v8 712 } // namespace v8
694 713
695 #endif // V8_CONTEXTS_H_ 714 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler/types.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698