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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ | 83 V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \ |
84 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ | 84 V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \ |
85 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ | 85 V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \ |
86 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ | 86 V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \ |
87 V(TO_LENGTH_FUN_INDEX, JSFunction, to_length_fun) \ | 87 V(TO_LENGTH_FUN_INDEX, JSFunction, to_length_fun) \ |
88 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ | 88 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ |
89 V(TO_PRIMITIVE_INDEX, JSFunction, to_primitive) \ | 89 V(TO_PRIMITIVE_INDEX, JSFunction, to_primitive) \ |
90 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) | 90 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) |
91 | 91 |
92 | 92 |
93 #define NATIVE_CONTEXT_JS_BUILTINS(V) \ | 93 #define NATIVE_CONTEXT_JS_BUILTINS(V) \ |
94 V(APPLY_PREPARE_BUILTIN_INDEX, JSFunction, apply_prepare_builtin) \ | 94 V(APPLY_PREPARE_BUILTIN_INDEX, JSFunction, apply_prepare_builtin) \ |
95 V(COMPARE_BUILTIN_INDEX, JSFunction, compare_builtin) \ | 95 V(COMPARE_BUILTIN_INDEX, JSFunction, compare_builtin) \ |
96 V(COMPARE_STRONG_BUILTIN_INDEX, JSFunction, compare_strong_builtin) \ | 96 V(COMPARE_STRONG_BUILTIN_INDEX, JSFunction, compare_strong_builtin) \ |
97 V(CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX, JSFunction, \ | 97 V(CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX, JSFunction, \ |
98 concat_iterable_to_array_builtin) \ | 98 concat_iterable_to_array_builtin) \ |
99 V(EQUALS_BUILTIN_INDEX, JSFunction, equals_builtin) \ | 99 V(EQUALS_BUILTIN_INDEX, JSFunction, equals_builtin) \ |
100 V(REFLECT_APPLY_PREPARE_BUILTIN_INDEX, JSFunction, \ | 100 V(REFLECT_APPLY_PREPARE_BUILTIN_INDEX, JSFunction, \ |
101 reflect_apply_prepare_builtin) \ | 101 reflect_apply_prepare_builtin) \ |
102 V(REFLECT_CONSTRUCT_PREPARE_BUILTIN_INDEX, JSFunction, \ | 102 V(REFLECT_CONSTRUCT_PREPARE_BUILTIN_INDEX, JSFunction, \ |
103 reflect_construct_prepare_builtin) \ | 103 reflect_construct_prepare_builtin) |
104 V(STRING_ADD_LEFT_BUILTIN_INDEX, JSFunction, string_add_left_builtin) \ | |
105 V(STRING_ADD_RIGHT_BUILTIN_INDEX, JSFunction, string_add_right_builtin) | |
106 | 104 |
107 | 105 |
108 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ | 106 #define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \ |
109 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ | 107 V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \ |
110 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ | 108 V(ARRAY_POP_INDEX, JSFunction, array_pop) \ |
111 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ | 109 V(ARRAY_PUSH_INDEX, JSFunction, array_push) \ |
112 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ | 110 V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \ |
113 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ | 111 V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \ |
114 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ | 112 V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \ |
115 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ | 113 V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \ |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 552 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
555 #endif | 553 #endif |
556 | 554 |
557 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 555 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
558 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 556 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
559 }; | 557 }; |
560 | 558 |
561 } } // namespace v8::internal | 559 } } // namespace v8::internal |
562 | 560 |
563 #endif // V8_CONTEXTS_H_ | 561 #endif // V8_CONTEXTS_H_ |
OLD | NEW |