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

Side by Side Diff: src/builtins/builtins.h

Issue 2684043002: [turbofan] Use fast stub for ForInPrepare and ForInNext (Closed)
Patch Set: add missing SmiUntag and remove ForInNext RT function Created 3 years, 10 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 | « no previous file | src/builtins/builtins.cc » ('j') | src/builtins/builtins-object.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 24 matching lines...) Expand all
35 35
36 #define DECLARE_CODE_AGE_BUILTIN(C, V) V(Make##C##CodeYoungAgain) 36 #define DECLARE_CODE_AGE_BUILTIN(C, V) V(Make##C##CodeYoungAgain)
37 37
38 // CPP: Builtin in C++. Entered via BUILTIN_EXIT frame. 38 // CPP: Builtin in C++. Entered via BUILTIN_EXIT frame.
39 // Args: name 39 // Args: name
40 // API: Builtin in C++ for API callbacks. Entered via EXIT frame. 40 // API: Builtin in C++ for API callbacks. Entered via EXIT frame.
41 // Args: name 41 // Args: name
42 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function). 42 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function).
43 // Args: name, arguments count 43 // Args: name, arguments count
44 // TFS: Builtin in Turbofan, with CodeStub linkage. 44 // TFS: Builtin in Turbofan, with CodeStub linkage.
45 // Args: name, code kind, extra IC state, interface descriptor 45 // Args: name, code kind, extra IC state, interface descriptor, return_size
46 // ASM: Builtin in platform-dependent assembly. 46 // ASM: Builtin in platform-dependent assembly.
47 // Args: name 47 // Args: name
48 // ASH: Handlers implemented in platform-dependent assembly. 48 // ASH: Handlers implemented in platform-dependent assembly.
49 // Args: name, code kind, extra IC state 49 // Args: name, code kind, extra IC state
50 // DBG: Builtin in platform-dependent assembly, used by the debugger. 50 // DBG: Builtin in platform-dependent assembly, used by the debugger.
51 // Args: name 51 // Args: name
52 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ 52 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
53 ASM(Abort) \ 53 ASM(Abort) \
54 /* Code aging */ \ 54 /* Code aging */ \
55 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ 55 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \
56 \ 56 \
57 /* Declared first for dependency reasons */ \ 57 /* Declared first for dependency reasons */ \
58 ASM(CompileLazy) \ 58 ASM(CompileLazy) \
59 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion) \ 59 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \
60 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject) \ 60 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \
61 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty) \ 61 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \
62 \ 62 \
63 /* Calls */ \ 63 /* Calls */ \
64 ASM(ArgumentsAdaptorTrampoline) \ 64 ASM(ArgumentsAdaptorTrampoline) \
65 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \ 65 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \
66 ASM(CallFunction_ReceiverIsNullOrUndefined) \ 66 ASM(CallFunction_ReceiverIsNullOrUndefined) \
67 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \ 67 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \
68 ASM(CallFunction_ReceiverIsAny) \ 68 ASM(CallFunction_ReceiverIsAny) \
69 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \ 69 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \
70 ASM(TailCallFunction_ReceiverIsNotNullOrUndefined) \ 70 ASM(TailCallFunction_ReceiverIsNotNullOrUndefined) \
71 ASM(TailCallFunction_ReceiverIsAny) \ 71 ASM(TailCallFunction_ReceiverIsAny) \
(...skipping 19 matching lines...) Expand all
91 ASM(ConstructedNonConstructable) \ 91 ASM(ConstructedNonConstructable) \
92 /* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \ 92 /* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \
93 ASM(ConstructProxy) \ 93 ASM(ConstructProxy) \
94 /* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \ 94 /* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \
95 ASM(Construct) \ 95 ASM(Construct) \
96 ASM(ConstructWithSpread) \ 96 ASM(ConstructWithSpread) \
97 ASM(JSConstructStubApi) \ 97 ASM(JSConstructStubApi) \
98 ASM(JSConstructStubGeneric) \ 98 ASM(JSConstructStubGeneric) \
99 ASM(JSBuiltinsConstructStub) \ 99 ASM(JSBuiltinsConstructStub) \
100 ASM(JSBuiltinsConstructStubForDerived) \ 100 ASM(JSBuiltinsConstructStubForDerived) \
101 TFS(FastNewClosure, BUILTIN, kNoExtraICState, FastNewClosure) \ 101 TFS(FastNewClosure, BUILTIN, kNoExtraICState, FastNewClosure, 1) \
102 TFS(FastNewFunctionContextEval, BUILTIN, kNoExtraICState, \ 102 TFS(FastNewFunctionContextEval, BUILTIN, kNoExtraICState, \
103 FastNewFunctionContext) \ 103 FastNewFunctionContext, 1) \
104 TFS(FastNewFunctionContextFunction, BUILTIN, kNoExtraICState, \ 104 TFS(FastNewFunctionContextFunction, BUILTIN, kNoExtraICState, \
105 FastNewFunctionContext) \ 105 FastNewFunctionContext, 1) \
106 TFS(FastNewStrictArguments, BUILTIN, kNoExtraICState, FastNewArguments) \ 106 TFS(FastNewStrictArguments, BUILTIN, kNoExtraICState, FastNewArguments, 1) \
107 TFS(FastNewSloppyArguments, BUILTIN, kNoExtraICState, FastNewArguments) \ 107 TFS(FastNewSloppyArguments, BUILTIN, kNoExtraICState, FastNewArguments, 1) \
108 TFS(FastNewRestParameter, BUILTIN, kNoExtraICState, FastNewArguments) \ 108 TFS(FastNewRestParameter, BUILTIN, kNoExtraICState, FastNewArguments, 1) \
109 TFS(FastCloneRegExp, BUILTIN, kNoExtraICState, FastCloneRegExp) \ 109 TFS(FastCloneRegExp, BUILTIN, kNoExtraICState, FastCloneRegExp, 1) \
110 TFS(FastCloneShallowArrayTrack, BUILTIN, kNoExtraICState, \ 110 TFS(FastCloneShallowArrayTrack, BUILTIN, kNoExtraICState, \
111 FastCloneShallowArray) \ 111 FastCloneShallowArray, 1) \
112 TFS(FastCloneShallowArrayDontTrack, BUILTIN, kNoExtraICState, \ 112 TFS(FastCloneShallowArrayDontTrack, BUILTIN, kNoExtraICState, \
113 FastCloneShallowArray) \ 113 FastCloneShallowArray, 1) \
114 TFS(FastCloneShallowObject0, BUILTIN, kNoExtraICState, \ 114 TFS(FastCloneShallowObject0, BUILTIN, kNoExtraICState, \
115 FastCloneShallowObject) \ 115 FastCloneShallowObject, 1) \
116 TFS(FastCloneShallowObject1, BUILTIN, kNoExtraICState, \ 116 TFS(FastCloneShallowObject1, BUILTIN, kNoExtraICState, \
117 FastCloneShallowObject) \ 117 FastCloneShallowObject, 1) \
118 TFS(FastCloneShallowObject2, BUILTIN, kNoExtraICState, \ 118 TFS(FastCloneShallowObject2, BUILTIN, kNoExtraICState, \
119 FastCloneShallowObject) \ 119 FastCloneShallowObject, 1) \
120 TFS(FastCloneShallowObject3, BUILTIN, kNoExtraICState, \ 120 TFS(FastCloneShallowObject3, BUILTIN, kNoExtraICState, \
121 FastCloneShallowObject) \ 121 FastCloneShallowObject, 1) \
122 TFS(FastCloneShallowObject4, BUILTIN, kNoExtraICState, \ 122 TFS(FastCloneShallowObject4, BUILTIN, kNoExtraICState, \
123 FastCloneShallowObject) \ 123 FastCloneShallowObject, 1) \
124 TFS(FastCloneShallowObject5, BUILTIN, kNoExtraICState, \ 124 TFS(FastCloneShallowObject5, BUILTIN, kNoExtraICState, \
125 FastCloneShallowObject) \ 125 FastCloneShallowObject, 1) \
126 TFS(FastCloneShallowObject6, BUILTIN, kNoExtraICState, \ 126 TFS(FastCloneShallowObject6, BUILTIN, kNoExtraICState, \
127 FastCloneShallowObject) \ 127 FastCloneShallowObject, 1) \
128 \ 128 \
129 /* Apply and entries */ \ 129 /* Apply and entries */ \
130 ASM(Apply) \ 130 ASM(Apply) \
131 ASM(JSEntryTrampoline) \ 131 ASM(JSEntryTrampoline) \
132 ASM(JSConstructEntryTrampoline) \ 132 ASM(JSConstructEntryTrampoline) \
133 ASM(ResumeGeneratorTrampoline) \ 133 ASM(ResumeGeneratorTrampoline) \
134 \ 134 \
135 /* Stack and interrupt check */ \ 135 /* Stack and interrupt check */ \
136 ASM(InterruptCheck) \ 136 ASM(InterruptCheck) \
137 ASM(StackCheck) \ 137 ASM(StackCheck) \
138 \ 138 \
139 /* String helpers */ \ 139 /* String helpers */ \
140 TFS(StringCharAt, BUILTIN, kNoExtraICState, StringCharAt) \ 140 TFS(StringCharAt, BUILTIN, kNoExtraICState, StringCharAt, 1) \
141 TFS(StringCharCodeAt, BUILTIN, kNoExtraICState, StringCharCodeAt) \ 141 TFS(StringCharCodeAt, BUILTIN, kNoExtraICState, StringCharCodeAt, 1) \
142 TFS(StringEqual, BUILTIN, kNoExtraICState, Compare) \ 142 TFS(StringEqual, BUILTIN, kNoExtraICState, Compare, 1) \
143 TFS(StringGreaterThan, BUILTIN, kNoExtraICState, Compare) \ 143 TFS(StringGreaterThan, BUILTIN, kNoExtraICState, Compare, 1) \
144 TFS(StringGreaterThanOrEqual, BUILTIN, kNoExtraICState, Compare) \ 144 TFS(StringGreaterThanOrEqual, BUILTIN, kNoExtraICState, Compare, 1) \
145 TFS(StringIndexOf, BUILTIN, kNoExtraICState, StringIndexOf) \ 145 TFS(StringIndexOf, BUILTIN, kNoExtraICState, StringIndexOf, 1) \
146 TFS(StringLessThan, BUILTIN, kNoExtraICState, Compare) \ 146 TFS(StringLessThan, BUILTIN, kNoExtraICState, Compare, 1) \
147 TFS(StringLessThanOrEqual, BUILTIN, kNoExtraICState, Compare) \ 147 TFS(StringLessThanOrEqual, BUILTIN, kNoExtraICState, Compare, 1) \
148 TFS(StringNotEqual, BUILTIN, kNoExtraICState, Compare) \ 148 TFS(StringNotEqual, BUILTIN, kNoExtraICState, Compare, 1) \
149 \ 149 \
150 /* Interpreter */ \ 150 /* Interpreter */ \
151 ASM(InterpreterEntryTrampoline) \ 151 ASM(InterpreterEntryTrampoline) \
152 ASM(InterpreterPushArgsAndCall) \ 152 ASM(InterpreterPushArgsAndCall) \
153 ASM(InterpreterPushArgsAndCallFunction) \ 153 ASM(InterpreterPushArgsAndCallFunction) \
154 ASM(InterpreterPushArgsAndCallWithFinalSpread) \ 154 ASM(InterpreterPushArgsAndCallWithFinalSpread) \
155 ASM(InterpreterPushArgsAndTailCall) \ 155 ASM(InterpreterPushArgsAndTailCall) \
156 ASM(InterpreterPushArgsAndTailCallFunction) \ 156 ASM(InterpreterPushArgsAndTailCallFunction) \
157 ASM(InterpreterPushArgsAndConstruct) \ 157 ASM(InterpreterPushArgsAndConstruct) \
158 ASM(InterpreterPushArgsAndConstructFunction) \ 158 ASM(InterpreterPushArgsAndConstructFunction) \
(...skipping 24 matching lines...) Expand all
183 API(HandleApiCallAsFunction) \ 183 API(HandleApiCallAsFunction) \
184 API(HandleApiCallAsConstructor) \ 184 API(HandleApiCallAsConstructor) \
185 ASM(HandleFastApiCall) \ 185 ASM(HandleFastApiCall) \
186 \ 186 \
187 /* Adapters for Turbofan into runtime */ \ 187 /* Adapters for Turbofan into runtime */ \
188 ASM(AllocateInNewSpace) \ 188 ASM(AllocateInNewSpace) \
189 ASM(AllocateInOldSpace) \ 189 ASM(AllocateInOldSpace) \
190 \ 190 \
191 /* TurboFan support builtins */ \ 191 /* TurboFan support builtins */ \
192 TFS(CopyFastSmiOrObjectElements, BUILTIN, kNoExtraICState, \ 192 TFS(CopyFastSmiOrObjectElements, BUILTIN, kNoExtraICState, \
193 CopyFastSmiOrObjectElements) \ 193 CopyFastSmiOrObjectElements, 1) \
194 TFS(GrowFastDoubleElements, BUILTIN, kNoExtraICState, GrowArrayElements) \ 194 TFS(GrowFastDoubleElements, BUILTIN, kNoExtraICState, GrowArrayElements, 1) \
195 TFS(GrowFastSmiOrObjectElements, BUILTIN, kNoExtraICState, \ 195 TFS(GrowFastSmiOrObjectElements, BUILTIN, kNoExtraICState, \
196 GrowArrayElements) \ 196 GrowArrayElements, 1) \
197 TFS(NewUnmappedArgumentsElements, BUILTIN, kNoExtraICState, \ 197 TFS(NewUnmappedArgumentsElements, BUILTIN, kNoExtraICState, \
198 NewArgumentsElements) \ 198 NewArgumentsElements, 1) \
199 TFS(NewRestParameterElements, BUILTIN, kNoExtraICState, \ 199 TFS(NewRestParameterElements, BUILTIN, kNoExtraICState, \
200 NewArgumentsElements) \ 200 NewArgumentsElements, 1) \
201 \ 201 \
202 /* Debugger */ \ 202 /* Debugger */ \
203 DBG(FrameDropperTrampoline) \ 203 DBG(FrameDropperTrampoline) \
204 DBG(HandleDebuggerStatement) \ 204 DBG(HandleDebuggerStatement) \
205 DBG(Return_DebugBreak) \ 205 DBG(Return_DebugBreak) \
206 DBG(Slot_DebugBreak) \ 206 DBG(Slot_DebugBreak) \
207 \ 207 \
208 /* Type conversions */ \ 208 /* Type conversions */ \
209 TFS(ToBoolean, BUILTIN, kNoExtraICState, TypeConversion) \ 209 TFS(ToBoolean, BUILTIN, kNoExtraICState, TypeConversion, 1) \
210 TFS(OrdinaryToPrimitive_Number, BUILTIN, kNoExtraICState, TypeConversion) \ 210 TFS(OrdinaryToPrimitive_Number, BUILTIN, kNoExtraICState, TypeConversion, 1) \
211 TFS(OrdinaryToPrimitive_String, BUILTIN, kNoExtraICState, TypeConversion) \ 211 TFS(OrdinaryToPrimitive_String, BUILTIN, kNoExtraICState, TypeConversion, 1) \
212 TFS(NonPrimitiveToPrimitive_Default, BUILTIN, kNoExtraICState, \ 212 TFS(NonPrimitiveToPrimitive_Default, BUILTIN, kNoExtraICState, \
213 TypeConversion) \ 213 TypeConversion, 1) \
214 TFS(NonPrimitiveToPrimitive_Number, BUILTIN, kNoExtraICState, \ 214 TFS(NonPrimitiveToPrimitive_Number, BUILTIN, kNoExtraICState, \
215 TypeConversion) \ 215 TypeConversion, 1) \
216 TFS(NonPrimitiveToPrimitive_String, BUILTIN, kNoExtraICState, \ 216 TFS(NonPrimitiveToPrimitive_String, BUILTIN, kNoExtraICState, \
217 TypeConversion) \ 217 TypeConversion, 1) \
218 TFS(StringToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ 218 TFS(StringToNumber, BUILTIN, kNoExtraICState, TypeConversion, 1) \
219 TFS(ToName, BUILTIN, kNoExtraICState, TypeConversion) \ 219 TFS(ToName, BUILTIN, kNoExtraICState, TypeConversion, 1) \
220 TFS(NonNumberToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ 220 TFS(NonNumberToNumber, BUILTIN, kNoExtraICState, TypeConversion, 1) \
221 TFS(ToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ 221 TFS(ToNumber, BUILTIN, kNoExtraICState, TypeConversion, 1) \
222 TFS(ToString, BUILTIN, kNoExtraICState, TypeConversion) \ 222 TFS(ToString, BUILTIN, kNoExtraICState, TypeConversion, 1) \
223 TFS(ToInteger, BUILTIN, kNoExtraICState, TypeConversion) \ 223 TFS(ToInteger, BUILTIN, kNoExtraICState, TypeConversion, 1) \
224 TFS(ToLength, BUILTIN, kNoExtraICState, TypeConversion) \ 224 TFS(ToLength, BUILTIN, kNoExtraICState, TypeConversion, 1) \
225 TFS(ClassOf, BUILTIN, kNoExtraICState, Typeof) \ 225 TFS(ClassOf, BUILTIN, kNoExtraICState, Typeof, 1) \
226 TFS(Typeof, BUILTIN, kNoExtraICState, Typeof) \ 226 TFS(Typeof, BUILTIN, kNoExtraICState, Typeof, 1) \
227 TFS(GetSuperConstructor, BUILTIN, kNoExtraICState, TypeConversion) \ 227 TFS(GetSuperConstructor, BUILTIN, kNoExtraICState, TypeConversion, 1) \
228 \ 228 \
229 /* Handlers */ \ 229 /* Handlers */ \
230 TFS(LoadICProtoArray, BUILTIN, kNoExtraICState, LoadICProtoArray) \ 230 TFS(LoadICProtoArray, BUILTIN, kNoExtraICState, LoadICProtoArray, 1) \
231 TFS(LoadICProtoArrayThrowIfNonexistent, BUILTIN, kNoExtraICState, \ 231 TFS(LoadICProtoArrayThrowIfNonexistent, BUILTIN, kNoExtraICState, \
232 LoadICProtoArray) \ 232 LoadICProtoArray, 1) \
233 TFS(KeyedLoadIC_Megamorphic, BUILTIN, kNoExtraICState, LoadWithVector) \ 233 TFS(KeyedLoadIC_Megamorphic, BUILTIN, kNoExtraICState, LoadWithVector, 1) \
234 TFS(KeyedLoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ 234 TFS(KeyedLoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector, 1) \
235 TFS(KeyedLoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ 235 TFS(KeyedLoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector, 1) \
236 TFS(KeyedStoreIC_Megamorphic, BUILTIN, kNoExtraICState, StoreWithVector) \ 236 TFS(KeyedStoreIC_Megamorphic, BUILTIN, kNoExtraICState, StoreWithVector, 1) \
237 TFS(KeyedStoreIC_Megamorphic_Strict, BUILTIN, kNoExtraICState, \ 237 TFS(KeyedStoreIC_Megamorphic_Strict, BUILTIN, kNoExtraICState, \
238 StoreWithVector) \ 238 StoreWithVector, 1) \
239 TFS(KeyedStoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \ 239 TFS(KeyedStoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector, 1) \
240 TFS(KeyedStoreIC_Slow, HANDLER, Code::STORE_IC, StoreWithVector) \ 240 TFS(KeyedStoreIC_Slow, HANDLER, Code::STORE_IC, StoreWithVector, 1) \
241 TFS(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \ 241 TFS(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector, 1) \
242 TFS(LoadGlobalIC_Slow, HANDLER, Code::LOAD_GLOBAL_IC, LoadGlobalWithVector) \ 242 TFS(LoadGlobalIC_Slow, HANDLER, Code::LOAD_GLOBAL_IC, LoadGlobalWithVector, \
243 TFS(LoadField, BUILTIN, kNoExtraICState, LoadField) \ 243 1) \
244 TFS(LoadField, BUILTIN, kNoExtraICState, LoadField, 1) \
244 ASH(LoadIC_Getter_ForDeopt, BUILTIN, kNoExtraICState) \ 245 ASH(LoadIC_Getter_ForDeopt, BUILTIN, kNoExtraICState) \
245 TFS(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ 246 TFS(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector, 1) \
246 TFS(LoadIC_Normal, HANDLER, Code::LOAD_IC, LoadWithVector) \ 247 TFS(LoadIC_Normal, HANDLER, Code::LOAD_IC, LoadWithVector, 1) \
247 TFS(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ 248 TFS(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector, 1) \
248 TFS(StoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \ 249 TFS(StoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector, 1) \
249 TFS(StoreIC_Normal, HANDLER, Code::STORE_IC, StoreWithVector) \ 250 TFS(StoreIC_Normal, HANDLER, Code::STORE_IC, StoreWithVector, 1) \
250 ASH(StoreIC_Setter_ForDeopt, BUILTIN, kNoExtraICState) \ 251 ASH(StoreIC_Setter_ForDeopt, BUILTIN, kNoExtraICState) \
251 \ 252 \
252 /* Built-in functions for Javascript */ \ 253 /* Built-in functions for Javascript */ \
253 /* Special internal builtins */ \ 254 /* Special internal builtins */ \
254 CPP(EmptyFunction) \ 255 CPP(EmptyFunction) \
255 CPP(Illegal) \ 256 CPP(Illegal) \
256 CPP(RestrictedFunctionPropertiesThrower) \ 257 CPP(RestrictedFunctionPropertiesThrower) \
257 CPP(RestrictedStrictArgumentsPropertiesThrower) \ 258 CPP(RestrictedStrictArgumentsPropertiesThrower) \
258 CPP(UnsupportedThrower) \ 259 CPP(UnsupportedThrower) \
259 TFJ(ReturnReceiver, 0) \ 260 TFJ(ReturnReceiver, 0) \
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 CPP(FunctionPrototypeBind) \ 434 CPP(FunctionPrototypeBind) \
434 TFJ(FastFunctionPrototypeBind, \ 435 TFJ(FastFunctionPrototypeBind, \
435 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 436 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
436 ASM(FunctionPrototypeCall) \ 437 ASM(FunctionPrototypeCall) \
437 /* ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) */ \ 438 /* ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) */ \
438 TFJ(FunctionPrototypeHasInstance, 1) \ 439 TFJ(FunctionPrototypeHasInstance, 1) \
439 CPP(FunctionPrototypeToString) \ 440 CPP(FunctionPrototypeToString) \
440 \ 441 \
441 /* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \ 442 /* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \
442 TFS(CreateIterResultObject, BUILTIN, kNoExtraICState, \ 443 TFS(CreateIterResultObject, BUILTIN, kNoExtraICState, \
443 CreateIterResultObject) \ 444 CreateIterResultObject, 1) \
444 \ 445 \
445 /* Generator and Async */ \ 446 /* Generator and Async */ \
446 CPP(GeneratorFunctionConstructor) \ 447 CPP(GeneratorFunctionConstructor) \
447 /* ES6 section 25.3.1.2 Generator.prototype.next ( value ) */ \ 448 /* ES6 section 25.3.1.2 Generator.prototype.next ( value ) */ \
448 TFJ(GeneratorPrototypeNext, 1) \ 449 TFJ(GeneratorPrototypeNext, 1) \
449 /* ES6 section 25.3.1.3 Generator.prototype.return ( value ) */ \ 450 /* ES6 section 25.3.1.3 Generator.prototype.return ( value ) */ \
450 TFJ(GeneratorPrototypeReturn, 1) \ 451 TFJ(GeneratorPrototypeReturn, 1) \
451 /* ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) */ \ 452 /* ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) */ \
452 TFJ(GeneratorPrototypeThrow, 1) \ 453 TFJ(GeneratorPrototypeThrow, 1) \
453 CPP(AsyncFunctionConstructor) \ 454 CPP(AsyncFunctionConstructor) \
454 \ 455 \
455 /* Global object */ \ 456 /* Global object */ \
456 CPP(GlobalDecodeURI) \ 457 CPP(GlobalDecodeURI) \
457 CPP(GlobalDecodeURIComponent) \ 458 CPP(GlobalDecodeURIComponent) \
458 CPP(GlobalEncodeURI) \ 459 CPP(GlobalEncodeURI) \
459 CPP(GlobalEncodeURIComponent) \ 460 CPP(GlobalEncodeURIComponent) \
460 CPP(GlobalEscape) \ 461 CPP(GlobalEscape) \
461 CPP(GlobalUnescape) \ 462 CPP(GlobalUnescape) \
462 CPP(GlobalEval) \ 463 CPP(GlobalEval) \
463 /* ES6 section 18.2.2 isFinite ( number ) */ \ 464 /* ES6 section 18.2.2 isFinite ( number ) */ \
464 TFJ(GlobalIsFinite, 1) \ 465 TFJ(GlobalIsFinite, 1) \
465 /* ES6 section 18.2.3 isNaN ( number ) */ \ 466 /* ES6 section 18.2.3 isNaN ( number ) */ \
466 TFJ(GlobalIsNaN, 1) \ 467 TFJ(GlobalIsNaN, 1) \
467 \ 468 \
468 /* JSON */ \ 469 /* JSON */ \
469 CPP(JsonParse) \ 470 CPP(JsonParse) \
470 CPP(JsonStringify) \ 471 CPP(JsonStringify) \
471 \ 472 \
472 /* ICs */ \ 473 /* ICs */ \
473 TFS(LoadIC, LOAD_IC, kNoExtraICState, LoadWithVector) \ 474 TFS(LoadIC, LOAD_IC, kNoExtraICState, LoadWithVector, 1) \
474 TFS(LoadICTrampoline, LOAD_IC, kNoExtraICState, Load) \ 475 TFS(LoadICTrampoline, LOAD_IC, kNoExtraICState, Load, 1) \
475 TFS(KeyedLoadIC, KEYED_LOAD_IC, kNoExtraICState, LoadWithVector) \ 476 TFS(KeyedLoadIC, KEYED_LOAD_IC, kNoExtraICState, LoadWithVector, 1) \
476 TFS(KeyedLoadICTrampoline, KEYED_LOAD_IC, kNoExtraICState, Load) \ 477 TFS(KeyedLoadICTrampoline, KEYED_LOAD_IC, kNoExtraICState, Load, 1) \
477 TFS(StoreIC, STORE_IC, kNoExtraICState, StoreWithVector) \ 478 TFS(StoreIC, STORE_IC, kNoExtraICState, StoreWithVector, 1) \
478 TFS(StoreICTrampoline, STORE_IC, kNoExtraICState, Store) \ 479 TFS(StoreICTrampoline, STORE_IC, kNoExtraICState, Store, 1) \
479 TFS(StoreICStrict, STORE_IC, kNoExtraICState, StoreWithVector) \ 480 TFS(StoreICStrict, STORE_IC, kNoExtraICState, StoreWithVector, 1) \
480 TFS(StoreICStrictTrampoline, STORE_IC, kNoExtraICState, Store) \ 481 TFS(StoreICStrictTrampoline, STORE_IC, kNoExtraICState, Store, 1) \
481 TFS(KeyedStoreIC, KEYED_STORE_IC, kNoExtraICState, StoreWithVector) \ 482 TFS(KeyedStoreIC, KEYED_STORE_IC, kNoExtraICState, StoreWithVector, 1) \
482 TFS(KeyedStoreICTrampoline, KEYED_STORE_IC, kNoExtraICState, Store) \ 483 TFS(KeyedStoreICTrampoline, KEYED_STORE_IC, kNoExtraICState, Store, 1) \
483 TFS(KeyedStoreICStrict, KEYED_STORE_IC, kNoExtraICState, StoreWithVector) \ 484 TFS(KeyedStoreICStrict, KEYED_STORE_IC, kNoExtraICState, StoreWithVector, 1) \
484 TFS(KeyedStoreICStrictTrampoline, KEYED_STORE_IC, kNoExtraICState, Store) \ 485 TFS(KeyedStoreICStrictTrampoline, KEYED_STORE_IC, kNoExtraICState, Store, 1) \
485 TFS(LoadGlobalIC, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobalWithVector) \ 486 TFS(LoadGlobalIC, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobalWithVector, 1) \
486 TFS(LoadGlobalICInsideTypeof, LOAD_GLOBAL_IC, kNoExtraICState, \ 487 TFS(LoadGlobalICInsideTypeof, LOAD_GLOBAL_IC, kNoExtraICState, \
487 LoadGlobalWithVector) \ 488 LoadGlobalWithVector, 1) \
488 TFS(LoadGlobalICTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobal) \ 489 TFS(LoadGlobalICTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobal, 1) \
489 TFS(LoadGlobalICInsideTypeofTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, \ 490 TFS(LoadGlobalICInsideTypeofTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, \
490 LoadGlobal) \ 491 LoadGlobal, 1) \
491 \ 492 \
492 /* Math */ \ 493 /* Math */ \
493 /* ES6 section 20.2.2.1 Math.abs ( x ) */ \ 494 /* ES6 section 20.2.2.1 Math.abs ( x ) */ \
494 TFJ(MathAbs, 1) \ 495 TFJ(MathAbs, 1) \
495 /* ES6 section 20.2.2.2 Math.acos ( x ) */ \ 496 /* ES6 section 20.2.2.2 Math.acos ( x ) */ \
496 TFJ(MathAcos, 1) \ 497 TFJ(MathAcos, 1) \
497 /* ES6 section 20.2.2.3 Math.acosh ( x ) */ \ 498 /* ES6 section 20.2.2.3 Math.acosh ( x ) */ \
498 TFJ(MathAcosh, 1) \ 499 TFJ(MathAcosh, 1) \
499 /* ES6 section 20.2.2.4 Math.asin ( x ) */ \ 500 /* ES6 section 20.2.2.4 Math.asin ( x ) */ \
500 TFJ(MathAsin, 1) \ 501 TFJ(MathAsin, 1) \
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 TFJ(NumberParseFloat, 1) \ 579 TFJ(NumberParseFloat, 1) \
579 /* ES6 section 20.1.2.13 Number.parseInt ( string, radix ) */ \ 580 /* ES6 section 20.1.2.13 Number.parseInt ( string, radix ) */ \
580 TFJ(NumberParseInt, 2) \ 581 TFJ(NumberParseInt, 2) \
581 CPP(NumberPrototypeToExponential) \ 582 CPP(NumberPrototypeToExponential) \
582 CPP(NumberPrototypeToFixed) \ 583 CPP(NumberPrototypeToFixed) \
583 CPP(NumberPrototypeToLocaleString) \ 584 CPP(NumberPrototypeToLocaleString) \
584 CPP(NumberPrototypeToPrecision) \ 585 CPP(NumberPrototypeToPrecision) \
585 CPP(NumberPrototypeToString) \ 586 CPP(NumberPrototypeToString) \
586 /* ES6 section 20.1.3.7 Number.prototype.valueOf ( ) */ \ 587 /* ES6 section 20.1.3.7 Number.prototype.valueOf ( ) */ \
587 TFJ(NumberPrototypeValueOf, 0) \ 588 TFJ(NumberPrototypeValueOf, 0) \
588 TFS(Add, BUILTIN, kNoExtraICState, BinaryOp) \ 589 TFS(Add, BUILTIN, kNoExtraICState, BinaryOp, 1) \
589 TFS(Subtract, BUILTIN, kNoExtraICState, BinaryOp) \ 590 TFS(Subtract, BUILTIN, kNoExtraICState, BinaryOp, 1) \
590 TFS(Multiply, BUILTIN, kNoExtraICState, BinaryOp) \ 591 TFS(Multiply, BUILTIN, kNoExtraICState, BinaryOp, 1) \
591 TFS(Divide, BUILTIN, kNoExtraICState, BinaryOp) \ 592 TFS(Divide, BUILTIN, kNoExtraICState, BinaryOp, 1) \
592 TFS(Modulus, BUILTIN, kNoExtraICState, BinaryOp) \ 593 TFS(Modulus, BUILTIN, kNoExtraICState, BinaryOp, 1) \
593 TFS(BitwiseAnd, BUILTIN, kNoExtraICState, BinaryOp) \ 594 TFS(BitwiseAnd, BUILTIN, kNoExtraICState, BinaryOp, 1) \
594 TFS(BitwiseOr, BUILTIN, kNoExtraICState, BinaryOp) \ 595 TFS(BitwiseOr, BUILTIN, kNoExtraICState, BinaryOp, 1) \
595 TFS(BitwiseXor, BUILTIN, kNoExtraICState, BinaryOp) \ 596 TFS(BitwiseXor, BUILTIN, kNoExtraICState, BinaryOp, 1) \
596 TFS(ShiftLeft, BUILTIN, kNoExtraICState, BinaryOp) \ 597 TFS(ShiftLeft, BUILTIN, kNoExtraICState, BinaryOp, 1) \
597 TFS(ShiftRight, BUILTIN, kNoExtraICState, BinaryOp) \ 598 TFS(ShiftRight, BUILTIN, kNoExtraICState, BinaryOp, 1) \
598 TFS(ShiftRightLogical, BUILTIN, kNoExtraICState, BinaryOp) \ 599 TFS(ShiftRightLogical, BUILTIN, kNoExtraICState, BinaryOp, 1) \
599 TFS(LessThan, BUILTIN, kNoExtraICState, Compare) \ 600 TFS(LessThan, BUILTIN, kNoExtraICState, Compare, 1) \
600 TFS(LessThanOrEqual, BUILTIN, kNoExtraICState, Compare) \ 601 TFS(LessThanOrEqual, BUILTIN, kNoExtraICState, Compare, 1) \
601 TFS(GreaterThan, BUILTIN, kNoExtraICState, Compare) \ 602 TFS(GreaterThan, BUILTIN, kNoExtraICState, Compare, 1) \
602 TFS(GreaterThanOrEqual, BUILTIN, kNoExtraICState, Compare) \ 603 TFS(GreaterThanOrEqual, BUILTIN, kNoExtraICState, Compare, 1) \
603 TFS(Equal, BUILTIN, kNoExtraICState, Compare) \ 604 TFS(Equal, BUILTIN, kNoExtraICState, Compare, 1) \
604 TFS(NotEqual, BUILTIN, kNoExtraICState, Compare) \ 605 TFS(NotEqual, BUILTIN, kNoExtraICState, Compare, 1) \
605 TFS(StrictEqual, BUILTIN, kNoExtraICState, Compare) \ 606 TFS(StrictEqual, BUILTIN, kNoExtraICState, Compare, 1) \
606 TFS(StrictNotEqual, BUILTIN, kNoExtraICState, Compare) \ 607 TFS(StrictNotEqual, BUILTIN, kNoExtraICState, Compare, 1) \
607 \ 608 \
608 /* Object */ \ 609 /* Object */ \
609 CPP(ObjectAssign) \ 610 CPP(ObjectAssign) \
610 TFJ(ObjectCreate, 2) \ 611 TFJ(ObjectCreate, 2) \
611 CPP(ObjectDefineGetter) \ 612 CPP(ObjectDefineGetter) \
612 CPP(ObjectDefineProperties) \ 613 CPP(ObjectDefineProperties) \
613 CPP(ObjectDefineProperty) \ 614 CPP(ObjectDefineProperty) \
614 CPP(ObjectDefineSetter) \ 615 CPP(ObjectDefineSetter) \
615 CPP(ObjectEntries) \ 616 CPP(ObjectEntries) \
616 CPP(ObjectFreeze) \ 617 CPP(ObjectFreeze) \
(...skipping 14 matching lines...) Expand all
631 CPP(ObjectLookupSetter) \ 632 CPP(ObjectLookupSetter) \
632 CPP(ObjectPreventExtensions) \ 633 CPP(ObjectPreventExtensions) \
633 /* ES6 section 19.1.3.6 Object.prototype.toString () */ \ 634 /* ES6 section 19.1.3.6 Object.prototype.toString () */ \
634 TFJ(ObjectProtoToString, 0) \ 635 TFJ(ObjectProtoToString, 0) \
635 CPP(ObjectPrototypePropertyIsEnumerable) \ 636 CPP(ObjectPrototypePropertyIsEnumerable) \
636 CPP(ObjectPrototypeGetProto) \ 637 CPP(ObjectPrototypeGetProto) \
637 CPP(ObjectPrototypeSetProto) \ 638 CPP(ObjectPrototypeSetProto) \
638 CPP(ObjectSeal) \ 639 CPP(ObjectSeal) \
639 CPP(ObjectValues) \ 640 CPP(ObjectValues) \
640 \ 641 \
641 TFS(InstanceOf, BUILTIN, kNoExtraICState, Compare) \ 642 TFS(InstanceOf, BUILTIN, kNoExtraICState, Compare, 1) \
642 TFS(OrdinaryHasInstance, BUILTIN, kNoExtraICState, Compare) \ 643 TFS(OrdinaryHasInstance, BUILTIN, kNoExtraICState, Compare, 1) \
643 TFS(ForInFilter, BUILTIN, kNoExtraICState, ForInFilter) \ 644 TFS(ForInFilter, BUILTIN, kNoExtraICState, ForInFilter, 1) \
645 TFS(ForInNext, BUILTIN, kNoExtraICState, ForInNext, 1) \
646 TFS(ForInPrepare, BUILTIN, kNoExtraICState, ForInPrepare, 3) \
644 \ 647 \
645 /* Promise */ \ 648 /* Promise */ \
646 TFJ(PromiseGetCapabilitiesExecutor, 2) \ 649 TFJ(PromiseGetCapabilitiesExecutor, 2) \
647 TFJ(NewPromiseCapability, 2) \ 650 TFJ(NewPromiseCapability, 2) \
648 TFJ(PromiseConstructor, 1) \ 651 TFJ(PromiseConstructor, 1) \
649 TFJ(PromiseInternalConstructor, 1) \ 652 TFJ(PromiseInternalConstructor, 1) \
650 TFJ(IsPromise, 1) \ 653 TFJ(IsPromise, 1) \
651 TFJ(PromiseResolveClosure, 1) \ 654 TFJ(PromiseResolveClosure, 1) \
652 TFJ(PromiseRejectClosure, 1) \ 655 TFJ(PromiseRejectClosure, 1) \
653 TFJ(PromiseThen, 2) \ 656 TFJ(PromiseThen, 2) \
654 TFJ(PromiseCatch, 1) \ 657 TFJ(PromiseCatch, 1) \
655 TFJ(ResolvePromise, 2) \ 658 TFJ(ResolvePromise, 2) \
656 TFS(PromiseHandleReject, BUILTIN, kNoExtraICState, PromiseHandleReject) \ 659 TFS(PromiseHandleReject, BUILTIN, kNoExtraICState, PromiseHandleReject, 1) \
657 TFJ(PromiseHandle, 5) \ 660 TFJ(PromiseHandle, 5) \
658 TFJ(PromiseResolve, 1) \ 661 TFJ(PromiseResolve, 1) \
659 TFJ(PromiseReject, 1) \ 662 TFJ(PromiseReject, 1) \
660 TFJ(InternalPromiseReject, 3) \ 663 TFJ(InternalPromiseReject, 3) \
661 \ 664 \
662 /* Proxy */ \ 665 /* Proxy */ \
663 CPP(ProxyConstructor) \ 666 CPP(ProxyConstructor) \
664 CPP(ProxyConstructor_ConstructStub) \ 667 CPP(ProxyConstructor_ConstructStub) \
665 \ 668 \
666 /* Reflect */ \ 669 /* Reflect */ \
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 TFJ(RegExpPrototypeMatch, 1) \ 706 TFJ(RegExpPrototypeMatch, 1) \
704 TFJ(RegExpPrototypeMultilineGetter, 0) \ 707 TFJ(RegExpPrototypeMultilineGetter, 0) \
705 TFJ(RegExpPrototypeSearch, 1) \ 708 TFJ(RegExpPrototypeSearch, 1) \
706 TFJ(RegExpPrototypeSourceGetter, 0) \ 709 TFJ(RegExpPrototypeSourceGetter, 0) \
707 TFJ(RegExpPrototypeStickyGetter, 0) \ 710 TFJ(RegExpPrototypeStickyGetter, 0) \
708 TFJ(RegExpPrototypeTest, 1) \ 711 TFJ(RegExpPrototypeTest, 1) \
709 CPP(RegExpPrototypeToString) \ 712 CPP(RegExpPrototypeToString) \
710 TFJ(RegExpPrototypeUnicodeGetter, 0) \ 713 TFJ(RegExpPrototypeUnicodeGetter, 0) \
711 CPP(RegExpRightContextGetter) \ 714 CPP(RegExpRightContextGetter) \
712 \ 715 \
713 TFS(RegExpReplace, BUILTIN, kNoExtraICState, RegExpReplace) \ 716 TFS(RegExpReplace, BUILTIN, kNoExtraICState, RegExpReplace, 1) \
714 TFJ(RegExpPrototypeReplace, 2) \ 717 TFJ(RegExpPrototypeReplace, 2) \
715 \ 718 \
716 TFS(RegExpSplit, BUILTIN, kNoExtraICState, RegExpSplit) \ 719 TFS(RegExpSplit, BUILTIN, kNoExtraICState, RegExpSplit, 1) \
717 TFJ(RegExpPrototypeSplit, 2) \ 720 TFJ(RegExpPrototypeSplit, 2) \
718 \ 721 \
719 /* SharedArrayBuffer */ \ 722 /* SharedArrayBuffer */ \
720 CPP(SharedArrayBufferPrototypeGetByteLength) \ 723 CPP(SharedArrayBufferPrototypeGetByteLength) \
721 TFJ(AtomicsLoad, 2) \ 724 TFJ(AtomicsLoad, 2) \
722 TFJ(AtomicsStore, 3) \ 725 TFJ(AtomicsStore, 3) \
723 \ 726 \
724 /* String */ \ 727 /* String */ \
725 ASM(StringConstructor) \ 728 ASM(StringConstructor) \
726 ASM(StringConstructor_ConstructStub) \ 729 ASM(StringConstructor_ConstructStub) \
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 951
949 friend class Isolate; 952 friend class Isolate;
950 953
951 DISALLOW_COPY_AND_ASSIGN(Builtins); 954 DISALLOW_COPY_AND_ASSIGN(Builtins);
952 }; 955 };
953 956
954 } // namespace internal 957 } // namespace internal
955 } // namespace v8 958 } // namespace v8
956 959
957 #endif // V8_BUILTINS_BUILTINS_H_ 960 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.cc » ('j') | src/builtins/builtins-object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698