OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_H_ |
6 #define V8_BUILTINS_H_ | 6 #define V8_BUILTINS_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 \ | 57 \ |
58 V(HandleApiCall, NEEDS_CALLED_FUNCTION) \ | 58 V(HandleApiCall, NEEDS_CALLED_FUNCTION) \ |
59 V(HandleApiCallConstruct, NEEDS_CALLED_FUNCTION) \ | 59 V(HandleApiCallConstruct, NEEDS_CALLED_FUNCTION) \ |
60 V(HandleApiCallAsFunction, NO_EXTRA_ARGUMENTS) \ | 60 V(HandleApiCallAsFunction, NO_EXTRA_ARGUMENTS) \ |
61 V(HandleApiCallAsConstructor, NO_EXTRA_ARGUMENTS) \ | 61 V(HandleApiCallAsConstructor, NO_EXTRA_ARGUMENTS) \ |
62 \ | 62 \ |
63 V(RestrictedFunctionPropertiesThrower, NO_EXTRA_ARGUMENTS) \ | 63 V(RestrictedFunctionPropertiesThrower, NO_EXTRA_ARGUMENTS) \ |
64 V(RestrictedStrictArgumentsPropertiesThrower, NO_EXTRA_ARGUMENTS) | 64 V(RestrictedStrictArgumentsPropertiesThrower, NO_EXTRA_ARGUMENTS) |
65 | 65 |
66 // Define list of builtins implemented in assembly. | 66 // Define list of builtins implemented in assembly. |
67 #define BUILTIN_LIST_A(V) \ | 67 #define BUILTIN_LIST_A(V) \ |
68 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 68 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
69 V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 69 V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
70 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 70 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
71 V(JSConstructStubForDerived, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 71 V(JSConstructStubForDerived, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
72 V(JSConstructStubApi, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 72 V(JSConstructStubApi, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
73 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 73 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
74 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 74 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
75 V(CompileLazy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 75 V(CompileLazy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
76 V(CompileOptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 76 V(CompileOptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
77 V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 77 V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
78 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 78 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
79 V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 79 V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
80 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 80 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
81 V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 81 V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
82 V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 82 V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
83 \ | 83 \ |
84 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 84 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
85 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 85 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
86 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 86 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
87 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 87 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
88 V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \ | 88 V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \ |
89 V(KeyedLoadIC_Initialize, KEYED_LOAD_IC, UNINITIALIZED, kNoExtraICState) \ | 89 V(KeyedLoadIC_Initialize, KEYED_LOAD_IC, UNINITIALIZED, kNoExtraICState) \ |
90 V(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \ | 90 V(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \ |
91 \ | 91 \ |
92 V(StoreIC_Setter_ForDeopt, STORE_IC, MONOMORPHIC, StoreIC::kStrictModeState) \ | 92 V(StoreIC_Setter_ForDeopt, STORE_IC, MONOMORPHIC, \ |
93 \ | 93 StoreICState::kStrictModeState) \ |
94 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED, kNoExtraICState) \ | 94 \ |
95 V(KeyedStoreIC_PreMonomorphic, KEYED_STORE_IC, PREMONOMORPHIC, \ | 95 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED, kNoExtraICState) \ |
96 kNoExtraICState) \ | 96 V(KeyedStoreIC_PreMonomorphic, KEYED_STORE_IC, PREMONOMORPHIC, \ |
97 V(KeyedStoreIC_Megamorphic, KEYED_STORE_IC, MEGAMORPHIC, kNoExtraICState) \ | 97 kNoExtraICState) \ |
98 \ | 98 V(KeyedStoreIC_Megamorphic, KEYED_STORE_IC, MEGAMORPHIC, kNoExtraICState) \ |
99 V(KeyedStoreIC_Initialize_Strict, KEYED_STORE_IC, UNINITIALIZED, \ | 99 \ |
100 StoreIC::kStrictModeState) \ | 100 V(KeyedStoreIC_Initialize_Strict, KEYED_STORE_IC, UNINITIALIZED, \ |
101 V(KeyedStoreIC_PreMonomorphic_Strict, KEYED_STORE_IC, PREMONOMORPHIC, \ | 101 StoreICState::kStrictModeState) \ |
102 StoreIC::kStrictModeState) \ | 102 V(KeyedStoreIC_PreMonomorphic_Strict, KEYED_STORE_IC, PREMONOMORPHIC, \ |
103 V(KeyedStoreIC_Megamorphic_Strict, KEYED_STORE_IC, MEGAMORPHIC, \ | 103 StoreICState::kStrictModeState) \ |
104 StoreIC::kStrictModeState) \ | 104 V(KeyedStoreIC_Megamorphic_Strict, KEYED_STORE_IC, MEGAMORPHIC, \ |
105 V(KeyedStoreIC_SloppyArguments, KEYED_STORE_IC, MONOMORPHIC, \ | 105 StoreICState::kStrictModeState) \ |
106 kNoExtraICState) \ | 106 V(KeyedStoreIC_SloppyArguments, KEYED_STORE_IC, MONOMORPHIC, \ |
107 \ | 107 kNoExtraICState) \ |
108 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ | 108 \ |
109 V(FunctionCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 109 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ |
110 V(FunctionApply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 110 V(FunctionCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
111 V(ReflectApply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 111 V(FunctionApply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
112 V(ReflectConstruct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 112 V(ReflectApply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
113 \ | 113 V(ReflectConstruct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
114 V(InternalArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 114 \ |
115 V(ArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 115 V(InternalArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
116 \ | 116 V(ArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
117 V(StringConstructCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 117 \ |
118 \ | 118 V(StringConstructCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
119 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 119 \ |
120 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 120 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
121 V(OsrAfterStackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 121 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
122 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 122 V(OsrAfterStackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
123 \ | 123 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
124 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 124 \ |
125 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 125 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
126 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 126 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 127 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
127 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) | 128 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
128 | 129 |
129 // Define list of builtin handlers implemented in assembly. | 130 // Define list of builtin handlers implemented in assembly. |
130 #define BUILTIN_LIST_H(V) \ | 131 #define BUILTIN_LIST_H(V) \ |
131 V(LoadIC_Slow, LOAD_IC) \ | 132 V(LoadIC_Slow, LOAD_IC) \ |
132 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ | 133 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ |
133 V(StoreIC_Slow, STORE_IC) \ | 134 V(StoreIC_Slow, STORE_IC) \ |
134 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ | 135 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ |
135 V(LoadIC_Normal, LOAD_IC) \ | 136 V(LoadIC_Normal, LOAD_IC) \ |
136 V(StoreIC_Normal, STORE_IC) | 137 V(StoreIC_Normal, STORE_IC) |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 366 |
366 friend class BuiltinFunctionTable; | 367 friend class BuiltinFunctionTable; |
367 friend class Isolate; | 368 friend class Isolate; |
368 | 369 |
369 DISALLOW_COPY_AND_ASSIGN(Builtins); | 370 DISALLOW_COPY_AND_ASSIGN(Builtins); |
370 }; | 371 }; |
371 | 372 |
372 } } // namespace v8::internal | 373 } } // namespace v8::internal |
373 | 374 |
374 #endif // V8_BUILTINS_H_ | 375 #endif // V8_BUILTINS_H_ |
OLD | NEW |