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

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

Issue 2784793002: [builtins] Extract builtin definitions (Closed)
Patch Set: Fixes Created 3 years, 8 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 | « BUILD.gn ('k') | src/builtins/builtins-definitions.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 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/builtins/builtins-definitions.h"
9 #include "src/globals.h" 10 #include "src/globals.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 14
14 class Callable; 15 class Callable;
15 template <typename T> 16 template <typename T>
16 class Handle; 17 class Handle;
17 class Isolate; 18 class Isolate;
18 19
19 #define CODE_AGE_LIST_WITH_ARG(V, A) \
20 V(Quadragenarian, A) \
21 V(Quinquagenarian, A) \
22 V(Sexagenarian, A) \
23 V(Septuagenarian, A) \
24 V(Octogenarian, A)
25
26 #define CODE_AGE_LIST_IGNORE_ARG(X, V) V(X)
27
28 #define CODE_AGE_LIST(V) CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V)
29
30 #define CODE_AGE_LIST_COMPLETE(V) \
31 V(ToBeExecutedOnce) \
32 V(NotExecuted) \
33 V(ExecutedOnce) \
34 V(NoAge) \
35 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V)
36
37 #define DECLARE_CODE_AGE_BUILTIN(C, V) V(Make##C##CodeYoungAgain)
38
39 // CPP: Builtin in C++. Entered via BUILTIN_EXIT frame.
40 // Args: name
41 // API: Builtin in C++ for API callbacks. Entered via EXIT frame.
42 // Args: name
43 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function).
44 // Args: name, arguments count, explicit argument names...
45 // TFS: Builtin in Turbofan, with CodeStub linkage.
46 // Args: name, interface descriptor, return_size
47 // TFH: Handlers in Turbofan, with CodeStub linkage.
48 // Args: name, code kind, extra IC state, interface descriptor
49 // ASM: Builtin in platform-dependent assembly.
50 // Args: name
51 // DBG: Builtin in platform-dependent assembly, used by the debugger.
52 // Args: name
53
54 #define BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, TFH, ASM, DBG) \
55 ASM(Abort) \
56 /* Code aging */ \
57 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \
58 \
59 /* Declared first for dependency reasons */ \
60 ASM(CompileLazy) \
61 TFS(ToObject, TypeConversion, 1) \
62 TFS(FastNewObject, FastNewObject, 1) \
63 TFS(HasProperty, HasProperty, 1) \
64 \
65 /* Calls */ \
66 ASM(ArgumentsAdaptorTrampoline) \
67 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \
68 ASM(CallFunction_ReceiverIsNullOrUndefined) \
69 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \
70 ASM(CallFunction_ReceiverIsAny) \
71 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \
72 ASM(TailCallFunction_ReceiverIsNotNullOrUndefined) \
73 ASM(TailCallFunction_ReceiverIsAny) \
74 /* ES6 section 9.4.1.1 [[Call]] ( thisArgument, argumentsList) */ \
75 ASM(CallBoundFunction) \
76 ASM(TailCallBoundFunction) \
77 /* ES6 section 7.3.12 Call(F, V, [argumentsList]) */ \
78 ASM(Call_ReceiverIsNullOrUndefined) \
79 ASM(Call_ReceiverIsNotNullOrUndefined) \
80 ASM(Call_ReceiverIsAny) \
81 ASM(TailCall_ReceiverIsNullOrUndefined) \
82 ASM(TailCall_ReceiverIsNotNullOrUndefined) \
83 ASM(TailCall_ReceiverIsAny) \
84 ASM(CallWithSpread) \
85 ASM(CallForwardVarargs) \
86 ASM(CallFunctionForwardVarargs) \
87 \
88 /* Construct */ \
89 /* ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) */ \
90 ASM(ConstructFunction) \
91 /* ES6 section 9.4.1.2 [[Construct]] (argumentsList, newTarget) */ \
92 ASM(ConstructBoundFunction) \
93 ASM(ConstructedNonConstructable) \
94 /* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \
95 ASM(ConstructProxy) \
96 /* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \
97 ASM(Construct) \
98 ASM(ConstructWithSpread) \
99 ASM(JSConstructStubApi) \
100 ASM(JSConstructStubGeneric) \
101 ASM(JSBuiltinsConstructStub) \
102 ASM(JSBuiltinsConstructStubForDerived) \
103 TFS(FastNewClosure, FastNewClosure, 1) \
104 TFS(FastNewFunctionContextEval, FastNewFunctionContext, 1) \
105 TFS(FastNewFunctionContextFunction, FastNewFunctionContext, 1) \
106 TFS(FastNewStrictArguments, FastNewArguments, 1) \
107 TFS(FastNewSloppyArguments, FastNewArguments, 1) \
108 TFS(FastNewRestParameter, FastNewArguments, 1) \
109 TFS(FastCloneRegExp, FastCloneRegExp, 1) \
110 TFS(FastCloneShallowArrayTrack, FastCloneShallowArray, 1) \
111 TFS(FastCloneShallowArrayDontTrack, FastCloneShallowArray, 1) \
112 TFS(FastCloneShallowObject0, FastCloneShallowObject, 1) \
113 TFS(FastCloneShallowObject1, FastCloneShallowObject, 1) \
114 TFS(FastCloneShallowObject2, FastCloneShallowObject, 1) \
115 TFS(FastCloneShallowObject3, FastCloneShallowObject, 1) \
116 TFS(FastCloneShallowObject4, FastCloneShallowObject, 1) \
117 TFS(FastCloneShallowObject5, FastCloneShallowObject, 1) \
118 TFS(FastCloneShallowObject6, FastCloneShallowObject, 1) \
119 \
120 /* Apply and entries */ \
121 ASM(Apply) \
122 ASM(JSEntryTrampoline) \
123 ASM(JSConstructEntryTrampoline) \
124 ASM(ResumeGeneratorTrampoline) \
125 \
126 /* Stack and interrupt check */ \
127 ASM(InterruptCheck) \
128 ASM(StackCheck) \
129 \
130 /* String helpers */ \
131 TFS(StringCharAt, StringCharAt, 1) \
132 TFS(StringCharCodeAt, StringCharCodeAt, 1) \
133 TFS(StringEqual, Compare, 1) \
134 TFS(StringGreaterThan, Compare, 1) \
135 TFS(StringGreaterThanOrEqual, Compare, 1) \
136 TFS(StringIndexOf, StringIndexOf, 1) \
137 TFS(StringLessThan, Compare, 1) \
138 TFS(StringLessThanOrEqual, Compare, 1) \
139 \
140 /* Interpreter */ \
141 ASM(InterpreterEntryTrampoline) \
142 ASM(InterpreterPushArgsAndCall) \
143 ASM(InterpreterPushArgsAndCallFunction) \
144 ASM(InterpreterPushArgsAndCallWithFinalSpread) \
145 ASM(InterpreterPushArgsAndTailCall) \
146 ASM(InterpreterPushArgsAndTailCallFunction) \
147 ASM(InterpreterPushArgsAndConstruct) \
148 ASM(InterpreterPushArgsAndConstructFunction) \
149 ASM(InterpreterPushArgsAndConstructArray) \
150 ASM(InterpreterPushArgsAndConstructWithFinalSpread) \
151 ASM(InterpreterEnterBytecodeAdvance) \
152 ASM(InterpreterEnterBytecodeDispatch) \
153 ASM(InterpreterOnStackReplacement) \
154 \
155 /* Code life-cycle */ \
156 ASM(CompileOptimized) \
157 ASM(CompileOptimizedConcurrent) \
158 ASM(InOptimizationQueue) \
159 ASM(InstantiateAsmJs) \
160 ASM(MarkCodeAsToBeExecutedOnce) \
161 ASM(MarkCodeAsExecutedOnce) \
162 ASM(MarkCodeAsExecutedTwice) \
163 ASM(NotifyDeoptimized) \
164 ASM(NotifySoftDeoptimized) \
165 ASM(NotifyLazyDeoptimized) \
166 ASM(NotifyStubFailure) \
167 ASM(NotifyStubFailureSaveDoubles) \
168 ASM(OnStackReplacement) \
169 \
170 /* API callback handling */ \
171 API(HandleApiCall) \
172 API(HandleApiCallAsFunction) \
173 API(HandleApiCallAsConstructor) \
174 \
175 /* Adapters for Turbofan into runtime */ \
176 ASM(AllocateInNewSpace) \
177 ASM(AllocateInOldSpace) \
178 \
179 /* TurboFan support builtins */ \
180 TFS(CopyFastSmiOrObjectElements, CopyFastSmiOrObjectElements, 1) \
181 TFS(GrowFastDoubleElements, GrowArrayElements, 1) \
182 TFS(GrowFastSmiOrObjectElements, GrowArrayElements, 1) \
183 TFS(NewUnmappedArgumentsElements, NewArgumentsElements, 1) \
184 \
185 /* Debugger */ \
186 DBG(FrameDropperTrampoline) \
187 DBG(HandleDebuggerStatement) \
188 DBG(Return_DebugBreak) \
189 DBG(Slot_DebugBreak) \
190 \
191 /* Type conversions */ \
192 TFS(ToBoolean, TypeConversion, 1) \
193 TFS(OrdinaryToPrimitive_Number, TypeConversion, 1) \
194 TFS(OrdinaryToPrimitive_String, TypeConversion, 1) \
195 TFS(NonPrimitiveToPrimitive_Default, TypeConversion, 1) \
196 TFS(NonPrimitiveToPrimitive_Number, TypeConversion, 1) \
197 TFS(NonPrimitiveToPrimitive_String, TypeConversion, 1) \
198 TFS(StringToNumber, TypeConversion, 1) \
199 TFS(ToName, TypeConversion, 1) \
200 TFS(NonNumberToNumber, TypeConversion, 1) \
201 TFS(ToNumber, TypeConversion, 1) \
202 TFS(ToString, TypeConversion, 1) \
203 TFS(ToInteger, TypeConversion, 1) \
204 TFS(ToLength, TypeConversion, 1) \
205 TFS(ClassOf, Typeof, 1) \
206 TFS(Typeof, Typeof, 1) \
207 TFS(GetSuperConstructor, Typeof, 1) \
208 \
209 /* Handlers */ \
210 TFH(LoadICProtoArray, BUILTIN, kNoExtraICState, LoadICProtoArray) \
211 TFH(LoadICProtoArrayThrowIfNonexistent, BUILTIN, kNoExtraICState, \
212 LoadICProtoArray) \
213 TFH(KeyedLoadIC_Megamorphic, BUILTIN, kNoExtraICState, LoadWithVector) \
214 TFH(KeyedLoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \
215 TFH(KeyedLoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \
216 TFH(KeyedLoadIC_IndexedString, HANDLER, Code::LOAD_IC, LoadWithVector) \
217 TFH(KeyedStoreIC_Megamorphic, BUILTIN, kNoExtraICState, StoreWithVector) \
218 TFH(KeyedStoreIC_Megamorphic_Strict, BUILTIN, kNoExtraICState, \
219 StoreWithVector) \
220 TFH(KeyedStoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \
221 TFH(KeyedStoreIC_Slow, HANDLER, Code::STORE_IC, StoreWithVector) \
222 TFH(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \
223 TFH(LoadGlobalIC_Slow, HANDLER, Code::LOAD_GLOBAL_IC, LoadGlobalWithVector) \
224 TFH(LoadField, BUILTIN, kNoExtraICState, LoadField) \
225 TFH(LoadIC_FunctionPrototype, HANDLER, Code::LOAD_IC, LoadWithVector) \
226 ASM(LoadIC_Getter_ForDeopt) \
227 TFH(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \
228 TFH(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \
229 TFH(LoadIC_Uninitialized, BUILTIN, kNoExtraICState, LoadWithVector) \
230 TFH(StoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \
231 ASM(StoreIC_Setter_ForDeopt) \
232 TFH(StoreIC_Uninitialized, BUILTIN, kNoExtraICState, StoreWithVector) \
233 TFH(StoreICStrict_Uninitialized, BUILTIN, kNoExtraICState, StoreWithVector) \
234 \
235 /* Built-in functions for Javascript */ \
236 /* Special internal builtins */ \
237 CPP(EmptyFunction) \
238 CPP(Illegal) \
239 CPP(RestrictedFunctionPropertiesThrower) \
240 CPP(RestrictedStrictArgumentsPropertiesThrower) \
241 CPP(UnsupportedThrower) \
242 TFJ(ReturnReceiver, 0) \
243 \
244 /* Array */ \
245 ASM(ArrayCode) \
246 ASM(InternalArrayCode) \
247 CPP(ArrayConcat) \
248 /* ES6 #sec-array.isarray */ \
249 TFJ(ArrayIsArray, 1, kArg) \
250 /* ES7 #sec-array.prototype.includes */ \
251 TFJ(ArrayIncludes, 2, kSearchElement, kFromIndex) \
252 /* ES6 #sec-array.prototype.indexof */ \
253 TFJ(ArrayIndexOf, 2, kSearchElement, kFromIndex) \
254 /* ES6 #sec-array.prototype.pop */ \
255 CPP(ArrayPop) \
256 /* ES6 #sec-array.prototype.push */ \
257 CPP(ArrayPush) \
258 TFJ(FastArrayPush, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
259 /* ES6 #sec-array.prototype.shift */ \
260 CPP(ArrayShift) \
261 /* ES6 #sec-array.prototype.slice */ \
262 CPP(ArraySlice) \
263 /* ES6 #sec-array.prototype.splice */ \
264 CPP(ArraySplice) \
265 /* ES6 #sec-array.prototype.unshift */ \
266 CPP(ArrayUnshift) \
267 /* ES6 #sec-array.prototype.foreach */ \
268 TFJ(ArrayForEachLoopContinuation, 7, kCallbackFn, kThisArg, kArray, kObject, \
269 kInitialK, kLength, kTo) \
270 TFJ(ArrayForEach, 2, kCallbackFn, kThisArg) \
271 /* ES6 #sec-array.prototype.every */ \
272 TFJ(ArrayEveryLoopContinuation, 7, kCallbackFn, kThisArg, kArray, kObject, \
273 kInitialK, kLength, kTo) \
274 TFJ(ArrayEvery, 2, kCallbackFn, kThisArg) \
275 /* ES6 #sec-array.prototype.some */ \
276 TFJ(ArraySomeLoopContinuation, 7, kCallbackFn, kThisArg, kArray, kObject, \
277 kInitialK, kLength, kTo) \
278 TFJ(ArraySome, 2, kCallbackFn, kThisArg) \
279 /* ES6 #sec-array.prototype.filter */ \
280 TFJ(ArrayFilterLoopContinuation, 7, kCallbackFn, kThisArg, kArray, kObject, \
281 kInitialK, kLength, kTo) \
282 TFJ(ArrayFilter, 2, kCallbackFn, kThisArg) \
283 /* ES6 #sec-array.prototype.foreach */ \
284 TFJ(ArrayMapLoopContinuation, 7, kCallbackFn, kThisArg, kArray, kObject, \
285 kInitialK, kLength, kTo) \
286 TFJ(ArrayMap, 2, kCallbackFn, kThisArg) \
287 /* ES6 #sec-array.prototype.reduce */ \
288 TFJ(ArrayReduceLoopContinuation, 7, kCallbackFn, kThisArg, kAccumulator, \
289 kObject, kInitialK, kLength, kTo) \
290 TFJ(ArrayReduce, 2, kCallbackFn, kInitialValue) \
291 /* ES6 #sec-array.prototype.reduceRight */ \
292 TFJ(ArrayReduceRightLoopContinuation, 7, kCallbackFn, kThisArg, \
293 kAccumulator, kObject, kInitialK, kLength, kTo) \
294 TFJ(ArrayReduceRight, 2, kCallbackFn, kInitialValue) \
295 /* ES6 #sec-array.prototype.entries */ \
296 TFJ(ArrayPrototypeEntries, 0) \
297 /* ES6 #sec-array.prototype.keys */ \
298 TFJ(ArrayPrototypeKeys, 0) \
299 /* ES6 #sec-array.prototype.values */ \
300 TFJ(ArrayPrototypeValues, 0) \
301 /* ES6 #sec-%arrayiteratorprototype%.next */ \
302 TFJ(ArrayIteratorPrototypeNext, 0) \
303 \
304 /* ArrayBuffer */ \
305 CPP(ArrayBufferConstructor) \
306 CPP(ArrayBufferConstructor_ConstructStub) \
307 CPP(ArrayBufferPrototypeGetByteLength) \
308 CPP(ArrayBufferIsView) \
309 CPP(ArrayBufferPrototypeSlice) \
310 \
311 /* AsyncFunction */ \
312 TFJ(AsyncFunctionAwaitCaught, 3, kGenerator, kAwaited, kOuterPromise) \
313 TFJ(AsyncFunctionAwaitUncaught, 3, kGenerator, kAwaited, kOuterPromise) \
314 TFJ(AsyncFunctionAwaitRejectClosure, 1, kSentError) \
315 TFJ(AsyncFunctionAwaitResolveClosure, 1, kSentValue) \
316 TFJ(AsyncFunctionPromiseCreate, 0) \
317 TFJ(AsyncFunctionPromiseRelease, 1, kPromise) \
318 \
319 /* Boolean */ \
320 CPP(BooleanConstructor) \
321 CPP(BooleanConstructor_ConstructStub) \
322 /* ES6 #sec-boolean.prototype.tostring */ \
323 TFJ(BooleanPrototypeToString, 0) \
324 /* ES6 #sec-boolean.prototype.valueof */ \
325 TFJ(BooleanPrototypeValueOf, 0) \
326 \
327 /* CallSite */ \
328 CPP(CallSitePrototypeGetColumnNumber) \
329 CPP(CallSitePrototypeGetEvalOrigin) \
330 CPP(CallSitePrototypeGetFileName) \
331 CPP(CallSitePrototypeGetFunction) \
332 CPP(CallSitePrototypeGetFunctionName) \
333 CPP(CallSitePrototypeGetLineNumber) \
334 CPP(CallSitePrototypeGetMethodName) \
335 CPP(CallSitePrototypeGetPosition) \
336 CPP(CallSitePrototypeGetScriptNameOrSourceURL) \
337 CPP(CallSitePrototypeGetThis) \
338 CPP(CallSitePrototypeGetTypeName) \
339 CPP(CallSitePrototypeIsConstructor) \
340 CPP(CallSitePrototypeIsEval) \
341 CPP(CallSitePrototypeIsNative) \
342 CPP(CallSitePrototypeIsToplevel) \
343 CPP(CallSitePrototypeToString) \
344 \
345 /* DataView */ \
346 CPP(DataViewConstructor) \
347 CPP(DataViewConstructor_ConstructStub) \
348 CPP(DataViewPrototypeGetBuffer) \
349 CPP(DataViewPrototypeGetByteLength) \
350 CPP(DataViewPrototypeGetByteOffset) \
351 CPP(DataViewPrototypeGetInt8) \
352 CPP(DataViewPrototypeSetInt8) \
353 CPP(DataViewPrototypeGetUint8) \
354 CPP(DataViewPrototypeSetUint8) \
355 CPP(DataViewPrototypeGetInt16) \
356 CPP(DataViewPrototypeSetInt16) \
357 CPP(DataViewPrototypeGetUint16) \
358 CPP(DataViewPrototypeSetUint16) \
359 CPP(DataViewPrototypeGetInt32) \
360 CPP(DataViewPrototypeSetInt32) \
361 CPP(DataViewPrototypeGetUint32) \
362 CPP(DataViewPrototypeSetUint32) \
363 CPP(DataViewPrototypeGetFloat32) \
364 CPP(DataViewPrototypeSetFloat32) \
365 CPP(DataViewPrototypeGetFloat64) \
366 CPP(DataViewPrototypeSetFloat64) \
367 \
368 /* Date */ \
369 CPP(DateConstructor) \
370 CPP(DateConstructor_ConstructStub) \
371 /* ES6 #sec-date.prototype.getdate */ \
372 TFJ(DatePrototypeGetDate, 0) \
373 /* ES6 #sec-date.prototype.getday */ \
374 TFJ(DatePrototypeGetDay, 0) \
375 /* ES6 #sec-date.prototype.getfullyear */ \
376 TFJ(DatePrototypeGetFullYear, 0) \
377 /* ES6 #sec-date.prototype.gethours */ \
378 TFJ(DatePrototypeGetHours, 0) \
379 /* ES6 #sec-date.prototype.getmilliseconds */ \
380 TFJ(DatePrototypeGetMilliseconds, 0) \
381 /* ES6 #sec-date.prototype.getminutes */ \
382 TFJ(DatePrototypeGetMinutes, 0) \
383 /* ES6 #sec-date.prototype.getmonth */ \
384 TFJ(DatePrototypeGetMonth, 0) \
385 /* ES6 #sec-date.prototype.getseconds */ \
386 TFJ(DatePrototypeGetSeconds, 0) \
387 /* ES6 #sec-date.prototype.gettime */ \
388 TFJ(DatePrototypeGetTime, 0) \
389 /* ES6 #sec-date.prototype.gettimezoneoffset */ \
390 TFJ(DatePrototypeGetTimezoneOffset, 0) \
391 /* ES6 #sec-date.prototype.getutcdate */ \
392 TFJ(DatePrototypeGetUTCDate, 0) \
393 /* ES6 #sec-date.prototype.getutcday */ \
394 TFJ(DatePrototypeGetUTCDay, 0) \
395 /* ES6 #sec-date.prototype.getutcfullyear */ \
396 TFJ(DatePrototypeGetUTCFullYear, 0) \
397 /* ES6 #sec-date.prototype.getutchours */ \
398 TFJ(DatePrototypeGetUTCHours, 0) \
399 /* ES6 #sec-date.prototype.getutcmilliseconds */ \
400 TFJ(DatePrototypeGetUTCMilliseconds, 0) \
401 /* ES6 #sec-date.prototype.getutcminutes */ \
402 TFJ(DatePrototypeGetUTCMinutes, 0) \
403 /* ES6 #sec-date.prototype.getutcmonth */ \
404 TFJ(DatePrototypeGetUTCMonth, 0) \
405 /* ES6 #sec-date.prototype.getutcseconds */ \
406 TFJ(DatePrototypeGetUTCSeconds, 0) \
407 /* ES6 #sec-date.prototype.valueof */ \
408 TFJ(DatePrototypeValueOf, 0) \
409 /* ES6 #sec-date.prototype-@@toprimitive */ \
410 TFJ(DatePrototypeToPrimitive, 1, kHint) \
411 CPP(DatePrototypeGetYear) \
412 CPP(DatePrototypeSetYear) \
413 CPP(DateNow) \
414 CPP(DateParse) \
415 CPP(DatePrototypeSetDate) \
416 CPP(DatePrototypeSetFullYear) \
417 CPP(DatePrototypeSetHours) \
418 CPP(DatePrototypeSetMilliseconds) \
419 CPP(DatePrototypeSetMinutes) \
420 CPP(DatePrototypeSetMonth) \
421 CPP(DatePrototypeSetSeconds) \
422 CPP(DatePrototypeSetTime) \
423 CPP(DatePrototypeSetUTCDate) \
424 CPP(DatePrototypeSetUTCFullYear) \
425 CPP(DatePrototypeSetUTCHours) \
426 CPP(DatePrototypeSetUTCMilliseconds) \
427 CPP(DatePrototypeSetUTCMinutes) \
428 CPP(DatePrototypeSetUTCMonth) \
429 CPP(DatePrototypeSetUTCSeconds) \
430 CPP(DatePrototypeToDateString) \
431 CPP(DatePrototypeToISOString) \
432 CPP(DatePrototypeToUTCString) \
433 CPP(DatePrototypeToString) \
434 CPP(DatePrototypeToTimeString) \
435 CPP(DatePrototypeToJson) \
436 CPP(DateUTC) \
437 \
438 /* Error */ \
439 CPP(ErrorConstructor) \
440 CPP(ErrorCaptureStackTrace) \
441 CPP(ErrorPrototypeToString) \
442 CPP(MakeError) \
443 CPP(MakeRangeError) \
444 CPP(MakeSyntaxError) \
445 CPP(MakeTypeError) \
446 CPP(MakeURIError) \
447 \
448 /* Function */ \
449 CPP(FunctionConstructor) \
450 ASM(FunctionPrototypeApply) \
451 CPP(FunctionPrototypeBind) \
452 /* ES6 #sec-function.prototype.bind */ \
453 TFJ(FastFunctionPrototypeBind, \
454 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
455 ASM(FunctionPrototypeCall) \
456 /* ES6 #sec-function.prototype-@@hasinstance */ \
457 TFJ(FunctionPrototypeHasInstance, 1, kV) \
458 /* ES6 #sec-function.prototype.tostring */ \
459 CPP(FunctionPrototypeToString) \
460 \
461 /* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \
462 TFS(CreateIterResultObject, CreateIterResultObject, 1) \
463 \
464 /* Generator and Async */ \
465 CPP(GeneratorFunctionConstructor) \
466 /* ES6 #sec-generator.prototype.next */ \
467 TFJ(GeneratorPrototypeNext, 1, kValue) \
468 /* ES6 #sec-generator.prototype.return */ \
469 TFJ(GeneratorPrototypeReturn, 1, kValue) \
470 /* ES6 #sec-generator.prototype.throw */ \
471 TFJ(GeneratorPrototypeThrow, 1, kException) \
472 CPP(AsyncFunctionConstructor) \
473 \
474 /* Global object */ \
475 CPP(GlobalDecodeURI) \
476 CPP(GlobalDecodeURIComponent) \
477 CPP(GlobalEncodeURI) \
478 CPP(GlobalEncodeURIComponent) \
479 CPP(GlobalEscape) \
480 CPP(GlobalUnescape) \
481 CPP(GlobalEval) \
482 /* ES6 #sec-isfinite-number */ \
483 TFJ(GlobalIsFinite, 1, kNumber) \
484 /* ES6 #sec-isnan-number */ \
485 TFJ(GlobalIsNaN, 1, kNumber) \
486 \
487 /* JSON */ \
488 CPP(JsonParse) \
489 CPP(JsonStringify) \
490 \
491 /* ICs */ \
492 TFH(LoadIC, LOAD_IC, kNoExtraICState, LoadWithVector) \
493 TFH(LoadIC_Noninlined, BUILTIN, kNoExtraICState, LoadWithVector) \
494 TFH(LoadICTrampoline, LOAD_IC, kNoExtraICState, Load) \
495 TFH(KeyedLoadIC, KEYED_LOAD_IC, kNoExtraICState, LoadWithVector) \
496 TFH(KeyedLoadICTrampoline, KEYED_LOAD_IC, kNoExtraICState, Load) \
497 TFH(StoreIC, STORE_IC, kNoExtraICState, StoreWithVector) \
498 TFH(StoreICTrampoline, STORE_IC, kNoExtraICState, Store) \
499 TFH(StoreICStrict, STORE_IC, kNoExtraICState, StoreWithVector) \
500 TFH(StoreICStrictTrampoline, STORE_IC, kNoExtraICState, Store) \
501 TFH(KeyedStoreIC, KEYED_STORE_IC, kNoExtraICState, StoreWithVector) \
502 TFH(KeyedStoreICTrampoline, KEYED_STORE_IC, kNoExtraICState, Store) \
503 TFH(KeyedStoreICStrict, KEYED_STORE_IC, kNoExtraICState, StoreWithVector) \
504 TFH(KeyedStoreICStrictTrampoline, KEYED_STORE_IC, kNoExtraICState, Store) \
505 TFH(LoadGlobalIC, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobalWithVector) \
506 TFH(LoadGlobalICInsideTypeof, LOAD_GLOBAL_IC, kNoExtraICState, \
507 LoadGlobalWithVector) \
508 TFH(LoadGlobalICTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobal) \
509 TFH(LoadGlobalICInsideTypeofTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, \
510 LoadGlobal) \
511 \
512 /* Math */ \
513 /* ES6 #sec-math.abs */ \
514 TFJ(MathAbs, 1, kX) \
515 /* ES6 #sec-math.acos */ \
516 TFJ(MathAcos, 1, kX) \
517 /* ES6 #sec-math.acosh */ \
518 TFJ(MathAcosh, 1, kX) \
519 /* ES6 #sec-math.asin */ \
520 TFJ(MathAsin, 1, kX) \
521 /* ES6 #sec-math.asinh */ \
522 TFJ(MathAsinh, 1, kX) \
523 /* ES6 #sec-math.atan */ \
524 TFJ(MathAtan, 1, kX) \
525 /* ES6 #sec-math.atanh */ \
526 TFJ(MathAtanh, 1, kX) \
527 /* ES6 #sec-math.atan2 */ \
528 TFJ(MathAtan2, 2, kY, kX) \
529 /* ES6 #sec-math.cbrt */ \
530 TFJ(MathCbrt, 1, kX) \
531 /* ES6 #sec-math.ceil */ \
532 TFJ(MathCeil, 1, kX) \
533 /* ES6 #sec-math.clz32 */ \
534 TFJ(MathClz32, 1, kX) \
535 /* ES6 #sec-math.cos */ \
536 TFJ(MathCos, 1, kX) \
537 /* ES6 #sec-math.cosh */ \
538 TFJ(MathCosh, 1, kX) \
539 /* ES6 #sec-math.exp */ \
540 TFJ(MathExp, 1, kX) \
541 /* ES6 #sec-math.expm1 */ \
542 TFJ(MathExpm1, 1, kX) \
543 /* ES6 #sec-math.floor */ \
544 TFJ(MathFloor, 1, kX) \
545 /* ES6 #sec-math.fround */ \
546 TFJ(MathFround, 1, kX) \
547 /* ES6 #sec-math.hypot */ \
548 CPP(MathHypot) \
549 /* ES6 #sec-math.imul */ \
550 TFJ(MathImul, 2, kX, kY) \
551 /* ES6 #sec-math.log */ \
552 TFJ(MathLog, 1, kX) \
553 /* ES6 #sec-math.log1p */ \
554 TFJ(MathLog1p, 1, kX) \
555 /* ES6 #sec-math.log10 */ \
556 TFJ(MathLog10, 1, kX) \
557 /* ES6 #sec-math.log2 */ \
558 TFJ(MathLog2, 1, kX) \
559 /* ES6 #sec-math.max */ \
560 TFJ(MathMax, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
561 /* ES6 #sec-math.min */ \
562 TFJ(MathMin, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
563 /* ES6 #sec-math.pow */ \
564 TFJ(MathPow, 2, kBase, kExponent) \
565 /* ES6 #sec-math.random */ \
566 TFJ(MathRandom, 0) \
567 /* ES6 #sec-math.round */ \
568 TFJ(MathRound, 1, kX) \
569 /* ES6 #sec-math.sign */ \
570 TFJ(MathSign, 1, kX) \
571 /* ES6 #sec-math.sin */ \
572 TFJ(MathSin, 1, kX) \
573 /* ES6 #sec-math.sinh */ \
574 TFJ(MathSinh, 1, kX) \
575 /* ES6 #sec-math.sqrt */ \
576 TFJ(MathTan, 1, kX) \
577 /* ES6 #sec-math.tan */ \
578 TFJ(MathTanh, 1, kX) \
579 /* ES6 #sec-math.tanh */ \
580 TFJ(MathSqrt, 1, kX) \
581 /* ES6 #sec-math.trunc */ \
582 TFJ(MathTrunc, 1, kX) \
583 \
584 /* Number */ \
585 /* ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case */ \
586 ASM(NumberConstructor) \
587 /* ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Construct]] case */ \
588 ASM(NumberConstructor_ConstructStub) \
589 /* ES6 #sec-number.isfinite */ \
590 TFJ(NumberIsFinite, 1, kNumber) \
591 /* ES6 #sec-number.isinteger */ \
592 TFJ(NumberIsInteger, 1, kNumber) \
593 /* ES6 #sec-number.isnan */ \
594 TFJ(NumberIsNaN, 1, kNumber) \
595 /* ES6 #sec-number.issafeinteger */ \
596 TFJ(NumberIsSafeInteger, 1, kNumber) \
597 /* ES6 #sec-number.parsefloat */ \
598 TFJ(NumberParseFloat, 1, kString) \
599 /* ES6 #sec-number.parseint */ \
600 TFJ(NumberParseInt, 2, kString, kRadix) \
601 CPP(NumberPrototypeToExponential) \
602 CPP(NumberPrototypeToFixed) \
603 CPP(NumberPrototypeToLocaleString) \
604 CPP(NumberPrototypeToPrecision) \
605 CPP(NumberPrototypeToString) \
606 /* ES6 #sec-number.prototype.valueof */ \
607 TFJ(NumberPrototypeValueOf, 0) \
608 TFS(Add, BinaryOp, 1) \
609 TFS(Subtract, BinaryOp, 1) \
610 TFS(Multiply, BinaryOp, 1) \
611 TFS(Divide, BinaryOp, 1) \
612 TFS(Modulus, BinaryOp, 1) \
613 TFS(BitwiseAnd, BinaryOp, 1) \
614 TFS(BitwiseOr, BinaryOp, 1) \
615 TFS(BitwiseXor, BinaryOp, 1) \
616 TFS(ShiftLeft, BinaryOp, 1) \
617 TFS(ShiftRight, BinaryOp, 1) \
618 TFS(ShiftRightLogical, BinaryOp, 1) \
619 TFS(LessThan, Compare, 1) \
620 TFS(LessThanOrEqual, Compare, 1) \
621 TFS(GreaterThan, Compare, 1) \
622 TFS(GreaterThanOrEqual, Compare, 1) \
623 TFS(Equal, Compare, 1) \
624 TFS(StrictEqual, Compare, 1) \
625 TFS(AddWithFeedback, BinaryOpWithVector, 1) \
626 TFS(SubtractWithFeedback, BinaryOpWithVector, 1) \
627 \
628 /* Object */ \
629 CPP(ObjectAssign) \
630 /* ES #sec-object.create */ \
631 TFJ(ObjectCreate, 2, kPrototype, kProperties) \
632 CPP(ObjectDefineGetter) \
633 CPP(ObjectDefineProperties) \
634 CPP(ObjectDefineProperty) \
635 CPP(ObjectDefineSetter) \
636 CPP(ObjectEntries) \
637 CPP(ObjectFreeze) \
638 CPP(ObjectGetOwnPropertyDescriptor) \
639 CPP(ObjectGetOwnPropertyDescriptors) \
640 CPP(ObjectGetOwnPropertyNames) \
641 CPP(ObjectGetOwnPropertySymbols) \
642 CPP(ObjectGetPrototypeOf) \
643 CPP(ObjectSetPrototypeOf) \
644 /* ES6 #sec-object.prototype.hasownproperty */ \
645 TFJ(ObjectHasOwnProperty, 1, kKey) \
646 CPP(ObjectIs) \
647 CPP(ObjectIsExtensible) \
648 CPP(ObjectIsFrozen) \
649 CPP(ObjectIsSealed) \
650 CPP(ObjectKeys) \
651 CPP(ObjectLookupGetter) \
652 CPP(ObjectLookupSetter) \
653 CPP(ObjectPreventExtensions) \
654 /* ES6 #sec-object.prototype.tostring */ \
655 TFJ(ObjectProtoToString, 0) \
656 /* ES6 #sec-object.prototype.valueof */ \
657 TFJ(ObjectPrototypeValueOf, 0) \
658 CPP(ObjectPrototypePropertyIsEnumerable) \
659 CPP(ObjectPrototypeGetProto) \
660 CPP(ObjectPrototypeSetProto) \
661 CPP(ObjectSeal) \
662 CPP(ObjectValues) \
663 \
664 /* instanceof */ \
665 TFS(OrdinaryHasInstance, Compare, 1) \
666 TFS(InstanceOf, Compare, 1) \
667 \
668 /* for-in */ \
669 TFS(ForInFilter, ForInFilter, 1) \
670 TFS(ForInNext, ForInNext, 1) \
671 TFS(ForInPrepare, ForInPrepare, 3) \
672 \
673 /* Promise */ \
674 /* ES6 #sec-getcapabilitiesexecutor-functions */ \
675 TFJ(PromiseGetCapabilitiesExecutor, 2, kResolve, kReject) \
676 /* ES6 #sec-newpromisecapability */ \
677 TFJ(NewPromiseCapability, 2, kConstructor, kDebugEvent) \
678 /* ES6 #sec-promise-executor */ \
679 TFJ(PromiseConstructor, 1, kExecutor) \
680 TFJ(PromiseInternalConstructor, 1, kParent) \
681 TFJ(IsPromise, 1, kObject) \
682 /* ES #sec-promise-resolve-functions */ \
683 TFJ(PromiseResolveClosure, 1, kValue) \
684 /* ES #sec-promise-reject-functions */ \
685 TFJ(PromiseRejectClosure, 1, kValue) \
686 /* ES #sec-promise.prototype.then */ \
687 TFJ(PromiseThen, 2, kOnFullfilled, kOnRejected) \
688 /* ES #sec-promise.prototype.catch */ \
689 TFJ(PromiseCatch, 1, kOnRejected) \
690 /* ES #sec-fulfillpromise */ \
691 TFJ(ResolvePromise, 2, kPromise, kValue) \
692 TFS(PromiseHandleReject, PromiseHandleReject, 1) \
693 TFJ(PromiseHandle, 5, kValue, kHandler, kDeferredPromise, \
694 kDeferredOnResolve, kDeferredOnReject) \
695 /* ES #sec-promise.resolve */ \
696 TFJ(PromiseResolve, 1, kValue) \
697 /* ES #sec-promise.reject */ \
698 TFJ(PromiseReject, 1, kReason) \
699 TFJ(InternalPromiseReject, 3, kPromise, kReason, kDebugEvent) \
700 TFJ(PromiseFinally, 1, kOnFinally) \
701 TFJ(PromiseThenFinally, 1, kValue) \
702 TFJ(PromiseCatchFinally, 1, kReason) \
703 TFJ(PromiseValueThunkFinally, 0) \
704 TFJ(PromiseThrowerFinally, 0) \
705 \
706 /* Proxy */ \
707 CPP(ProxyConstructor) \
708 CPP(ProxyConstructor_ConstructStub) \
709 \
710 /* Reflect */ \
711 ASM(ReflectApply) \
712 ASM(ReflectConstruct) \
713 CPP(ReflectDefineProperty) \
714 CPP(ReflectDeleteProperty) \
715 CPP(ReflectGet) \
716 CPP(ReflectGetOwnPropertyDescriptor) \
717 CPP(ReflectGetPrototypeOf) \
718 CPP(ReflectHas) \
719 CPP(ReflectIsExtensible) \
720 CPP(ReflectOwnKeys) \
721 CPP(ReflectPreventExtensions) \
722 CPP(ReflectSet) \
723 CPP(ReflectSetPrototypeOf) \
724 \
725 /* RegExp */ \
726 TFS(RegExpPrototypeExecSlow, RegExpPrototypeExecSlow, 1) \
727 CPP(RegExpCapture1Getter) \
728 CPP(RegExpCapture2Getter) \
729 CPP(RegExpCapture3Getter) \
730 CPP(RegExpCapture4Getter) \
731 CPP(RegExpCapture5Getter) \
732 CPP(RegExpCapture6Getter) \
733 CPP(RegExpCapture7Getter) \
734 CPP(RegExpCapture8Getter) \
735 CPP(RegExpCapture9Getter) \
736 /* ES #sec-regexp-pattern-flags */ \
737 TFJ(RegExpConstructor, 2, kPattern, kFlags) \
738 TFJ(RegExpInternalMatch, 2, kRegExp, kString) \
739 CPP(RegExpInputGetter) \
740 CPP(RegExpInputSetter) \
741 CPP(RegExpLastMatchGetter) \
742 CPP(RegExpLastParenGetter) \
743 CPP(RegExpLeftContextGetter) \
744 /* ES #sec-regexp.prototype.compile */ \
745 TFJ(RegExpPrototypeCompile, 2, kPattern, kFlags) \
746 /* ES #sec-regexp.prototype.exec */ \
747 TFJ(RegExpPrototypeExec, 1, kString) \
748 /* ES #sec-get-regexp.prototype.flags */ \
749 TFJ(RegExpPrototypeFlagsGetter, 0) \
750 /* ES #sec-get-regexp.prototype.global */ \
751 TFJ(RegExpPrototypeGlobalGetter, 0) \
752 /* ES #sec-get-regexp.prototype.ignorecase */ \
753 TFJ(RegExpPrototypeIgnoreCaseGetter, 0) \
754 /* ES #sec-regexp.prototype-@@match */ \
755 TFJ(RegExpPrototypeMatch, 1, kString) \
756 /* ES #sec-get-regexp.prototype.multiline */ \
757 TFJ(RegExpPrototypeMultilineGetter, 0) \
758 /* ES #sec-regexp.prototype-@@search */ \
759 TFJ(RegExpPrototypeSearch, 1, kString) \
760 /* ES #sec-get-regexp.prototype.source */ \
761 TFJ(RegExpPrototypeSourceGetter, 0) \
762 /* ES #sec-get-regexp.prototype.sticky */ \
763 TFJ(RegExpPrototypeStickyGetter, 0) \
764 /* ES #sec-regexp.prototype.test */ \
765 TFJ(RegExpPrototypeTest, 1, kString) \
766 CPP(RegExpPrototypeToString) \
767 /* ES #sec-get-regexp.prototype.unicode */ \
768 TFJ(RegExpPrototypeUnicodeGetter, 0) \
769 CPP(RegExpRightContextGetter) \
770 \
771 TFS(RegExpReplace, RegExpReplace, 1) \
772 /* ES #sec-regexp.prototype-@@replace */ \
773 TFJ(RegExpPrototypeReplace, 2, kString, kReplaceValue) \
774 \
775 TFS(RegExpSplit, RegExpSplit, 1) \
776 /* ES #sec-regexp.prototype-@@split */ \
777 TFJ(RegExpPrototypeSplit, 2, kString, kLimit) \
778 \
779 /* SharedArrayBuffer */ \
780 CPP(SharedArrayBufferPrototypeGetByteLength) \
781 CPP(SharedArrayBufferPrototypeSlice) \
782 TFJ(AtomicsLoad, 2, kArray, kIndex) \
783 TFJ(AtomicsStore, 3, kArray, kIndex, kValue) \
784 TFJ(AtomicsExchange, 3, kArray, kIndex, kValue) \
785 TFJ(AtomicsCompareExchange, 4, kArray, kIndex, kOldValue, kNewValue) \
786 CPP(AtomicsAdd) \
787 CPP(AtomicsSub) \
788 CPP(AtomicsAnd) \
789 CPP(AtomicsOr) \
790 CPP(AtomicsXor) \
791 CPP(AtomicsIsLockFree) \
792 CPP(AtomicsWait) \
793 CPP(AtomicsWake) \
794 \
795 /* String */ \
796 ASM(StringConstructor) \
797 ASM(StringConstructor_ConstructStub) \
798 CPP(StringFromCodePoint) \
799 /* ES6 #sec-string.fromcharcode */ \
800 TFJ(StringFromCharCode, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
801 /* ES6 #sec-string.prototype.charat */ \
802 TFJ(StringPrototypeCharAt, 1, kPosition) \
803 /* ES6 #sec-string.prototype.charcodeat */ \
804 TFJ(StringPrototypeCharCodeAt, 1, kPosition) \
805 /* ES6 #sec-string.prototype.concat */ \
806 TFJ(StringPrototypeConcat, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
807 /* ES6 #sec-string.prototype.endswith */ \
808 CPP(StringPrototypeEndsWith) \
809 /* ES6 #sec-string.prototype.includes */ \
810 CPP(StringPrototypeIncludes) \
811 /* ES6 #sec-string.prototype.indexof */ \
812 TFJ(StringPrototypeIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
813 /* ES6 #sec-string.prototype.lastindexof */ \
814 CPP(StringPrototypeLastIndexOf) \
815 /* ES6 #sec-string.prototype.localecompare */ \
816 CPP(StringPrototypeLocaleCompare) \
817 /* ES6 #sec-string.prototype.normalize */ \
818 CPP(StringPrototypeNormalize) \
819 /* ES6 #sec-string.prototype.replace */ \
820 TFJ(StringPrototypeReplace, 2, kSearch, kReplace) \
821 /* ES6 #sec-string.prototype.split */ \
822 TFJ(StringPrototypeSplit, 2, kSeparator, kLimit) \
823 /* ES6 #sec-string.prototype.substr */ \
824 TFJ(StringPrototypeSubstr, 2, kStart, kLength) \
825 /* ES6 #sec-string.prototype.substring */ \
826 TFJ(StringPrototypeSubstring, 2, kStart, kEnd) \
827 /* ES6 #sec-string.prototype.startswith */ \
828 CPP(StringPrototypeStartsWith) \
829 /* ES6 #sec-string.prototype.tostring */ \
830 TFJ(StringPrototypeToString, 0) \
831 /* ES #sec-string.prototype.tolocalelowercase */ \
832 CPP(StringPrototypeToLocaleLowerCase) \
833 /* ES #sec-string.prototype.tolocaleuppercase */ \
834 CPP(StringPrototypeToLocaleUpperCase) \
835 /* (obsolete) Unibrow version */ \
836 CPP(StringPrototypeToLowerCase) \
837 /* (obsolete) Unibrow version */ \
838 CPP(StringPrototypeToUpperCase) \
839 CPP(StringPrototypeTrim) \
840 CPP(StringPrototypeTrimLeft) \
841 CPP(StringPrototypeTrimRight) \
842 /* ES6 #sec-string.prototype.valueof */ \
843 TFJ(StringPrototypeValueOf, 0) \
844 /* ES6 #sec-string.prototype-@@iterator */ \
845 TFJ(StringPrototypeIterator, 0) \
846 \
847 /* StringIterator */ \
848 /* ES6 #sec-%stringiteratorprototype%.next */ \
849 TFJ(StringIteratorPrototypeNext, 0) \
850 \
851 /* Symbol */ \
852 CPP(SymbolConstructor) \
853 CPP(SymbolConstructor_ConstructStub) \
854 /* ES6 #sec-symbol.for */ \
855 CPP(SymbolFor) \
856 /* ES6 #sec-symbol.keyfor */ \
857 CPP(SymbolKeyFor) \
858 /* ES6 #sec-symbol.prototype-@@toprimitive */ \
859 TFJ(SymbolPrototypeToPrimitive, 1, kHint) \
860 /* ES6 #sec-symbol.prototype.tostring */ \
861 TFJ(SymbolPrototypeToString, 0) \
862 /* ES6 #sec-symbol.prototype.valueof */ \
863 TFJ(SymbolPrototypeValueOf, 0) \
864 \
865 /* TypedArray */ \
866 /* ES6 #sec-typedarray-buffer-byteoffset-length */ \
867 TFJ(TypedArrayConstructByArrayBuffer, 5, kHolder, kBuffer, kByteOffset, \
868 kLength, kElementSize) \
869 TFJ(TypedArrayConstructByArrayLike, 4, kHolder, kArrayLike, kLength, \
870 kElementSize) \
871 /* ES6 #sec-typedarray-length */ \
872 TFJ(TypedArrayConstructByLength, 3, kHolder, kLength, kElementSize) \
873 TFJ(TypedArrayInitialize, 6, kHolder, kLength, kBuffer, kByteOffset, \
874 kByteLength, kInitialize) \
875 CPP(TypedArrayPrototypeBuffer) \
876 /* ES6 #sec-get-%typedarray%.prototype.bytelength */ \
877 TFJ(TypedArrayPrototypeByteLength, 0) \
878 /* ES6 #sec-get-%typedarray%.prototype.byteoffset */ \
879 TFJ(TypedArrayPrototypeByteOffset, 0) \
880 /* ES6 #sec-get-%typedarray%.prototype.length */ \
881 TFJ(TypedArrayPrototypeLength, 0) \
882 /* ES6 #sec-%typedarray%.prototype.entries */ \
883 TFJ(TypedArrayPrototypeEntries, 0) \
884 /* ES6 #sec-%typedarray%.prototype.keys */ \
885 TFJ(TypedArrayPrototypeKeys, 0) \
886 /* ES6 #sec-%typedarray%.prototype.values */ \
887 TFJ(TypedArrayPrototypeValues, 0) \
888 /* ES6 #sec-%typedarray%.prototype.copywithin */ \
889 CPP(TypedArrayPrototypeCopyWithin) \
890 /* ES6 #sec-%typedarray%.prototype.fill */ \
891 CPP(TypedArrayPrototypeFill) \
892 /* ES7 #sec-%typedarray%.prototype.includes */ \
893 CPP(TypedArrayPrototypeIncludes) \
894 /* ES6 #sec-%typedarray%.prototype.indexof */ \
895 CPP(TypedArrayPrototypeIndexOf) \
896 /* ES6 #sec-%typedarray%.prototype.lastindexof */ \
897 CPP(TypedArrayPrototypeLastIndexOf) \
898 /* ES6 #sec-%typedarray%.prototype.reverse */ \
899 CPP(TypedArrayPrototypeReverse) \
900 \
901 /* Wasm */ \
902 ASM(WasmCompileLazy) \
903 TFS(WasmStackGuard, WasmRuntimeCall, 1) \
904 TFS(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \
905 TFS(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \
906 TFS(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \
907 TFS(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \
908 TFS(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \
909 TFS(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \
910 TFS(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \
911 TFS(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \
912 \
913 /* Async-from-Sync Iterator */ \
914 \
915 /* %AsyncFromSyncIteratorPrototype% */ \
916 /* See tc39.github.io/proposal-async-iteration/ */ \
917 /* #sec-%asyncfromsynciteratorprototype%-object) */ \
918 TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \
919 /* #sec-%asyncfromsynciteratorprototype%.throw */ \
920 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \
921 /* #sec-%asyncfromsynciteratorprototype%.return */ \
922 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \
923 /* #sec-async-iterator-value-unwrap-functions */ \
924 TFJ(AsyncIteratorValueUnwrap, 1, kValue)
925
926 #ifdef V8_I18N_SUPPORT
927 #define BUILTIN_LIST(CPP, API, TFJ, TFS, TFH, ASM, DBG) \
928 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, TFH, ASM, DBG) \
929 \
930 /* ES #sec-string.prototype.tolowercase */ \
931 CPP(StringPrototypeToLowerCaseI18N) \
932 /* ES #sec-string.prototype.touppercase */ \
933 CPP(StringPrototypeToUpperCaseI18N)
934 #else
935 #define BUILTIN_LIST(CPP, API, TFJ, TFS, TFH, ASM, DBG) \
936 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, TFH, ASM, DBG)
937 #endif // V8_I18N_SUPPORT
938
939 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \
940 V(AsyncFromSyncIteratorPrototypeNext) \
941 V(AsyncFromSyncIteratorPrototypeReturn) \
942 V(AsyncFromSyncIteratorPrototypeThrow) \
943 V(AsyncFunctionAwaitCaught) \
944 V(AsyncFunctionAwaitUncaught) \
945 V(PromiseConstructor) \
946 V(PromiseHandle) \
947 V(PromiseResolve) \
948 V(PromiseResolveClosure) \
949 V(ResolvePromise)
950
951 #define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject)
952
953 #define IGNORE_BUILTIN(...)
954
955 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V)
956
957 #define BUILTIN_LIST_C(V) \
958 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
959 IGNORE_BUILTIN, IGNORE_BUILTIN)
960
961 #define BUILTIN_LIST_A(V) \
962 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
963 IGNORE_BUILTIN, V, V)
964
965 #define BUILTIN_LIST_DBG(V) \
966 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
967 IGNORE_BUILTIN, IGNORE_BUILTIN, V)
968
969 #define BUILTINS_WITH_UNTAGGED_PARAMS(V) V(WasmCompileLazy)
970
971 // Forward declarations. 20 // Forward declarations.
972 class ObjectVisitor; 21 class ObjectVisitor;
973 enum class InterpreterPushArgsMode : unsigned; 22 enum class InterpreterPushArgsMode : unsigned;
974 namespace compiler { 23 namespace compiler {
975 class CodeAssemblerState; 24 class CodeAssemblerState;
976 } 25 }
977 26
978 class Builtins { 27 class Builtins {
979 public: 28 public:
980 ~Builtins(); 29 ~Builtins();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 146
1098 friend class Isolate; 147 friend class Isolate;
1099 148
1100 DISALLOW_COPY_AND_ASSIGN(Builtins); 149 DISALLOW_COPY_AND_ASSIGN(Builtins);
1101 }; 150 };
1102 151
1103 } // namespace internal 152 } // namespace internal
1104 } // namespace v8 153 } // namespace v8
1105 154
1106 #endif // V8_BUILTINS_BUILTINS_H_ 155 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698