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 18 matching lines...) Expand all Loading... |
29 // Heap-allocated activation contexts. | 29 // Heap-allocated activation contexts. |
30 // | 30 // |
31 // Contexts are implemented as FixedArray objects; the Context | 31 // Contexts are implemented as FixedArray objects; the Context |
32 // class is a convenience interface casted on a FixedArray object. | 32 // class is a convenience interface casted on a FixedArray object. |
33 // | 33 // |
34 // Note: Context must have no virtual functions and Context objects | 34 // Note: Context must have no virtual functions and Context objects |
35 // must always be allocated via Heap::AllocateContext() or | 35 // must always be allocated via Heap::AllocateContext() or |
36 // Factory::NewContext. | 36 // Factory::NewContext. |
37 | 37 |
38 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ | 38 #define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ |
| 39 V(ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX, JSFunction, \ |
| 40 async_function_await_caught) \ |
| 41 V(ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX, JSFunction, \ |
| 42 async_function_await_uncaught) \ |
| 43 V(ASYNC_FUNCTION_PROMISE_CREATE_INDEX, JSFunction, \ |
| 44 async_function_promise_create) \ |
| 45 V(ASYNC_FUNCTION_PROMISE_RELEASE_INDEX, JSFunction, \ |
| 46 async_function_promise_release) \ |
39 V(IS_ARRAYLIKE, JSFunction, is_arraylike) \ | 47 V(IS_ARRAYLIKE, JSFunction, is_arraylike) \ |
40 V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \ | 48 V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \ |
41 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ | 49 V(GET_TEMPLATE_CALL_SITE_INDEX, JSFunction, get_template_call_site) \ |
42 V(MAKE_ERROR_INDEX, JSFunction, make_error) \ | 50 V(MAKE_ERROR_INDEX, JSFunction, make_error) \ |
43 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ | 51 V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \ |
44 V(MAKE_SYNTAX_ERROR_INDEX, JSFunction, make_syntax_error) \ | 52 V(MAKE_SYNTAX_ERROR_INDEX, JSFunction, make_syntax_error) \ |
45 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ | 53 V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \ |
46 V(MAKE_URI_ERROR_INDEX, JSFunction, make_uri_error) \ | 54 V(MAKE_URI_ERROR_INDEX, JSFunction, make_uri_error) \ |
47 V(OBJECT_CREATE, JSFunction, object_create) \ | 55 V(OBJECT_CREATE, JSFunction, object_create) \ |
48 V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \ | 56 V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \ |
(...skipping 28 matching lines...) Expand all Loading... |
77 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ | 85 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ |
78 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ | 86 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ |
79 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ | 87 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ |
80 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ | 88 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ |
81 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ | 89 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ |
82 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ | 90 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ |
83 V(ARRAY_ENTRIES_ITERATOR_INDEX, JSFunction, array_entries_iterator) \ | 91 V(ARRAY_ENTRIES_ITERATOR_INDEX, JSFunction, array_entries_iterator) \ |
84 V(ARRAY_FOR_EACH_ITERATOR_INDEX, JSFunction, array_for_each_iterator) \ | 92 V(ARRAY_FOR_EACH_ITERATOR_INDEX, JSFunction, array_for_each_iterator) \ |
85 V(ARRAY_KEYS_ITERATOR_INDEX, JSFunction, array_keys_iterator) \ | 93 V(ARRAY_KEYS_ITERATOR_INDEX, JSFunction, array_keys_iterator) \ |
86 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ | 94 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ |
87 V(ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX, JSFunction, \ | |
88 async_function_await_caught) \ | |
89 V(ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX, JSFunction, \ | |
90 async_function_await_uncaught) \ | |
91 V(ASYNC_FUNCTION_PROMISE_CREATE_INDEX, JSFunction, \ | |
92 async_function_promise_create) \ | |
93 V(ASYNC_FUNCTION_PROMISE_RELEASE_INDEX, JSFunction, \ | |
94 async_function_promise_release) \ | |
95 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ | 95 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ |
96 V(ERROR_FUNCTION_INDEX, JSFunction, error_function) \ | 96 V(ERROR_FUNCTION_INDEX, JSFunction, error_function) \ |
97 V(ERROR_TO_STRING, JSFunction, error_to_string) \ | 97 V(ERROR_TO_STRING, JSFunction, error_to_string) \ |
98 V(EVAL_ERROR_FUNCTION_INDEX, JSFunction, eval_error_function) \ | 98 V(EVAL_ERROR_FUNCTION_INDEX, JSFunction, eval_error_function) \ |
99 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ | 99 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ |
100 V(GLOBAL_PROXY_FUNCTION_INDEX, JSFunction, global_proxy_function) \ | 100 V(GLOBAL_PROXY_FUNCTION_INDEX, JSFunction, global_proxy_function) \ |
101 V(MAP_DELETE_METHOD_INDEX, JSFunction, map_delete) \ | 101 V(MAP_DELETE_METHOD_INDEX, JSFunction, map_delete) \ |
102 V(MAP_GET_METHOD_INDEX, JSFunction, map_get) \ | 102 V(MAP_GET_METHOD_INDEX, JSFunction, map_get) \ |
103 V(MAP_HAS_METHOD_INDEX, JSFunction, map_has) \ | 103 V(MAP_HAS_METHOD_INDEX, JSFunction, map_has) \ |
104 V(MAP_SET_METHOD_INDEX, JSFunction, map_set) \ | 104 V(MAP_SET_METHOD_INDEX, JSFunction, map_set) \ |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 685 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
686 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 686 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
687 }; | 687 }; |
688 | 688 |
689 typedef Context::Field ContextField; | 689 typedef Context::Field ContextField; |
690 | 690 |
691 } // namespace internal | 691 } // namespace internal |
692 } // namespace v8 | 692 } // namespace v8 |
693 | 693 |
694 #endif // V8_CONTEXTS_H_ | 694 #endif // V8_CONTEXTS_H_ |
OLD | NEW |