1 // Copyright 2017 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_BUILTINS_BUILTINS_DEFINITIONS_H_ 6 #define V8_BUILTINS_BUILTINS_DEFINITIONS_H_ 7 8 // include generated header 9 #include "torque-generated/builtin-definitions-from-dsl.h" 10 11 namespace v8 { 12 namespace internal { 13 14 // CPP: Builtin in C++. Entered via BUILTIN_EXIT frame. 15 // Args: name 16 // API: Builtin in C++ for API callbacks. Entered via EXIT frame. 17 // Args: name 18 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function). 19 // Args: name, arguments count, explicit argument names... 20 // TFS: Builtin in Turbofan, with CodeStub linkage. 21 // Args: name, explicit argument names... 22 // TFC: Builtin in Turbofan, with CodeStub linkage and custom descriptor. 23 // Args: name, interface descriptor, return_size 24 // TFH: Handlers in Turbofan, with CodeStub linkage. 25 // Args: name, interface descriptor 26 // ASM: Builtin in platform-dependent assembly. 27 // Args: name 28 29 #define BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 30 /* GC write barrirer */ \ 31 TFC(RecordWrite, RecordWrite, 1) \ 32 \ 33 /* Adaptors for CPP/API builtin */ \ 34 ASM(AdaptorWithExitFrame) \ 35 ASM(AdaptorWithBuiltinExitFrame) \ 36 \ 37 /* Calls */ \ 38 ASM(ArgumentsAdaptorTrampoline) \ 39 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \ 40 ASM(CallFunction_ReceiverIsNullOrUndefined) \ 41 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \ 42 ASM(CallFunction_ReceiverIsAny) \ 43 /* ES6 section 9.4.1.1 [[Call]] ( thisArgument, argumentsList) */ \ 44 ASM(CallBoundFunction) \ 45 /* ES6 section 7.3.12 Call(F, V, [argumentsList]) */ \ 46 ASM(Call_ReceiverIsNullOrUndefined) \ 47 ASM(Call_ReceiverIsNotNullOrUndefined) \ 48 ASM(Call_ReceiverIsAny) \ 49 \ 50 /* ES6 section 9.5.12[[Call]] ( thisArgument, argumentsList ) */ \ 51 TFC(CallProxy, CallTrampoline, 1) \ 52 ASM(CallVarargs) \ 53 TFC(CallWithSpread, CallWithSpread, 1) \ 54 TFC(CallWithArrayLike, CallWithArrayLike, 1) \ 55 ASM(CallForwardVarargs) \ 56 ASM(CallFunctionForwardVarargs) \ 57 \ 58 /* Construct */ \ 59 /* ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) */ \ 60 ASM(ConstructFunction) \ 61 /* ES6 section 9.4.1.2 [[Construct]] (argumentsList, newTarget) */ \ 62 ASM(ConstructBoundFunction) \ 63 ASM(ConstructedNonConstructable) \ 64 /* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \ 65 ASM(Construct) \ 66 ASM(ConstructVarargs) \ 67 TFC(ConstructWithSpread, ConstructWithSpread, 1) \ 68 TFC(ConstructWithArrayLike, ConstructWithArrayLike, 1) \ 69 ASM(ConstructForwardVarargs) \ 70 ASM(ConstructFunctionForwardVarargs) \ 71 ASM(JSConstructStubGeneric) \ 72 ASM(JSBuiltinsConstructStub) \ 73 TFC(FastNewObject, FastNewObject, 1) \ 74 TFS(FastNewClosure, kSharedFunctionInfo, kFeedbackCell) \ 75 TFC(FastNewFunctionContextEval, FastNewFunctionContext, 1) \ 76 TFC(FastNewFunctionContextFunction, FastNewFunctionContext, 1) \ 77 TFS(CreateRegExpLiteral, kFeedbackVector, kSlot, kPattern, kFlags) \ 78 TFS(CreateEmptyArrayLiteral, kFeedbackVector, kSlot) \ 79 TFS(CreateShallowArrayLiteral, kFeedbackVector, kSlot, kConstantElements) \ 80 TFS(CreateShallowObjectLiteral, kFeedbackVector, kSlot, \ 81 kBoilerplateDescription, kFlags) \ 82 /* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \ 83 TFC(ConstructProxy, ConstructTrampoline, 1) \ 84 \ 85 /* Apply and entries */ \ 86 ASM(JSEntryTrampoline) \ 87 ASM(JSConstructEntryTrampoline) \ 88 ASM(ResumeGeneratorTrampoline) \ 89 \ 90 /* Stack and interrupt check */ \ 91 ASM(InterruptCheck) \ 92 ASM(StackCheck) \ 93 \ 94 /* String helpers */ \ 95 TFC(StringCharAt, StringAt, 1) \ 96 TFC(StringCodePointAtUTF16, StringAt, 1) \ 97 TFC(StringCodePointAtUTF32, StringAt, 1) \ 98 TFC(StringEqual, Compare, 1) \ 99 TFC(StringGreaterThan, Compare, 1) \ 100 TFC(StringGreaterThanOrEqual, Compare, 1) \ 101 TFS(StringIndexOf, kReceiver, kSearchString, kPosition) \ 102 TFC(StringLessThan, Compare, 1) \ 103 TFC(StringLessThanOrEqual, Compare, 1) \ 104 TFS(StringRepeat, kString, kCount) \ 105 TFC(StringSubstring, StringSubstring, 1) \ 106 \ 107 /* OrderedHashTable helpers */ \ 108 TFS(OrderedHashTableHealIndex, kTable, kIndex) \ 109 \ 110 /* Interpreter */ \ 111 ASM(InterpreterEntryTrampoline) \ 112 ASM(InterpreterPushArgsThenCall) \ 113 ASM(InterpreterPushUndefinedAndArgsThenCall) \ 114 ASM(InterpreterPushArgsThenCallWithFinalSpread) \ 115 ASM(InterpreterPushArgsThenConstruct) \ 116 ASM(InterpreterPushArgsThenConstructArrayFunction) \ 117 ASM(InterpreterPushArgsThenConstructWithFinalSpread) \ 118 ASM(InterpreterEnterBytecodeAdvance) \ 119 ASM(InterpreterEnterBytecodeDispatch) \ 120 ASM(InterpreterOnStackReplacement) \ 121 \ 122 /* Code life-cycle */ \ 123 ASM(CompileLazy) \ 124 ASM(CompileLazyDeoptimizedCode) \ 125 ASM(DeserializeLazy) \ 126 ASM(InstantiateAsmJs) \ 127 ASM(NotifyDeoptimized) \ 128 \ 129 /* Trampolines called when returning from a deoptimization that expects */ \ 130 /* to continue in a JavaScript builtin to finish the functionality of a */ \ 131 /* an TF-inlined version of builtin that has side-effects. */ \ 132 /* */ \ 133 /* The trampolines work as follows: */ \ 134 /* 1. Trampoline restores input register values that */ \ 135 /* the builtin expects from a BuiltinContinuationFrame. */ \ 136 /* 2. Trampoline tears down BuiltinContinuationFrame. */ \ 137 /* 3. Trampoline jumps to the builtin's address. */ \ 138 /* 4. Builtin executes as if invoked by the frame above it. */ \ 139 /* 5. When the builtin returns, execution resumes normally in the */ \ 140 /* calling frame, processing any return result from the JavaScript */ \ 141 /* builtin as if it had called the builtin directly. */ \ 142 /* */ \ 143 /* There are two variants of the stub that differ in their handling of a */ \ 144 /* value returned by the next frame deeper on the stack. For LAZY deopts, */ \ 145 /* the return value (e.g. rax on x64) is explicitly passed as an extra */ \ 146 /* stack parameter to the JavaScript builtin by the "WithResult" */ \ 147 /* trampoline variant. The plain variant is used in EAGER deopt contexts */ \ 148 /* and has no such special handling. */ \ 149 ASM(ContinueToCodeStubBuiltin) \ 150 ASM(ContinueToCodeStubBuiltinWithResult) \ 151 ASM(ContinueToJavaScriptBuiltin) \ 152 ASM(ContinueToJavaScriptBuiltinWithResult) \ 153 \ 154 ASM(OnStackReplacement) \ 155 \ 156 /* API callback handling */ \ 157 API(HandleApiCall) \ 158 API(HandleApiCallAsFunction) \ 159 API(HandleApiCallAsConstructor) \ 160 \ 161 /* Adapters for Turbofan into runtime */ \ 162 ASM(AllocateInNewSpace) \ 163 ASM(AllocateInOldSpace) \ 164 \ 165 /* TurboFan support builtins */ \ 166 TFS(CopyFastSmiOrObjectElements, kObject) \ 167 TFC(GrowFastDoubleElements, GrowArrayElements, 1) \ 168 TFC(GrowFastSmiOrObjectElements, GrowArrayElements, 1) \ 169 TFC(NewArgumentsElements, NewArgumentsElements, 1) \ 170 \ 171 /* Debugger */ \ 172 TFJ(DebugBreakTrampoline, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 173 ASM(FrameDropperTrampoline) \ 174 ASM(HandleDebuggerStatement) \ 175 \ 176 /* Type conversions */ \ 177 TFC(ToObject, TypeConversion, 1) \ 178 TFC(ToBoolean, TypeConversion, 1) \ 179 TFC(OrdinaryToPrimitive_Number, TypeConversion, 1) \ 180 TFC(OrdinaryToPrimitive_String, TypeConversion, 1) \ 181 TFC(NonPrimitiveToPrimitive_Default, TypeConversion, 1) \ 182 TFC(NonPrimitiveToPrimitive_Number, TypeConversion, 1) \ 183 TFC(NonPrimitiveToPrimitive_String, TypeConversion, 1) \ 184 TFC(StringToNumber, TypeConversion, 1) \ 185 TFC(ToName, TypeConversion, 1) \ 186 TFC(NonNumberToNumber, TypeConversion, 1) \ 187 TFC(NonNumberToNumeric, TypeConversion, 1) \ 188 TFC(ToNumber, TypeConversion, 1) \ 189 TFC(ToNumeric, TypeConversion, 1) \ 190 TFC(NumberToString, TypeConversion, 1) \ 191 TFC(ToString, TypeConversion, 1) \ 192 TFC(ToInteger, TypeConversion, 1) \ 193 TFC(ToInteger_TruncateMinusZero, TypeConversion, 1) \ 194 TFC(ToLength, TypeConversion, 1) \ 195 TFC(Typeof, Typeof, 1) \ 196 TFC(GetSuperConstructor, Typeof, 1) \ 197 \ 198 /* Type conversions continuations */ \ 199 TFC(ToBooleanLazyDeoptContinuation, TypeConversionStackParameter, 1) \ 200 \ 201 /* Handlers */ \ 202 TFH(KeyedLoadIC_Megamorphic, LoadWithVector) \ 203 TFH(KeyedLoadIC_PolymorphicName, LoadWithVector) \ 204 TFH(KeyedLoadIC_Slow, LoadWithVector) \ 205 TFH(KeyedStoreIC_Megamorphic, StoreWithVector) \ 206 TFH(KeyedStoreIC_Slow, StoreWithVector) \ 207 TFH(LoadGlobalIC_Slow, LoadWithVector) \ 208 TFH(LoadIC_FunctionPrototype, LoadWithVector) \ 209 TFH(LoadIC_Slow, LoadWithVector) \ 210 TFH(LoadIC_StringLength, LoadWithVector) \ 211 TFH(LoadIC_StringWrapperLength, LoadWithVector) \ 212 TFH(LoadIC_Uninitialized, LoadWithVector) \ 213 TFH(StoreGlobalIC_Slow, StoreWithVector) \ 214 TFH(StoreIC_Uninitialized, StoreWithVector) \ 215 TFH(StoreInArrayLiteralIC_Slow, StoreWithVector) \ 216 \ 217 /* Microtask helpers */ \ 218 TFS(EnqueueMicrotask, kMicrotask) \ 219 TFC(RunMicrotasks, RunMicrotasks, 1) \ 220 \ 221 /* Object property helpers */ \ 222 TFS(HasProperty, kKey, kObject) \ 223 TFS(DeleteProperty, kObject, kKey, kLanguageMode) \ 224 \ 225 /* Abort */ \ 226 ASM(Abort) \ 227 TFC(AbortJS, AbortJS, 1) \ 228 \ 229 /* Built-in functions for Javascript */ \ 230 /* Special internal builtins */ \ 231 CPP(EmptyFunction) \ 232 CPP(Illegal) \ 233 CPP(StrictPoisonPillThrower) \ 234 CPP(UnsupportedThrower) \ 235 TFJ(ReturnReceiver, 0) \ 236 \ 237 /* Array */ \ 238 ASM(ArrayConstructor) \ 239 ASM(InternalArrayConstructor) \ 240 CPP(ArrayConcat) \ 241 /* ES6 #sec-array.isarray */ \ 242 TFJ(ArrayIsArray, 1, kArg) \ 243 /* ES6 #sec-array.from */ \ 244 TFJ(ArrayFrom, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 245 /* ES6 #sec-array.of */ \ 246 TFJ(ArrayOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 247 /* ES7 #sec-array.prototype.includes */ \ 248 TFS(ArrayIncludesSmiOrObject, kElements, kSearchElement, kLength, \ 249 kFromIndex) \ 250 TFS(ArrayIncludesPackedDoubles, kElements, kSearchElement, kLength, \ 251 kFromIndex) \ 252 TFS(ArrayIncludesHoleyDoubles, kElements, kSearchElement, kLength, \ 253 kFromIndex) \ 254 TFJ(ArrayIncludes, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 255 /* ES6 #sec-array.prototype.indexof */ \ 256 TFS(ArrayIndexOfSmiOrObject, kElements, kSearchElement, kLength, kFromIndex) \ 257 TFS(ArrayIndexOfPackedDoubles, kElements, kSearchElement, kLength, \ 258 kFromIndex) \ 259 TFS(ArrayIndexOfHoleyDoubles, kElements, kSearchElement, kLength, \ 260 kFromIndex) \ 261 TFJ(ArrayIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 262 /* ES6 #sec-array.prototype.pop */ \ 263 CPP(ArrayPop) \ 264 TFJ(ArrayPrototypePop, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 265 /* ES6 #sec-array.prototype.push */ \ 266 CPP(ArrayPush) \ 267 TFJ(ArrayPrototypePush, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 268 /* ES6 #sec-array.prototype.shift */ \ 269 CPP(ArrayShift) \ 270 TFJ(ArrayPrototypeShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 271 /* ES6 #sec-array.prototype.slice */ \ 272 TFJ(ArrayPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 273 /* ES6 #sec-array.prototype.splice */ \ 274 CPP(ArraySplice) \ 275 /* ES6 #sec-array.prototype.unshift */ \ 276 CPP(ArrayUnshift) \ 277 /* Support for Array.from and other array-copying idioms */ \ 278 TFS(CloneFastJSArray, kSource) \ 279 TFS(ExtractFastJSArray, kSource, kBegin, kCount) \ 280 /* ES6 #sec-array.prototype.every */ \ 281 TFS(ArrayEveryLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 282 kObject, kInitialK, kLength, kTo) \ 283 TFJ(ArrayEveryLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \ 284 kInitialK, kLength) \ 285 TFJ(ArrayEveryLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, \ 286 kInitialK, kLength, kResult) \ 287 TFJ(ArrayEvery, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 288 /* ES6 #sec-array.prototype.some */ \ 289 TFS(ArraySomeLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 290 kObject, kInitialK, kLength, kTo) \ 291 TFJ(ArraySomeLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \ 292 kInitialK, kLength) \ 293 TFJ(ArraySomeLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, kInitialK, \ 294 kLength, kResult) \ 295 TFJ(ArraySome, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 296 /* ES6 #sec-array.prototype.filter */ \ 297 TFS(ArrayFilterLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 298 kObject, kInitialK, kLength, kTo) \ 299 TFJ(ArrayFilter, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 300 TFJ(ArrayFilterLoopEagerDeoptContinuation, 6, kCallbackFn, kThisArg, kArray, \ 301 kInitialK, kLength, kTo) \ 302 TFJ(ArrayFilterLoopLazyDeoptContinuation, 8, kCallbackFn, kThisArg, kArray, \ 303 kInitialK, kLength, kValueK, kTo, kResult) \ 304 /* ES6 #sec-array.prototype.foreach */ \ 305 TFS(ArrayMapLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 306 kObject, kInitialK, kLength, kTo) \ 307 TFJ(ArrayMapLoopEagerDeoptContinuation, 5, kCallbackFn, kThisArg, kArray, \ 308 kInitialK, kLength) \ 309 TFJ(ArrayMapLoopLazyDeoptContinuation, 6, kCallbackFn, kThisArg, kArray, \ 310 kInitialK, kLength, kResult) \ 311 TFJ(ArrayMap, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 312 /* ES6 #sec-array.prototype.reduce */ \ 313 TFS(ArrayReduceLoopContinuation, kReceiver, kCallbackFn, kThisArg, \ 314 kAccumulator, kObject, kInitialK, kLength, kTo) \ 315 TFJ(ArrayReducePreLoopEagerDeoptContinuation, 2, kCallbackFn, kLength) \ 316 TFJ(ArrayReduceLoopEagerDeoptContinuation, 4, kCallbackFn, kInitialK, \ 317 kLength, kAccumulator) \ 318 TFJ(ArrayReduceLoopLazyDeoptContinuation, 4, kCallbackFn, kInitialK, \ 319 kLength, kResult) \ 320 TFJ(ArrayReduce, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 321 /* ES6 #sec-array.prototype.reduceRight */ \ 322 TFS(ArrayReduceRightLoopContinuation, kReceiver, kCallbackFn, kThisArg, \ 323 kAccumulator, kObject, kInitialK, kLength, kTo) \ 324 TFJ(ArrayReduceRightPreLoopEagerDeoptContinuation, 2, kCallbackFn, kLength) \ 325 TFJ(ArrayReduceRightLoopEagerDeoptContinuation, 4, kCallbackFn, kInitialK, \ 326 kLength, kAccumulator) \ 327 TFJ(ArrayReduceRightLoopLazyDeoptContinuation, 4, kCallbackFn, kInitialK, \ 328 kLength, kResult) \ 329 TFJ(ArrayReduceRight, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 330 /* ES6 #sec-array.prototype.entries */ \ 331 TFJ(ArrayPrototypeEntries, 0) \ 332 /* ES6 #sec-array.prototype.find */ \ 333 TFS(ArrayFindLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 334 kObject, kInitialK, kLength, kTo) \ 335 TFJ(ArrayFindLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \ 336 kInitialK, kLength) \ 337 TFJ(ArrayFindLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, kInitialK, \ 338 kLength, kResult) \ 339 TFJ(ArrayFindLoopAfterCallbackLazyDeoptContinuation, 6, kCallbackFn, \ 340 kThisArg, kInitialK, kLength, kFoundValue, kIsFound) \ 341 TFJ(ArrayPrototypeFind, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 342 /* ES6 #sec-array.prototype.findIndex */ \ 343 TFS(ArrayFindIndexLoopContinuation, kReceiver, kCallbackFn, kThisArg, \ 344 kArray, kObject, kInitialK, kLength, kTo) \ 345 TFJ(ArrayFindIndexLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \ 346 kInitialK, kLength) \ 347 TFJ(ArrayFindIndexLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, \ 348 kInitialK, kLength, kResult) \ 349 TFJ(ArrayFindIndexLoopAfterCallbackLazyDeoptContinuation, 6, kCallbackFn, \ 350 kThisArg, kInitialK, kLength, kFoundValue, kIsFound) \ 351 TFJ(ArrayPrototypeFindIndex, \ 352 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 353 /* ES6 #sec-array.prototype.keys */ \ 354 TFJ(ArrayPrototypeKeys, 0) \ 355 /* ES6 #sec-array.prototype.values */ \ 356 TFJ(ArrayPrototypeValues, 0) \ 357 /* ES6 #sec-%arrayiteratorprototype%.next */ \ 358 TFJ(ArrayIteratorPrototypeNext, 0) \ 359 /* https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray */ \ 360 TFS(FlattenIntoArray, kTarget, kSource, kSourceLength, kStart, kDepth) \ 361 TFS(FlatMapIntoArray, kTarget, kSource, kSourceLength, kStart, kDepth, \ 362 kMapperFunction, kThisArg) \ 363 /* https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten */ \ 364 TFJ(ArrayPrototypeFlatten, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 365 /* https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap */ \ 366 TFJ(ArrayPrototypeFlatMap, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 367 \ 368 /* ArrayBuffer */ \ 369 /* ES #sec-arraybuffer-constructor */ \ 370 CPP(ArrayBufferConstructor) \ 371 CPP(ArrayBufferConstructor_DoNotInitialize) \ 372 CPP(ArrayBufferPrototypeGetByteLength) \ 373 CPP(ArrayBufferIsView) \ 374 CPP(ArrayBufferPrototypeSlice) \ 375 \ 376 /* AsyncFunction */ \ 377 TFJ(AsyncFunctionAwaitCaught, 3, kGenerator, kAwaited, kOuterPromise) \ 378 TFJ(AsyncFunctionAwaitUncaught, 3, kGenerator, kAwaited, kOuterPromise) \ 379 TFJ(AsyncFunctionAwaitRejectClosure, 1, kSentError) \ 380 TFJ(AsyncFunctionAwaitResolveClosure, 1, kSentValue) \ 381 TFJ(AsyncFunctionPromiseCreate, 0) \ 382 TFJ(AsyncFunctionPromiseRelease, 1, kPromise) \ 383 \ 384 /* BigInt */ \ 385 CPP(BigIntConstructor) \ 386 CPP(BigIntAsUintN) \ 387 CPP(BigIntAsIntN) \ 388 CPP(BigIntPrototypeToLocaleString) \ 389 CPP(BigIntPrototypeToString) \ 390 CPP(BigIntPrototypeValueOf) \ 391 \ 392 /* Boolean */ \ 393 /* ES #sec-boolean-constructor */ \ 394 CPP(BooleanConstructor) \ 395 /* ES6 #sec-boolean.prototype.tostring */ \ 396 TFJ(BooleanPrototypeToString, 0) \ 397 /* ES6 #sec-boolean.prototype.valueof */ \ 398 TFJ(BooleanPrototypeValueOf, 0) \ 399 \ 400 /* CallSite */ \ 401 CPP(CallSitePrototypeGetColumnNumber) \ 402 CPP(CallSitePrototypeGetEvalOrigin) \ 403 CPP(CallSitePrototypeGetFileName) \ 404 CPP(CallSitePrototypeGetFunction) \ 405 CPP(CallSitePrototypeGetFunctionName) \ 406 CPP(CallSitePrototypeGetLineNumber) \ 407 CPP(CallSitePrototypeGetMethodName) \ 408 CPP(CallSitePrototypeGetPosition) \ 409 CPP(CallSitePrototypeGetScriptNameOrSourceURL) \ 410 CPP(CallSitePrototypeGetThis) \ 411 CPP(CallSitePrototypeGetTypeName) \ 412 CPP(CallSitePrototypeIsConstructor) \ 413 CPP(CallSitePrototypeIsEval) \ 414 CPP(CallSitePrototypeIsNative) \ 415 CPP(CallSitePrototypeIsToplevel) \ 416 CPP(CallSitePrototypeToString) \ 417 \ 418 /* Console */ \ 419 CPP(ConsoleDebug) \ 420 CPP(ConsoleError) \ 421 CPP(ConsoleInfo) \ 422 CPP(ConsoleLog) \ 423 CPP(ConsoleWarn) \ 424 CPP(ConsoleDir) \ 425 CPP(ConsoleDirXml) \ 426 CPP(ConsoleTable) \ 427 CPP(ConsoleTrace) \ 428 CPP(ConsoleGroup) \ 429 CPP(ConsoleGroupCollapsed) \ 430 CPP(ConsoleGroupEnd) \ 431 CPP(ConsoleClear) \ 432 CPP(ConsoleCount) \ 433 CPP(ConsoleCountReset) \ 434 CPP(ConsoleAssert) \ 435 TFJ(FastConsoleAssert, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 436 CPP(ConsoleMarkTimeline) \ 437 CPP(ConsoleProfile) \ 438 CPP(ConsoleProfileEnd) \ 439 CPP(ConsoleTimeline) \ 440 CPP(ConsoleTimelineEnd) \ 441 CPP(ConsoleTime) \ 442 CPP(ConsoleTimeEnd) \ 443 CPP(ConsoleTimeStamp) \ 444 CPP(ConsoleContext) \ 445 \ 446 /* DataView */ \ 447 /* ES #sec-dataview-constructor */ \ 448 CPP(DataViewConstructor) \ 449 CPP(DataViewPrototypeGetBuffer) \ 450 CPP(DataViewPrototypeGetByteLength) \ 451 CPP(DataViewPrototypeGetByteOffset) \ 452 CPP(DataViewPrototypeGetInt8) \ 453 CPP(DataViewPrototypeSetInt8) \ 454 CPP(DataViewPrototypeGetUint8) \ 455 CPP(DataViewPrototypeSetUint8) \ 456 CPP(DataViewPrototypeGetInt16) \ 457 CPP(DataViewPrototypeSetInt16) \ 458 CPP(DataViewPrototypeGetUint16) \ 459 CPP(DataViewPrototypeSetUint16) \ 460 CPP(DataViewPrototypeGetInt32) \ 461 CPP(DataViewPrototypeSetInt32) \ 462 CPP(DataViewPrototypeGetUint32) \ 463 CPP(DataViewPrototypeSetUint32) \ 464 CPP(DataViewPrototypeGetFloat32) \ 465 CPP(DataViewPrototypeSetFloat32) \ 466 CPP(DataViewPrototypeGetFloat64) \ 467 CPP(DataViewPrototypeSetFloat64) \ 468 CPP(DataViewPrototypeGetBigInt64) \ 469 CPP(DataViewPrototypeSetBigInt64) \ 470 CPP(DataViewPrototypeGetBigUint64) \ 471 CPP(DataViewPrototypeSetBigUint64) \ 472 \ 473 /* Date */ \ 474 /* ES #sec-date-constructor */ \ 475 CPP(DateConstructor) \ 476 /* ES6 #sec-date.prototype.getdate */ \ 477 TFJ(DatePrototypeGetDate, 0) \ 478 /* ES6 #sec-date.prototype.getday */ \ 479 TFJ(DatePrototypeGetDay, 0) \ 480 /* ES6 #sec-date.prototype.getfullyear */ \ 481 TFJ(DatePrototypeGetFullYear, 0) \ 482 /* ES6 #sec-date.prototype.gethours */ \ 483 TFJ(DatePrototypeGetHours, 0) \ 484 /* ES6 #sec-date.prototype.getmilliseconds */ \ 485 TFJ(DatePrototypeGetMilliseconds, 0) \ 486 /* ES6 #sec-date.prototype.getminutes */ \ 487 TFJ(DatePrototypeGetMinutes, 0) \ 488 /* ES6 #sec-date.prototype.getmonth */ \ 489 TFJ(DatePrototypeGetMonth, 0) \ 490 /* ES6 #sec-date.prototype.getseconds */ \ 491 TFJ(DatePrototypeGetSeconds, 0) \ 492 /* ES6 #sec-date.prototype.gettime */ \ 493 TFJ(DatePrototypeGetTime, 0) \ 494 /* ES6 #sec-date.prototype.gettimezoneoffset */ \ 495 TFJ(DatePrototypeGetTimezoneOffset, 0) \ 496 /* ES6 #sec-date.prototype.getutcdate */ \ 497 TFJ(DatePrototypeGetUTCDate, 0) \ 498 /* ES6 #sec-date.prototype.getutcday */ \ 499 TFJ(DatePrototypeGetUTCDay, 0) \ 500 /* ES6 #sec-date.prototype.getutcfullyear */ \ 501 TFJ(DatePrototypeGetUTCFullYear, 0) \ 502 /* ES6 #sec-date.prototype.getutchours */ \ 503 TFJ(DatePrototypeGetUTCHours, 0) \ 504 /* ES6 #sec-date.prototype.getutcmilliseconds */ \ 505 TFJ(DatePrototypeGetUTCMilliseconds, 0) \ 506 /* ES6 #sec-date.prototype.getutcminutes */ \ 507 TFJ(DatePrototypeGetUTCMinutes, 0) \ 508 /* ES6 #sec-date.prototype.getutcmonth */ \ 509 TFJ(DatePrototypeGetUTCMonth, 0) \ 510 /* ES6 #sec-date.prototype.getutcseconds */ \ 511 TFJ(DatePrototypeGetUTCSeconds, 0) \ 512 /* ES6 #sec-date.prototype.valueof */ \ 513 TFJ(DatePrototypeValueOf, 0) \ 514 /* ES6 #sec-date.prototype-@@toprimitive */ \ 515 TFJ(DatePrototypeToPrimitive, 1, kHint) \ 516 CPP(DatePrototypeGetYear) \ 517 CPP(DatePrototypeSetYear) \ 518 CPP(DateNow) \ 519 CPP(DateParse) \ 520 CPP(DatePrototypeSetDate) \ 521 CPP(DatePrototypeSetFullYear) \ 522 CPP(DatePrototypeSetHours) \ 523 CPP(DatePrototypeSetMilliseconds) \ 524 CPP(DatePrototypeSetMinutes) \ 525 CPP(DatePrototypeSetMonth) \ 526 CPP(DatePrototypeSetSeconds) \ 527 CPP(DatePrototypeSetTime) \ 528 CPP(DatePrototypeSetUTCDate) \ 529 CPP(DatePrototypeSetUTCFullYear) \ 530 CPP(DatePrototypeSetUTCHours) \ 531 CPP(DatePrototypeSetUTCMilliseconds) \ 532 CPP(DatePrototypeSetUTCMinutes) \ 533 CPP(DatePrototypeSetUTCMonth) \ 534 CPP(DatePrototypeSetUTCSeconds) \ 535 CPP(DatePrototypeToDateString) \ 536 CPP(DatePrototypeToISOString) \ 537 CPP(DatePrototypeToUTCString) \ 538 CPP(DatePrototypeToString) \ 539 CPP(DatePrototypeToTimeString) \ 540 CPP(DatePrototypeToJson) \ 541 CPP(DateUTC) \ 542 \ 543 /* Error */ \ 544 CPP(ErrorConstructor) \ 545 CPP(ErrorCaptureStackTrace) \ 546 CPP(ErrorPrototypeToString) \ 547 CPP(MakeError) \ 548 CPP(MakeRangeError) \ 549 CPP(MakeSyntaxError) \ 550 CPP(MakeTypeError) \ 551 CPP(MakeURIError) \ 552 \ 553 /* Function */ \ 554 CPP(FunctionConstructor) \ 555 ASM(FunctionPrototypeApply) \ 556 CPP(FunctionPrototypeBind) \ 557 /* ES6 #sec-function.prototype.bind */ \ 558 TFJ(FastFunctionPrototypeBind, \ 559 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 560 ASM(FunctionPrototypeCall) \ 561 /* ES6 #sec-function.prototype-@@hasinstance */ \ 562 TFJ(FunctionPrototypeHasInstance, 1, kV) \ 563 /* ES6 #sec-function.prototype.tostring */ \ 564 CPP(FunctionPrototypeToString) \ 565 \ 566 /* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \ 567 TFS(CreateIterResultObject, kValue, kDone) \ 568 \ 569 /* Generator and Async */ \ 570 TFS(CreateGeneratorObject, kClosure, kReceiver) \ 571 CPP(GeneratorFunctionConstructor) \ 572 /* ES6 #sec-generator.prototype.next */ \ 573 TFJ(GeneratorPrototypeNext, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 574 /* ES6 #sec-generator.prototype.return */ \ 575 TFJ(GeneratorPrototypeReturn, \ 576 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 577 /* ES6 #sec-generator.prototype.throw */ \ 578 TFJ(GeneratorPrototypeThrow, \ 579 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 580 CPP(AsyncFunctionConstructor) \ 581 \ 582 /* Global object */ \ 583 CPP(GlobalDecodeURI) \ 584 CPP(GlobalDecodeURIComponent) \ 585 CPP(GlobalEncodeURI) \ 586 CPP(GlobalEncodeURIComponent) \ 587 CPP(GlobalEscape) \ 588 CPP(GlobalUnescape) \ 589 CPP(GlobalEval) \ 590 /* ES6 #sec-isfinite-number */ \ 591 TFJ(GlobalIsFinite, 1, kNumber) \ 592 /* ES6 #sec-isnan-number */ \ 593 TFJ(GlobalIsNaN, 1, kNumber) \ 594 \ 595 /* JSON */ \ 596 CPP(JsonParse) \ 597 CPP(JsonStringify) \ 598 \ 599 /* ICs */ \ 600 TFH(LoadIC, LoadWithVector) \ 601 TFH(LoadIC_Noninlined, LoadWithVector) \ 602 TFH(LoadICTrampoline, Load) \ 603 TFH(KeyedLoadIC, LoadWithVector) \ 604 TFH(KeyedLoadICTrampoline, Load) \ 605 TFH(StoreGlobalIC, StoreGlobalWithVector) \ 606 TFH(StoreGlobalICTrampoline, StoreGlobal) \ 607 TFH(StoreIC, StoreWithVector) \ 608 TFH(StoreICTrampoline, Store) \ 609 TFH(KeyedStoreIC, StoreWithVector) \ 610 TFH(KeyedStoreICTrampoline, Store) \ 611 TFH(StoreInArrayLiteralIC, StoreWithVector) \ 612 TFH(LoadGlobalIC, LoadGlobalWithVector) \ 613 TFH(LoadGlobalICInsideTypeof, LoadGlobalWithVector) \ 614 TFH(LoadGlobalICTrampoline, LoadGlobal) \ 615 TFH(LoadGlobalICInsideTypeofTrampoline, LoadGlobal) \ 616 \ 617 /* Map */ \ 618 TFS(FindOrderedHashMapEntry, kTable, kKey) \ 619 TFJ(MapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 620 TFJ(MapPrototypeSet, 2, kKey, kValue) \ 621 TFJ(MapPrototypeDelete, 1, kKey) \ 622 TFJ(MapPrototypeGet, 1, kKey) \ 623 TFJ(MapPrototypeHas, 1, kKey) \ 624 CPP(MapPrototypeClear) \ 625 /* ES #sec-map.prototype.entries */ \ 626 TFJ(MapPrototypeEntries, 0) \ 627 /* ES #sec-get-map.prototype.size */ \ 628 TFJ(MapPrototypeGetSize, 0) \ 629 /* ES #sec-map.prototype.forEach */ \ 630 TFJ(MapPrototypeForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 631 /* ES #sec-map.prototype.keys */ \ 632 TFJ(MapPrototypeKeys, 0) \ 633 /* ES #sec-map.prototype.values */ \ 634 TFJ(MapPrototypeValues, 0) \ 635 /* ES #sec-%mapiteratorprototype%.next */ \ 636 TFJ(MapIteratorPrototypeNext, 0) \ 637 \ 638 /* Math */ \ 639 /* ES6 #sec-math.abs */ \ 640 TFJ(MathAbs, 1, kX) \ 641 /* ES6 #sec-math.acos */ \ 642 TFJ(MathAcos, 1, kX) \ 643 /* ES6 #sec-math.acosh */ \ 644 TFJ(MathAcosh, 1, kX) \ 645 /* ES6 #sec-math.asin */ \ 646 TFJ(MathAsin, 1, kX) \ 647 /* ES6 #sec-math.asinh */ \ 648 TFJ(MathAsinh, 1, kX) \ 649 /* ES6 #sec-math.atan */ \ 650 TFJ(MathAtan, 1, kX) \ 651 /* ES6 #sec-math.atanh */ \ 652 TFJ(MathAtanh, 1, kX) \ 653 /* ES6 #sec-math.atan2 */ \ 654 TFJ(MathAtan2, 2, kY, kX) \ 655 /* ES6 #sec-math.cbrt */ \ 656 TFJ(MathCbrt, 1, kX) \ 657 /* ES6 #sec-math.ceil */ \ 658 TFJ(MathCeil, 1, kX) \ 659 /* ES6 #sec-math.clz32 */ \ 660 TFJ(MathClz32, 1, kX) \ 661 /* ES6 #sec-math.cos */ \ 662 TFJ(MathCos, 1, kX) \ 663 /* ES6 #sec-math.cosh */ \ 664 TFJ(MathCosh, 1, kX) \ 665 /* ES6 #sec-math.exp */ \ 666 TFJ(MathExp, 1, kX) \ 667 /* ES6 #sec-math.expm1 */ \ 668 TFJ(MathExpm1, 1, kX) \ 669 /* ES6 #sec-math.floor */ \ 670 TFJ(MathFloor, 1, kX) \ 671 /* ES6 #sec-math.fround */ \ 672 TFJ(MathFround, 1, kX) \ 673 /* ES6 #sec-math.hypot */ \ 674 CPP(MathHypot) \ 675 /* ES6 #sec-math.imul */ \ 676 TFJ(MathImul, 2, kX, kY) \ 677 /* ES6 #sec-math.log */ \ 678 TFJ(MathLog, 1, kX) \ 679 /* ES6 #sec-math.log1p */ \ 680 TFJ(MathLog1p, 1, kX) \ 681 /* ES6 #sec-math.log10 */ \ 682 TFJ(MathLog10, 1, kX) \ 683 /* ES6 #sec-math.log2 */ \ 684 TFJ(MathLog2, 1, kX) \ 685 /* ES6 #sec-math.max */ \ 686 TFJ(MathMax, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 687 /* ES6 #sec-math.min */ \ 688 TFJ(MathMin, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 689 /* ES6 #sec-math.pow */ \ 690 TFJ(MathPow, 2, kBase, kExponent) \ 691 /* ES6 #sec-math.random */ \ 692 TFJ(MathRandom, 0) \ 693 /* ES6 #sec-math.round */ \ 694 TFJ(MathRound, 1, kX) \ 695 /* ES6 #sec-math.sign */ \ 696 TFJ(MathSign, 1, kX) \ 697 /* ES6 #sec-math.sin */ \ 698 TFJ(MathSin, 1, kX) \ 699 /* ES6 #sec-math.sinh */ \ 700 TFJ(MathSinh, 1, kX) \ 701 /* ES6 #sec-math.sqrt */ \ 702 TFJ(MathTan, 1, kX) \ 703 /* ES6 #sec-math.tan */ \ 704 TFJ(MathTanh, 1, kX) \ 705 /* ES6 #sec-math.tanh */ \ 706 TFJ(MathSqrt, 1, kX) \ 707 /* ES6 #sec-math.trunc */ \ 708 TFJ(MathTrunc, 1, kX) \ 709 \ 710 /* Number */ \ 711 TFC(AllocateHeapNumber, AllocateHeapNumber, 1) \ 712 /* ES #sec-number-constructor */ \ 713 TFJ(NumberConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 714 /* ES6 #sec-number.isfinite */ \ 715 TFJ(NumberIsFinite, 1, kNumber) \ 716 /* ES6 #sec-number.isinteger */ \ 717 TFJ(NumberIsInteger, 1, kNumber) \ 718 /* ES6 #sec-number.isnan */ \ 719 TFJ(NumberIsNaN, 1, kNumber) \ 720 /* ES6 #sec-number.issafeinteger */ \ 721 TFJ(NumberIsSafeInteger, 1, kNumber) \ 722 /* ES6 #sec-number.parsefloat */ \ 723 TFJ(NumberParseFloat, 1, kString) \ 724 /* ES6 #sec-number.parseint */ \ 725 TFJ(NumberParseInt, 2, kString, kRadix) \ 726 TFS(ParseInt, kString, kRadix) \ 727 CPP(NumberPrototypeToExponential) \ 728 CPP(NumberPrototypeToFixed) \ 729 CPP(NumberPrototypeToLocaleString) \ 730 CPP(NumberPrototypeToPrecision) \ 731 CPP(NumberPrototypeToString) \ 732 /* ES6 #sec-number.prototype.valueof */ \ 733 TFJ(NumberPrototypeValueOf, 0) \ 734 TFC(Add, BinaryOp, 1) \ 735 TFC(Subtract, BinaryOp, 1) \ 736 TFC(Multiply, BinaryOp, 1) \ 737 TFC(Divide, BinaryOp, 1) \ 738 TFC(Modulus, BinaryOp, 1) \ 739 TFC(Exponentiate, BinaryOp, 1) \ 740 TFC(BitwiseAnd, BinaryOp, 1) \ 741 TFC(BitwiseOr, BinaryOp, 1) \ 742 TFC(BitwiseXor, BinaryOp, 1) \ 743 TFC(ShiftLeft, BinaryOp, 1) \ 744 TFC(ShiftRight, BinaryOp, 1) \ 745 TFC(ShiftRightLogical, BinaryOp, 1) \ 746 TFC(LessThan, Compare, 1) \ 747 TFC(LessThanOrEqual, Compare, 1) \ 748 TFC(GreaterThan, Compare, 1) \ 749 TFC(GreaterThanOrEqual, Compare, 1) \ 750 TFC(Equal, Compare, 1) \ 751 TFC(SameValue, Compare, 1) \ 752 TFC(StrictEqual, Compare, 1) \ 753 TFS(BitwiseNot, kValue) \ 754 TFS(Decrement, kValue) \ 755 TFS(Increment, kValue) \ 756 TFS(Negate, kValue) \ 757 \ 758 /* Object */ \ 759 /* ES #sec-object-constructor */ \ 760 TFJ(ObjectConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 761 TFJ(ObjectAssign, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 762 /* ES #sec-object.create */ \ 763 TFJ(ObjectCreate, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 764 TFS(CreateObjectWithoutProperties, kPrototypeArg) \ 765 CPP(ObjectDefineGetter) \ 766 CPP(ObjectDefineProperties) \ 767 CPP(ObjectDefineProperty) \ 768 CPP(ObjectDefineSetter) \ 769 TFJ(ObjectEntries, 1, kObject) \ 770 CPP(ObjectFreeze) \ 771 TFJ(ObjectGetOwnPropertyDescriptor, \ 772 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 773 CPP(ObjectGetOwnPropertyDescriptors) \ 774 CPP(ObjectGetOwnPropertyNames) \ 775 CPP(ObjectGetOwnPropertySymbols) \ 776 CPP(ObjectGetPrototypeOf) \ 777 CPP(ObjectSetPrototypeOf) \ 778 TFJ(ObjectIs, 2, kLeft, kRight) \ 779 CPP(ObjectIsExtensible) \ 780 CPP(ObjectIsFrozen) \ 781 CPP(ObjectIsSealed) \ 782 TFJ(ObjectKeys, 1, kObject) \ 783 CPP(ObjectLookupGetter) \ 784 CPP(ObjectLookupSetter) \ 785 CPP(ObjectPreventExtensions) \ 786 /* ES6 #sec-object.prototype.tostring */ \ 787 TFJ(ObjectPrototypeToString, 0) \ 788 /* ES6 #sec-object.prototype.valueof */ \ 789 TFJ(ObjectPrototypeValueOf, 0) \ 790 /* ES6 #sec-object.prototype.hasownproperty */ \ 791 TFJ(ObjectPrototypeHasOwnProperty, 1, kKey) \ 792 TFJ(ObjectPrototypeIsPrototypeOf, 1, kValue) \ 793 CPP(ObjectPrototypePropertyIsEnumerable) \ 794 CPP(ObjectPrototypeGetProto) \ 795 CPP(ObjectPrototypeSetProto) \ 796 /* ES #sec-object.prototype.tolocalestring */ \ 797 TFJ(ObjectPrototypeToLocaleString, 0) \ 798 CPP(ObjectSeal) \ 799 TFJ(ObjectValues, 1, kObject) \ 800 \ 801 /* instanceof */ \ 802 TFC(OrdinaryHasInstance, Compare, 1) \ 803 TFC(InstanceOf, Compare, 1) \ 804 \ 805 /* for-in */ \ 806 TFS(ForInEnumerate, kReceiver) \ 807 TFS(ForInFilter, kKey, kObject) \ 808 \ 809 /* Promise */ \ 810 /* ES #sec-fulfillpromise */ \ 811 TFS(FulfillPromise, kPromise, kValue) \ 812 /* ES #sec-rejectpromise */ \ 813 TFS(RejectPromise, kPromise, kReason, kDebugEvent) \ 814 /* ES #sec-promise-resolve-functions */ \ 815 /* Starting at step 6 of "Promise Resolve Functions" */ \ 816 TFS(ResolvePromise, kPromise, kResolution) \ 817 /* ES #sec-promise-reject-functions */ \ 818 TFJ(PromiseCapabilityDefaultReject, 1, kReason) \ 819 /* ES #sec-promise-resolve-functions */ \ 820 TFJ(PromiseCapabilityDefaultResolve, 1, kResolution) \ 821 /* ES6 #sec-getcapabilitiesexecutor-functions */ \ 822 TFJ(PromiseGetCapabilitiesExecutor, 2, kResolve, kReject) \ 823 /* ES6 #sec-newpromisecapability */ \ 824 TFS(NewPromiseCapability, kConstructor, kDebugEvent) \ 825 TFJ(PromiseConstructorLazyDeoptContinuation, 4, kPromise, kReject, \ 826 kException, kResult) \ 827 /* ES6 #sec-promise-executor */ \ 828 TFJ(PromiseConstructor, 1, kExecutor) \ 829 CPP(IsPromise) \ 830 /* ES #sec-promise.prototype.then */ \ 831 TFJ(PromisePrototypeThen, 2, kOnFulfilled, kOnRejected) \ 832 /* ES #sec-performpromisethen */ \ 833 TFS(PerformPromiseThen, kPromise, kOnFulfilled, kOnRejected, kResultPromise) \ 834 /* ES #sec-promise.prototype.catch */ \ 835 TFJ(PromisePrototypeCatch, 1, kOnRejected) \ 836 /* ES #sec-promisereactionjob */ \ 837 TFS(PromiseRejectReactionJob, kReason, kHandler, kPromiseOrCapability) \ 838 TFS(PromiseFulfillReactionJob, kValue, kHandler, kPromiseOrCapability) \ 839 /* ES #sec-promiseresolvethenablejob */ \ 840 TFS(PromiseResolveThenableJob, kPromiseToResolve, kThenable, kThen) \ 841 /* ES #sec-promise.resolve */ \ 842 TFJ(PromiseResolveTrampoline, 1, kValue) \ 843 /* ES #sec-promise-resolve */ \ 844 TFS(PromiseResolve, kConstructor, kValue) \ 845 /* ES #sec-promise.reject */ \ 846 TFJ(PromiseReject, 1, kReason) \ 847 TFJ(PromisePrototypeFinally, 1, kOnFinally) \ 848 TFJ(PromiseThenFinally, 1, kValue) \ 849 TFJ(PromiseCatchFinally, 1, kReason) \ 850 TFJ(PromiseValueThunkFinally, 0) \ 851 TFJ(PromiseThrowerFinally, 0) \ 852 /* ES #sec-promise.all */ \ 853 TFJ(PromiseAll, 1, kIterable) \ 854 TFJ(PromiseAllResolveElementClosure, 1, kValue) \ 855 /* ES #sec-promise.race */ \ 856 TFJ(PromiseRace, 1, kIterable) \ 857 /* V8 Extras: v8.createPromise(parent) */ \ 858 TFJ(PromiseInternalConstructor, 1, kParent) \ 859 /* V8 Extras: v8.rejectPromise(promise, reason) */ \ 860 TFJ(PromiseInternalReject, 2, kPromise, kReason) \ 861 /* V8 Extras: v8.resolvePromise(promise, resolution) */ \ 862 TFJ(PromiseInternalResolve, 2, kPromise, kResolution) \ 863 \ 864 /* Proxy */ \ 865 TFJ(ProxyConstructor, 2, kTarget, kHandler) \ 866 TFJ(ProxyRevocable, 2, kTarget, kHandler) \ 867 TFJ(ProxyRevoke, 0) \ 868 TFS(ProxyGetProperty, kProxy, kName, kReceiverValue) \ 869 TFS(ProxyHasProperty, kProxy, kName) \ 870 TFS(ProxySetProperty, kProxy, kName, kValue, kReceiverValue, kLanguageMode) \ 871 \ 872 /* Reflect */ \ 873 ASM(ReflectApply) \ 874 ASM(ReflectConstruct) \ 875 CPP(ReflectDefineProperty) \ 876 CPP(ReflectDeleteProperty) \ 877 CPP(ReflectGet) \ 878 CPP(ReflectGetOwnPropertyDescriptor) \ 879 CPP(ReflectGetPrototypeOf) \ 880 TFJ(ReflectHas, 2, kTarget, kKey) \ 881 CPP(ReflectIsExtensible) \ 882 CPP(ReflectOwnKeys) \ 883 CPP(ReflectPreventExtensions) \ 884 CPP(ReflectSet) \ 885 CPP(ReflectSetPrototypeOf) \ 886 \ 887 /* RegExp */ \ 888 CPP(RegExpCapture1Getter) \ 889 CPP(RegExpCapture2Getter) \ 890 CPP(RegExpCapture3Getter) \ 891 CPP(RegExpCapture4Getter) \ 892 CPP(RegExpCapture5Getter) \ 893 CPP(RegExpCapture6Getter) \ 894 CPP(RegExpCapture7Getter) \ 895 CPP(RegExpCapture8Getter) \ 896 CPP(RegExpCapture9Getter) \ 897 /* ES #sec-regexp-pattern-flags */ \ 898 TFJ(RegExpConstructor, 2, kPattern, kFlags) \ 899 TFJ(RegExpInternalMatch, 2, kRegExp, kString) \ 900 CPP(RegExpInputGetter) \ 901 CPP(RegExpInputSetter) \ 902 CPP(RegExpLastMatchGetter) \ 903 CPP(RegExpLastParenGetter) \ 904 CPP(RegExpLeftContextGetter) \ 905 /* ES #sec-regexp.prototype.compile */ \ 906 TFJ(RegExpPrototypeCompile, 2, kPattern, kFlags) \ 907 /* ES #sec-regexp.prototype.exec */ \ 908 TFJ(RegExpPrototypeExec, 1, kString) \ 909 /* ES #sec-get-regexp.prototype.dotAll */ \ 910 TFJ(RegExpPrototypeDotAllGetter, 0) \ 911 /* ES #sec-get-regexp.prototype.flags */ \ 912 TFJ(RegExpPrototypeFlagsGetter, 0) \ 913 /* ES #sec-get-regexp.prototype.global */ \ 914 TFJ(RegExpPrototypeGlobalGetter, 0) \ 915 /* ES #sec-get-regexp.prototype.ignorecase */ \ 916 TFJ(RegExpPrototypeIgnoreCaseGetter, 0) \ 917 /* ES #sec-regexp.prototype-@@match */ \ 918 TFJ(RegExpPrototypeMatch, 1, kString) \ 919 /* https://tc39.github.io/proposal-string-matchall/ */ \ 920 TFJ(RegExpPrototypeMatchAll, 1, kString) \ 921 /* ES #sec-get-regexp.prototype.multiline */ \ 922 TFJ(RegExpPrototypeMultilineGetter, 0) \ 923 /* ES #sec-regexp.prototype-@@search */ \ 924 TFJ(RegExpPrototypeSearch, 1, kString) \ 925 /* ES #sec-get-regexp.prototype.source */ \ 926 TFJ(RegExpPrototypeSourceGetter, 0) \ 927 /* ES #sec-get-regexp.prototype.sticky */ \ 928 TFJ(RegExpPrototypeStickyGetter, 0) \ 929 /* ES #sec-regexp.prototype.test */ \ 930 TFJ(RegExpPrototypeTest, 1, kString) \ 931 CPP(RegExpPrototypeToString) \ 932 /* ES #sec-get-regexp.prototype.unicode */ \ 933 TFJ(RegExpPrototypeUnicodeGetter, 0) \ 934 CPP(RegExpRightContextGetter) \ 935 \ 936 /* ES #sec-regexp.prototype-@@replace */ \ 937 TFJ(RegExpPrototypeReplace, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 938 /* ES #sec-regexp.prototype-@@split */ \ 939 TFJ(RegExpPrototypeSplit, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 940 /* RegExp helpers */ \ 941 TFS(RegExpExecAtom, kRegExp, kString, kLastIndex, kMatchInfo) \ 942 TFS(RegExpMatchFast, kReceiver, kPattern) \ 943 TFS(RegExpPrototypeExecSlow, kReceiver, kString) \ 944 TFS(RegExpReplace, kRegExp, kString, kReplaceValue) \ 945 TFS(RegExpSearchFast, kReceiver, kPattern) \ 946 TFS(RegExpSplit, kRegExp, kString, kLimit) \ 947 \ 948 /* RegExp String Iterator */ \ 949 /* https://tc39.github.io/proposal-string-matchall/ */ \ 950 TFJ(RegExpStringIteratorPrototypeNext, 0) \ 951 \ 952 /* Set */ \ 953 TFJ(SetConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 954 TFJ(SetPrototypeHas, 1, kKey) \ 955 TFJ(SetPrototypeAdd, 1, kKey) \ 956 TFJ(SetPrototypeDelete, 1, kKey) \ 957 CPP(SetPrototypeClear) \ 958 /* ES #sec-set.prototype.entries */ \ 959 TFJ(SetPrototypeEntries, 0) \ 960 /* ES #sec-get-set.prototype.size */ \ 961 TFJ(SetPrototypeGetSize, 0) \ 962 /* ES #sec-set.prototype.foreach */ \ 963 TFJ(SetPrototypeForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 964 /* ES #sec-set.prototype.values */ \ 965 TFJ(SetPrototypeValues, 0) \ 966 /* ES #sec-%setiteratorprototype%.next */ \ 967 TFJ(SetIteratorPrototypeNext, 0) \ 968 \ 969 /* SharedArrayBuffer */ \ 970 CPP(SharedArrayBufferPrototypeGetByteLength) \ 971 CPP(SharedArrayBufferPrototypeSlice) \ 972 TFJ(AtomicsLoad, 2, kArray, kIndex) \ 973 TFJ(AtomicsStore, 3, kArray, kIndex, kValue) \ 974 TFJ(AtomicsExchange, 3, kArray, kIndex, kValue) \ 975 TFJ(AtomicsCompareExchange, 4, kArray, kIndex, kOldValue, kNewValue) \ 976 TFJ(AtomicsAdd, 3, kArray, kIndex, kValue) \ 977 TFJ(AtomicsSub, 3, kArray, kIndex, kValue) \ 978 TFJ(AtomicsAnd, 3, kArray, kIndex, kValue) \ 979 TFJ(AtomicsOr, 3, kArray, kIndex, kValue) \ 980 TFJ(AtomicsXor, 3, kArray, kIndex, kValue) \ 981 CPP(AtomicsIsLockFree) \ 982 CPP(AtomicsWait) \ 983 CPP(AtomicsWake) \ 984 \ 985 /* String */ \ 986 /* ES #sec-string-constructor */ \ 987 TFJ(StringConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 988 /* ES #sec-string.fromcodepoint */ \ 989 CPP(StringFromCodePoint) \ 990 /* ES6 #sec-string.fromcharcode */ \ 991 TFJ(StringFromCharCode, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 992 /* ES6 #sec-string.prototype.anchor */ \ 993 TFJ(StringPrototypeAnchor, 1, kValue) \ 994 /* ES6 #sec-string.prototype.big */ \ 995 TFJ(StringPrototypeBig, 0) \ 996 /* ES6 #sec-string.prototype.blink */ \ 997 TFJ(StringPrototypeBlink, 0) \ 998 /* ES6 #sec-string.prototype.bold */ \ 999 TFJ(StringPrototypeBold, 0) \ 1000 /* ES6 #sec-string.prototype.charat */ \ 1001 TFJ(StringPrototypeCharAt, 1, kPosition) \ 1002 /* ES6 #sec-string.prototype.charcodeat */ \ 1003 TFJ(StringPrototypeCharCodeAt, 1, kPosition) \ 1004 /* ES6 #sec-string.prototype.codepointat */ \ 1005 TFJ(StringPrototypeCodePointAt, 1, kPosition) \ 1006 /* ES6 #sec-string.prototype.concat */ \ 1007 TFJ(StringPrototypeConcat, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1008 /* ES6 #sec-string.prototype.endswith */ \ 1009 CPP(StringPrototypeEndsWith) \ 1010 /* ES6 #sec-string.prototype.fontcolor */ \ 1011 TFJ(StringPrototypeFontcolor, 1, kValue) \ 1012 /* ES6 #sec-string.prototype.fontsize */ \ 1013 TFJ(StringPrototypeFontsize, 1, kValue) \ 1014 /* ES6 #sec-string.prototype.fixed */ \ 1015 TFJ(StringPrototypeFixed, 0) \ 1016 /* ES6 #sec-string.prototype.includes */ \ 1017 TFJ(StringPrototypeIncludes, \ 1018 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1019 /* ES6 #sec-string.prototype.indexof */ \ 1020 TFJ(StringPrototypeIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1021 /* ES6 #sec-string.prototype.italics */ \ 1022 TFJ(StringPrototypeItalics, 0) \ 1023 /* ES6 #sec-string.prototype.lastindexof */ \ 1024 CPP(StringPrototypeLastIndexOf) \ 1025 /* ES6 #sec-string.prototype.link */ \ 1026 TFJ(StringPrototypeLink, 1, kValue) \ 1027 /* ES6 #sec-string.prototype.match */ \ 1028 TFJ(StringPrototypeMatch, 1, kRegexp) \ 1029 /* ES #sec-string.prototype.matchAll */ \ 1030 TFJ(StringPrototypeMatchAll, 1, kRegexp) \ 1031 /* ES6 #sec-string.prototype.localecompare */ \ 1032 CPP(StringPrototypeLocaleCompare) \ 1033 /* ES6 #sec-string.prototype.padEnd */ \ 1034 TFJ(StringPrototypePadEnd, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1035 /* ES6 #sec-string.prototype.padStart */ \ 1036 TFJ(StringPrototypePadStart, \ 1037 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1038 /* ES6 #sec-string.prototype.repeat */ \ 1039 TFJ(StringPrototypeRepeat, 1, kCount) \ 1040 /* ES6 #sec-string.prototype.replace */ \ 1041 TFJ(StringPrototypeReplace, 2, kSearch, kReplace) \ 1042 /* ES6 #sec-string.prototype.search */ \ 1043 TFJ(StringPrototypeSearch, 1, kRegexp) \ 1044 /* ES6 #sec-string.prototype.slice */ \ 1045 TFJ(StringPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1046 /* ES6 #sec-string.prototype.small */ \ 1047 TFJ(StringPrototypeSmall, 0) \ 1048 /* ES6 #sec-string.prototype.split */ \ 1049 TFJ(StringPrototypeSplit, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1050 /* ES6 #sec-string.prototype.strike */ \ 1051 TFJ(StringPrototypeStrike, 0) \ 1052 /* ES6 #sec-string.prototype.sub */ \ 1053 TFJ(StringPrototypeSub, 0) \ 1054 /* ES6 #sec-string.prototype.substr */ \ 1055 TFJ(StringPrototypeSubstr, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1056 /* ES6 #sec-string.prototype.substring */ \ 1057 TFJ(StringPrototypeSubstring, \ 1058 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1059 /* ES6 #sec-string.prototype.sup */ \ 1060 TFJ(StringPrototypeSup, 0) \ 1061 /* ES6 #sec-string.prototype.startswith */ \ 1062 CPP(StringPrototypeStartsWith) \ 1063 /* ES6 #sec-string.prototype.tostring */ \ 1064 TFJ(StringPrototypeToString, 0) \ 1065 TFJ(StringPrototypeTrim, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1066 TFJ(StringPrototypeTrimEnd, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1067 TFJ(StringPrototypeTrimStart, \ 1068 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1069 /* ES6 #sec-string.prototype.valueof */ \ 1070 TFJ(StringPrototypeValueOf, 0) \ 1071 /* ES6 #sec-string.raw */ \ 1072 CPP(StringRaw) \ 1073 /* ES6 #sec-string.prototype-@@iterator */ \ 1074 TFJ(StringPrototypeIterator, 0) \ 1075 \ 1076 /* StringIterator */ \ 1077 /* ES6 #sec-%stringiteratorprototype%.next */ \ 1078 TFJ(StringIteratorPrototypeNext, 0) \ 1079 \ 1080 /* Symbol */ \ 1081 /* ES #sec-symbol-constructor */ \ 1082 CPP(SymbolConstructor) \ 1083 /* ES6 #sec-symbol.for */ \ 1084 CPP(SymbolFor) \ 1085 /* ES6 #sec-symbol.keyfor */ \ 1086 CPP(SymbolKeyFor) \ 1087 /* ES6 #sec-symbol.prototype-@@toprimitive */ \ 1088 TFJ(SymbolPrototypeToPrimitive, 1, kHint) \ 1089 /* ES6 #sec-symbol.prototype.tostring */ \ 1090 TFJ(SymbolPrototypeToString, 0) \ 1091 /* ES6 #sec-symbol.prototype.valueof */ \ 1092 TFJ(SymbolPrototypeValueOf, 0) \ 1093 \ 1094 /* TypedArray */ \ 1095 TFS(IterableToList, kIterable, kIteratorFn) \ 1096 TFS(TypedArrayInitialize, kHolder, kLength, kElementSize, kInitialize, \ 1097 kBufferConstructor) \ 1098 TFS(TypedArrayInitializeWithBuffer, kHolder, kLength, kBuffer, kElementSize, \ 1099 kByteOffset) \ 1100 /* ES #sec-typedarray-constructors */ \ 1101 TFS(CreateTypedArray, kTarget, kNewTarget, kArg1, kArg2, kArg3) \ 1102 TFJ(TypedArrayBaseConstructor, 0) \ 1103 TFJ(TypedArrayConstructorLazyDeoptContinuation, 1, kResult) \ 1104 TFJ(TypedArrayConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1105 CPP(TypedArrayPrototypeBuffer) \ 1106 /* ES6 #sec-get-%typedarray%.prototype.bytelength */ \ 1107 TFJ(TypedArrayPrototypeByteLength, 0) \ 1108 /* ES6 #sec-get-%typedarray%.prototype.byteoffset */ \ 1109 TFJ(TypedArrayPrototypeByteOffset, 0) \ 1110 /* ES6 #sec-get-%typedarray%.prototype.length */ \ 1111 TFJ(TypedArrayPrototypeLength, 0) \ 1112 /* ES6 #sec-%typedarray%.prototype.entries */ \ 1113 TFJ(TypedArrayPrototypeEntries, 0) \ 1114 /* ES6 #sec-%typedarray%.prototype.keys */ \ 1115 TFJ(TypedArrayPrototypeKeys, 0) \ 1116 /* ES6 #sec-%typedarray%.prototype.values */ \ 1117 TFJ(TypedArrayPrototypeValues, 0) \ 1118 /* ES6 #sec-%typedarray%.prototype.copywithin */ \ 1119 CPP(TypedArrayPrototypeCopyWithin) \ 1120 /* ES6 #sec-%typedarray%.prototype.fill */ \ 1121 CPP(TypedArrayPrototypeFill) \ 1122 /* ES6 #sec-%typedarray%.prototype.filter */ \ 1123 TFJ(TypedArrayPrototypeFilter, \ 1124 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1125 /* ES6 %TypedArray%.prototype.find */ \ 1126 TFJ(TypedArrayPrototypeFind, \ 1127 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1128 /* ES6 %TypedArray%.prototype.findIndex */ \ 1129 TFJ(TypedArrayPrototypeFindIndex, \ 1130 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1131 /* ES7 #sec-%typedarray%.prototype.includes */ \ 1132 CPP(TypedArrayPrototypeIncludes) \ 1133 /* ES6 #sec-%typedarray%.prototype.indexof */ \ 1134 CPP(TypedArrayPrototypeIndexOf) \ 1135 /* ES6 #sec-%typedarray%.prototype.lastindexof */ \ 1136 CPP(TypedArrayPrototypeLastIndexOf) \ 1137 /* ES6 #sec-%typedarray%.prototype.reverse */ \ 1138 CPP(TypedArrayPrototypeReverse) \ 1139 /* ES6 %TypedArray%.prototype.set */ \ 1140 TFJ(TypedArrayPrototypeSet, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1141 /* ES6 #sec-%typedarray%.prototype.slice */ \ 1142 TFJ(TypedArrayPrototypeSlice, \ 1143 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1144 /* ES6 %TypedArray%.prototype.subarray */ \ 1145 TFJ(TypedArrayPrototypeSubArray, \ 1146 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1147 /* ES6 #sec-get-%typedarray%.prototype-@@tostringtag */ \ 1148 TFJ(TypedArrayPrototypeToStringTag, 0) \ 1149 /* ES6 %TypedArray%.prototype.every */ \ 1150 TFJ(TypedArrayPrototypeEvery, \ 1151 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1152 /* ES6 %TypedArray%.prototype.some */ \ 1153 TFJ(TypedArrayPrototypeSome, \ 1154 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1155 /* ES6 %TypedArray%.prototype.reduce */ \ 1156 TFJ(TypedArrayPrototypeReduce, \ 1157 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1158 /* ES6 %TypedArray%.prototype.reduceRight */ \ 1159 TFJ(TypedArrayPrototypeReduceRight, \ 1160 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1161 /* ES6 %TypedArray%.prototype.map */ \ 1162 TFJ(TypedArrayPrototypeMap, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1163 /* ES6 %TypedArray%.prototype.forEach */ \ 1164 TFJ(TypedArrayPrototypeForEach, \ 1165 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1166 /* ES6 %TypedArray%.of */ \ 1167 TFJ(TypedArrayOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1168 /* ES6 %TypedArray%.from */ \ 1169 TFJ(TypedArrayFrom, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1170 TFS(TypedArrayLoadElementAsTagged, kArray, kKind, kIndex) \ 1171 TFS(TypedArrayStoreElementFromTagged, kArray, kKind, kIndex, kValue) \ 1172 \ 1173 /* Wasm */ \ 1174 ASM(WasmCompileLazy) \ 1175 TFC(WasmStackGuard, WasmRuntimeCall, 1) \ 1176 TFC(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \ 1177 TFC(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \ 1178 TFC(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \ 1179 TFC(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \ 1180 TFC(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \ 1181 TFC(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \ 1182 TFC(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \ 1183 TFC(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \ 1184 \ 1185 /* WeakMap */ \ 1186 TFJ(WeakMapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1187 TFS(WeakMapLookupHashIndex, kTable, kKey) \ 1188 TFJ(WeakMapGet, 1, kKey) \ 1189 TFJ(WeakMapHas, 1, kKey) \ 1190 TFJ(WeakMapPrototypeSet, 2, kKey, kValue) \ 1191 TFJ(WeakMapPrototypeDelete, 1, kKey) \ 1192 \ 1193 /* WeakSet */ \ 1194 TFJ(WeakSetConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1195 TFJ(WeakSetHas, 1, kKey) \ 1196 TFJ(WeakSetPrototypeAdd, 1, kValue) \ 1197 TFJ(WeakSetPrototypeDelete, 1, kValue) \ 1198 \ 1199 /* WeakSet / WeakMap Helpers */ \ 1200 TFS(WeakCollectionDelete, kCollection, kKey) \ 1201 TFS(WeakCollectionSet, kCollection, kKey, kValue) \ 1202 \ 1203 /* AsyncGenerator */ \ 1204 \ 1205 TFS(AsyncGeneratorResolve, kGenerator, kValue, kDone) \ 1206 TFS(AsyncGeneratorReject, kGenerator, kValue) \ 1207 TFS(AsyncGeneratorYield, kGenerator, kValue, kIsCaught) \ 1208 TFS(AsyncGeneratorReturn, kGenerator, kValue, kIsCaught) \ 1209 TFS(AsyncGeneratorResumeNext, kGenerator) \ 1210 \ 1211 /* AsyncGeneratorFunction( p1, p2, ... pn, body ) */ \ 1212 /* proposal-async-iteration/#sec-asyncgeneratorfunction-constructor */ \ 1213 CPP(AsyncGeneratorFunctionConstructor) \ 1214 /* AsyncGenerator.prototype.next ( value ) */ \ 1215 /* proposal-async-iteration/#sec-asyncgenerator-prototype-next */ \ 1216 TFJ(AsyncGeneratorPrototypeNext, \ 1217 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1218 /* AsyncGenerator.prototype.return ( value ) */ \ 1219 /* proposal-async-iteration/#sec-asyncgenerator-prototype-return */ \ 1220 TFJ(AsyncGeneratorPrototypeReturn, \ 1221 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1222 /* AsyncGenerator.prototype.throw ( exception ) */ \ 1223 /* proposal-async-iteration/#sec-asyncgenerator-prototype-throw */ \ 1224 TFJ(AsyncGeneratorPrototypeThrow, \ 1225 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 1226 \ 1227 /* Await (proposal-async-iteration/#await), with resume behaviour */ \ 1228 /* specific to Async Generators. Internal / Not exposed to JS code. */ \ 1229 TFJ(AsyncGeneratorAwaitCaught, 2, kGenerator, kAwaited) \ 1230 TFJ(AsyncGeneratorAwaitUncaught, 2, kGenerator, kAwaited) \ 1231 TFJ(AsyncGeneratorAwaitResolveClosure, 1, kValue) \ 1232 TFJ(AsyncGeneratorAwaitRejectClosure, 1, kValue) \ 1233 TFJ(AsyncGeneratorYieldResolveClosure, 1, kValue) \ 1234 TFJ(AsyncGeneratorReturnClosedResolveClosure, 1, kValue) \ 1235 TFJ(AsyncGeneratorReturnClosedRejectClosure, 1, kValue) \ 1236 TFJ(AsyncGeneratorReturnResolveClosure, 1, kValue) \ 1237 \ 1238 /* Async-from-Sync Iterator */ \ 1239 \ 1240 /* %AsyncFromSyncIteratorPrototype% */ \ 1241 /* See tc39.github.io/proposal-async-iteration/ */ \ 1242 /* #sec-%asyncfromsynciteratorprototype%-object) */ \ 1243 TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \ 1244 /* #sec-%asyncfromsynciteratorprototype%.throw */ \ 1245 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \ 1246 /* #sec-%asyncfromsynciteratorprototype%.return */ \ 1247 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \ 1248 /* #sec-async-iterator-value-unwrap-functions */ \ 1249 TFJ(AsyncIteratorValueUnwrap, 1, kValue) \ 1250 \ 1251 /* CEntry */ \ 1252 ASM(CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit) \ 1253 ASM(CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit) \ 1254 ASM(CEntry_Return1_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit) \ 1255 ASM(CEntry_Return1_SaveFPRegs_ArgvOnStack_NoBuiltinExit) \ 1256 ASM(CEntry_Return1_SaveFPRegs_ArgvOnStack_BuiltinExit) \ 1257 ASM(CEntry_Return2_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit) \ 1258 ASM(CEntry_Return2_DontSaveFPRegs_ArgvOnStack_BuiltinExit) \ 1259 ASM(CEntry_Return2_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit) \ 1260 ASM(CEntry_Return2_SaveFPRegs_ArgvOnStack_NoBuiltinExit) \ 1261 ASM(CEntry_Return2_SaveFPRegs_ArgvOnStack_BuiltinExit) \ 1262 \ 1263 /* StringAdd */ \ 1264 TFS(StringAdd_CheckNone_NotTenured, kLeft, kRight) \ 1265 TFS(StringAdd_CheckNone_Tenured, kLeft, kRight) \ 1266 TFS(StringAdd_ConvertLeft_NotTenured, kLeft, kRight) \ 1267 TFS(StringAdd_ConvertRight_NotTenured, kLeft, kRight) \ 1268 \ 1269 /* Miscellaneous */ \ 1270 ASM(DoubleToI) \ 1271 TFC(GetProperty, GetProperty, 1) \ 1272 ASM(MathPowInternal) \ 1273 \ 1274 /* Trace */ \ 1275 CPP(IsTraceCategoryEnabled) \ 1276 CPP(Trace) 1277 1278 #ifdef V8_INTL_SUPPORT 1279 #define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 1280 BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 1281 BUILTIN_LIST_FROM_DSL(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 1282 \ 1283 TFS(StringToLowerCaseIntl, kString) \ 1284 /* ES #sec-string.prototype.tolowercase */ \ 1285 TFJ(StringPrototypeToLowerCaseIntl, 0) \ 1286 /* ES #sec-string.prototype.touppercase */ \ 1287 CPP(StringPrototypeToUpperCaseIntl) \ 1288 /* ES #sec-string.prototype.normalize */ \ 1289 CPP(StringPrototypeNormalizeIntl) \ 1290 /* ecma402 #sec-intl.numberformat.prototype.formattoparts */ \ 1291 CPP(NumberFormatPrototypeFormatToParts) \ 1292 /* ecma402 #sec-intl.datetimeformat.prototype.formattoparts */ \ 1293 CPP(DateTimeFormatPrototypeFormatToParts) \ 1294 /* ecma402 #new proposal */ \ 1295 CPP(LocaleConstructor) \ 1296 CPP(LocalePrototypeLanguage) \ 1297 CPP(LocalePrototypeScript) \ 1298 CPP(LocalePrototypeRegion) \ 1299 CPP(LocalePrototypeBaseName) \ 1300 CPP(LocalePrototypeCalendar) \ 1301 CPP(LocalePrototypeCaseFirst) \ 1302 CPP(LocalePrototypeCollation) \ 1303 CPP(LocalePrototypeHourCycle) \ 1304 CPP(LocalePrototypeNumeric) \ 1305 CPP(LocalePrototypeNumberingSystem) \ 1306 CPP(LocalePrototypeToString) 1307 #else 1308 #define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 1309 BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 1310 BUILTIN_LIST_FROM_DSL(CPP, API, TFJ, TFC, TFS, TFH, ASM) \ 1311 \ 1312 /* no-op fallback version */ \ 1313 CPP(StringPrototypeNormalize) \ 1314 /* same as toLowercase; fallback version */ \ 1315 CPP(StringPrototypeToLocaleLowerCase) \ 1316 /* same as toUppercase; fallback version */ \ 1317 CPP(StringPrototypeToLocaleUpperCase) \ 1318 /* (obsolete) Unibrow version */ \ 1319 CPP(StringPrototypeToLowerCase) \ 1320 /* (obsolete) Unibrow version */ \ 1321 CPP(StringPrototypeToUpperCase) 1322 #endif // V8_INTL_SUPPORT 1323 1324 // The exception thrown in the following builtins are caught 1325 // internally and result in a promise rejection. 1326 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \ 1327 V(AsyncFromSyncIteratorPrototypeNext) \ 1328 V(AsyncFromSyncIteratorPrototypeReturn) \ 1329 V(AsyncFromSyncIteratorPrototypeThrow) \ 1330 V(AsyncFunctionAwaitCaught) \ 1331 V(AsyncFunctionAwaitUncaught) \ 1332 V(AsyncGeneratorResolve) \ 1333 V(AsyncGeneratorAwaitCaught) \ 1334 V(AsyncGeneratorAwaitUncaught) \ 1335 V(PromiseAll) \ 1336 V(PromiseConstructor) \ 1337 V(PromiseConstructorLazyDeoptContinuation) \ 1338 V(PromiseFulfillReactionJob) \ 1339 V(PromiseRace) \ 1340 V(ResolvePromise) 1341 1342 // The exception thrown in the following builtins are caught internally and will 1343 // not be propagated further or re-thrown 1344 #define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseRejectReactionJob) 1345 1346 #define IGNORE_BUILTIN(...) 1347 1348 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) 1349 1350 #define BUILTIN_LIST_C(V) \ 1351 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 1352 IGNORE_BUILTIN, IGNORE_BUILTIN) 1353 1354 #define BUILTIN_LIST_A(V) \ 1355 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 1356 IGNORE_BUILTIN, IGNORE_BUILTIN, V) 1357 1358 #define BUILTIN_LIST_TFS(V) \ 1359 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 1360 V, IGNORE_BUILTIN, IGNORE_BUILTIN) 1361 1362 #define BUILTIN_LIST_TFJ(V) \ 1363 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, V, IGNORE_BUILTIN, \ 1364 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) 1365 1366 #define BUILTIN_LIST_TFC(V) \ 1367 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V, \ 1368 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) 1369 1370 } // namespace internal 1371 } // namespace v8 1372 1373 #endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_ 1374