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_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_BUILTINS_H_ |
6 #define V8_BUILTINS_BUILTINS_H_ | 6 #define V8_BUILTINS_BUILTINS_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // TFS: Builtin in Turbofan, with CodeStub linkage. | 42 // TFS: Builtin in Turbofan, with CodeStub linkage. |
43 // Args: name, code kind, extra IC state, interface descriptor | 43 // Args: name, code kind, extra IC state, interface descriptor |
44 // ASM: Builtin in platform-dependent assembly. | 44 // ASM: Builtin in platform-dependent assembly. |
45 // Args: name | 45 // Args: name |
46 // ASH: Handlers implemented in platform-dependent assembly. | 46 // ASH: Handlers implemented in platform-dependent assembly. |
47 // Args: name, code kind, extra IC state | 47 // Args: name, code kind, extra IC state |
48 // DBG: Builtin in platform-dependent assembly, used by the debugger. | 48 // DBG: Builtin in platform-dependent assembly, used by the debugger. |
49 // Args: name | 49 // Args: name |
50 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | 50 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ |
51 ASM(Abort) \ | 51 ASM(Abort) \ |
52 /* Handlers */ \ | |
53 ASH(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, kNoExtraICState) \ | |
54 TFS(KeyedLoadIC_Megamorphic_TF, KEYED_LOAD_IC, kNoExtraICState, \ | |
55 LoadWithVector) \ | |
56 ASM(KeyedLoadIC_Miss) \ | |
57 ASH(KeyedLoadIC_Slow, HANDLER, Code::KEYED_LOAD_IC) \ | |
58 ASH(KeyedStoreIC_Megamorphic, KEYED_STORE_IC, kNoExtraICState) \ | |
59 ASH(KeyedStoreIC_Megamorphic_Strict, KEYED_STORE_IC, \ | |
60 StoreICState::kStrictModeState) \ | |
61 ASM(KeyedStoreIC_Miss) \ | |
62 ASH(KeyedStoreIC_Slow, HANDLER, Code::KEYED_STORE_IC) \ | |
63 TFS(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \ | |
64 TFS(LoadGlobalIC_Slow, HANDLER, Code::LOAD_GLOBAL_IC, LoadGlobalWithVector) \ | |
65 ASH(LoadIC_Getter_ForDeopt, LOAD_IC, kNoExtraICState) \ | |
66 TFS(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ | |
67 ASH(LoadIC_Normal, HANDLER, Code::LOAD_IC) \ | |
68 TFS(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ | |
69 TFS(StoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \ | |
70 ASH(StoreIC_Normal, HANDLER, Code::STORE_IC) \ | |
71 ASH(StoreIC_Setter_ForDeopt, STORE_IC, StoreICState::kStrictModeState) \ | |
72 TFS(StoreIC_SlowSloppy, HANDLER, Code::STORE_IC, StoreWithVector) \ | |
73 TFS(StoreIC_SlowStrict, HANDLER, Code::STORE_IC, StoreWithVector) \ | |
74 \ | |
75 /* Code aging */ \ | 52 /* Code aging */ \ |
76 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ | 53 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ |
77 \ | 54 \ |
78 /* Calls */ \ | 55 /* Calls */ \ |
79 ASM(ArgumentsAdaptorTrampoline) \ | 56 ASM(ArgumentsAdaptorTrampoline) \ |
80 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \ | 57 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \ |
81 ASM(CallFunction_ReceiverIsNullOrUndefined) \ | 58 ASM(CallFunction_ReceiverIsNullOrUndefined) \ |
82 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \ | 59 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \ |
83 ASM(CallFunction_ReceiverIsAny) \ | 60 ASM(CallFunction_ReceiverIsAny) \ |
84 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \ | 61 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \ |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 TypeConversion) \ | 157 TypeConversion) \ |
181 TFS(NonPrimitiveToPrimitive_Number, BUILTIN, kNoExtraICState, \ | 158 TFS(NonPrimitiveToPrimitive_Number, BUILTIN, kNoExtraICState, \ |
182 TypeConversion) \ | 159 TypeConversion) \ |
183 TFS(NonPrimitiveToPrimitive_String, BUILTIN, kNoExtraICState, \ | 160 TFS(NonPrimitiveToPrimitive_String, BUILTIN, kNoExtraICState, \ |
184 TypeConversion) \ | 161 TypeConversion) \ |
185 TFS(StringToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ | 162 TFS(StringToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ |
186 TFS(ToName, BUILTIN, kNoExtraICState, TypeConversion) \ | 163 TFS(ToName, BUILTIN, kNoExtraICState, TypeConversion) \ |
187 TFS(NonNumberToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ | 164 TFS(NonNumberToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ |
188 TFS(ToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ | 165 TFS(ToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ |
189 \ | 166 \ |
| 167 /* Handlers */ \ |
| 168 ASH(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, kNoExtraICState) \ |
| 169 TFS(KeyedLoadIC_Megamorphic_TF, KEYED_LOAD_IC, kNoExtraICState, \ |
| 170 LoadWithVector) \ |
| 171 ASM(KeyedLoadIC_Miss) \ |
| 172 ASH(KeyedLoadIC_Slow, HANDLER, Code::KEYED_LOAD_IC) \ |
| 173 ASH(KeyedStoreIC_Megamorphic, KEYED_STORE_IC, kNoExtraICState) \ |
| 174 ASH(KeyedStoreIC_Megamorphic_Strict, KEYED_STORE_IC, \ |
| 175 StoreICState::kStrictModeState) \ |
| 176 ASM(KeyedStoreIC_Miss) \ |
| 177 ASH(KeyedStoreIC_Slow, HANDLER, Code::KEYED_STORE_IC) \ |
| 178 TFS(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \ |
| 179 TFS(LoadGlobalIC_Slow, HANDLER, Code::LOAD_GLOBAL_IC, LoadGlobalWithVector) \ |
| 180 ASH(LoadIC_Getter_ForDeopt, LOAD_IC, kNoExtraICState) \ |
| 181 TFS(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ |
| 182 ASH(LoadIC_Normal, HANDLER, Code::LOAD_IC) \ |
| 183 TFS(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ |
| 184 TFS(StoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \ |
| 185 ASH(StoreIC_Normal, HANDLER, Code::STORE_IC) \ |
| 186 ASH(StoreIC_Setter_ForDeopt, STORE_IC, StoreICState::kStrictModeState) \ |
| 187 TFS(StoreIC_SlowSloppy, HANDLER, Code::STORE_IC, StoreWithVector) \ |
| 188 TFS(StoreIC_SlowStrict, HANDLER, Code::STORE_IC, StoreWithVector) \ |
| 189 \ |
190 /* Built-in functions for Javascript */ \ | 190 /* Built-in functions for Javascript */ \ |
191 /* Special internal builtins */ \ | 191 /* Special internal builtins */ \ |
192 CPP(EmptyFunction) \ | 192 CPP(EmptyFunction) \ |
193 CPP(Illegal) \ | 193 CPP(Illegal) \ |
194 CPP(RestrictedFunctionPropertiesThrower) \ | 194 CPP(RestrictedFunctionPropertiesThrower) \ |
195 CPP(RestrictedStrictArgumentsPropertiesThrower) \ | 195 CPP(RestrictedStrictArgumentsPropertiesThrower) \ |
196 CPP(UnsupportedThrower) \ | 196 CPP(UnsupportedThrower) \ |
197 \ | 197 \ |
198 /* Array */ \ | 198 /* Array */ \ |
199 ASM(ArrayCode) \ | 199 ASM(ArrayCode) \ |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 718 |
719 friend class Isolate; | 719 friend class Isolate; |
720 | 720 |
721 DISALLOW_COPY_AND_ASSIGN(Builtins); | 721 DISALLOW_COPY_AND_ASSIGN(Builtins); |
722 }; | 722 }; |
723 | 723 |
724 } // namespace internal | 724 } // namespace internal |
725 } // namespace v8 | 725 } // namespace v8 |
726 | 726 |
727 #endif // V8_BUILTINS_BUILTINS_H_ | 727 #endif // V8_BUILTINS_BUILTINS_H_ |
OLD | NEW |