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

Side by Side Diff: src/contexts.h

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: Make gcmole happy 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/heap/heap.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(CREATE_RESOLVING_FUNCTION_INDEX, JSFunction, create_resolving_functions) \ 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 74
75 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ 75 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \
76 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ 76 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \
77 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ 77 V(ARRAY_POP_INDEX, JSFunction, array_pop) \
78 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ 78 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \
79 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ 79 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \
80 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ 80 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \
81 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ 81 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \
82 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ 82 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \
(...skipping 20 matching lines...) Expand all
103 V(OBJECT_VALUE_OF, JSFunction, object_value_of) \ 103 V(OBJECT_VALUE_OF, JSFunction, object_value_of) \
104 V(OBJECT_TO_STRING, JSFunction, object_to_string) \ 104 V(OBJECT_TO_STRING, JSFunction, object_to_string) \
105 V(PROMISE_CATCH_INDEX, JSFunction, promise_catch) \ 105 V(PROMISE_CATCH_INDEX, JSFunction, promise_catch) \
106 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \ 106 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \
107 V(PROMISE_FUNCTION_INDEX, JSFunction, promise_function) \ 107 V(PROMISE_FUNCTION_INDEX, JSFunction, promise_function) \
108 V(PROMISE_DEBUG_GET_INFO_INDEX, JSFunction, promise_debug_get_info) \ 108 V(PROMISE_DEBUG_GET_INFO_INDEX, JSFunction, promise_debug_get_info) \
109 V(PROMISE_REJECT_INDEX, JSFunction, promise_reject) \ 109 V(PROMISE_REJECT_INDEX, JSFunction, promise_reject) \
110 V(PROMISE_INTERNAL_REJECT_INDEX, JSFunction, promise_internal_reject) \ 110 V(PROMISE_INTERNAL_REJECT_INDEX, JSFunction, promise_internal_reject) \
111 V(PROMISE_ID_RESOLVE_HANDLER_INDEX, JSFunction, promise_id_resolve_handler) \ 111 V(PROMISE_ID_RESOLVE_HANDLER_INDEX, JSFunction, promise_id_resolve_handler) \
112 V(PROMISE_ID_REJECT_HANDLER_INDEX, JSFunction, promise_id_reject_handler) \ 112 V(PROMISE_ID_REJECT_HANDLER_INDEX, JSFunction, promise_id_reject_handler) \
113 V(NEW_PROMISE_CAPABILITY_INDEX, JSFunction, new_promise_capability) \
114 V(INTERNAL_PROMISE_CAPABILITY_INDEX, JSFunction, \
115 internal_promise_capability) \
116 V(RANGE_ERROR_FUNCTION_INDEX, JSFunction, range_error_function) \ 113 V(RANGE_ERROR_FUNCTION_INDEX, JSFunction, range_error_function) \
117 V(REJECT_PROMISE_NO_DEBUG_EVENT_INDEX, JSFunction, \ 114 V(REJECT_PROMISE_NO_DEBUG_EVENT_INDEX, JSFunction, \
118 reject_promise_no_debug_event) \ 115 reject_promise_no_debug_event) \
119 V(REFERENCE_ERROR_FUNCTION_INDEX, JSFunction, reference_error_function) \ 116 V(REFERENCE_ERROR_FUNCTION_INDEX, JSFunction, reference_error_function) \
120 V(SET_ADD_METHOD_INDEX, JSFunction, set_add) \ 117 V(SET_ADD_METHOD_INDEX, JSFunction, set_add) \
121 V(SET_DELETE_METHOD_INDEX, JSFunction, set_delete) \ 118 V(SET_DELETE_METHOD_INDEX, JSFunction, set_delete) \
122 V(SET_HAS_METHOD_INDEX, JSFunction, set_has) \ 119 V(SET_HAS_METHOD_INDEX, JSFunction, set_has) \
123 V(SYNTAX_ERROR_FUNCTION_INDEX, JSFunction, syntax_error_function) \ 120 V(SYNTAX_ERROR_FUNCTION_INDEX, JSFunction, syntax_error_function) \
124 V(TYPE_ERROR_FUNCTION_INDEX, JSFunction, type_error_function) \ 121 V(TYPE_ERROR_FUNCTION_INDEX, JSFunction, type_error_function) \
125 V(URI_ERROR_FUNCTION_INDEX, JSFunction, uri_error_function) \ 122 V(URI_ERROR_FUNCTION_INDEX, JSFunction, uri_error_function) \
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \ 279 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \
283 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \ 280 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \
284 V(OBJECT_FUNCTION_PROTOTYPE_MAP_INDEX, Map, object_function_prototype_map) \ 281 V(OBJECT_FUNCTION_PROTOTYPE_MAP_INDEX, Map, object_function_prototype_map) \
285 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ 282 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
286 V(OSR_CODE_TABLE_INDEX, FixedArray, osr_code_table) \ 283 V(OSR_CODE_TABLE_INDEX, FixedArray, osr_code_table) \
287 V(PROXY_CALLABLE_MAP_INDEX, Map, proxy_callable_map) \ 284 V(PROXY_CALLABLE_MAP_INDEX, Map, proxy_callable_map) \
288 V(PROXY_CONSTRUCTOR_MAP_INDEX, Map, proxy_constructor_map) \ 285 V(PROXY_CONSTRUCTOR_MAP_INDEX, Map, proxy_constructor_map) \
289 V(PROXY_FUNCTION_INDEX, JSFunction, proxy_function) \ 286 V(PROXY_FUNCTION_INDEX, JSFunction, proxy_function) \
290 V(PROXY_FUNCTION_MAP_INDEX, Map, proxy_function_map) \ 287 V(PROXY_FUNCTION_MAP_INDEX, Map, proxy_function_map) \
291 V(PROXY_MAP_INDEX, Map, proxy_map) \ 288 V(PROXY_MAP_INDEX, Map, proxy_map) \
289 V(PROMISE_GET_CAPABILITIES_EXECUTOR_SHARED_FUN, SharedFunctionInfo, \
290 promise_get_capabilities_executor_shared_fun) \
292 V(PROMISE_RESOLVE_SHARED_FUN, SharedFunctionInfo, \ 291 V(PROMISE_RESOLVE_SHARED_FUN, SharedFunctionInfo, \
293 promise_resolve_shared_fun) \ 292 promise_resolve_shared_fun) \
294 V(PROMISE_REJECT_SHARED_FUN, SharedFunctionInfo, promise_reject_shared_fun) \ 293 V(PROMISE_REJECT_SHARED_FUN, SharedFunctionInfo, promise_reject_shared_fun) \
295 V(PROMISE_PROTOTYPE_MAP_INDEX, Map, promise_prototype_map) \ 294 V(PROMISE_PROTOTYPE_MAP_INDEX, Map, promise_prototype_map) \
296 V(REGEXP_EXEC_FUNCTION_INDEX, JSFunction, regexp_exec_function) \ 295 V(REGEXP_EXEC_FUNCTION_INDEX, JSFunction, regexp_exec_function) \
297 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \ 296 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
298 V(REGEXP_LAST_MATCH_INFO_INDEX, RegExpMatchInfo, regexp_last_match_info) \ 297 V(REGEXP_LAST_MATCH_INFO_INDEX, RegExpMatchInfo, regexp_last_match_info) \
299 V(REGEXP_INTERNAL_MATCH_INFO_INDEX, RegExpMatchInfo, \ 298 V(REGEXP_INTERNAL_MATCH_INFO_INDEX, RegExpMatchInfo, \
300 regexp_internal_match_info) \ 299 regexp_internal_match_info) \
301 V(REGEXP_PROTOTYPE_MAP_INDEX, Map, regexp_prototype_map) \ 300 V(REGEXP_PROTOTYPE_MAP_INDEX, Map, regexp_prototype_map) \
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 692 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
694 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 693 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
695 }; 694 };
696 695
697 typedef Context::Field ContextField; 696 typedef Context::Field ContextField;
698 697
699 } // namespace internal 698 } // namespace internal
700 } // namespace v8 699 } // namespace v8
701 700
702 #endif // V8_CONTEXTS_H_ 701 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler/types.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698