2017-03-29 09:56:08 +00:00
|
|
|
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef V8_BUILTINS_BUILTINS_DEFINITIONS_H_
|
|
|
|
#define V8_BUILTINS_BUILTINS_DEFINITIONS_H_
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
#define CODE_AGE_LIST_WITH_ARG(V, A) \
|
|
|
|
V(Quadragenarian, A) \
|
|
|
|
V(Quinquagenarian, A) \
|
|
|
|
V(Sexagenarian, A) \
|
|
|
|
V(Septuagenarian, A) \
|
|
|
|
V(Octogenarian, A)
|
|
|
|
|
|
|
|
#define CODE_AGE_LIST_IGNORE_ARG(X, V) V(X)
|
|
|
|
|
|
|
|
#define CODE_AGE_LIST(V) CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V)
|
|
|
|
|
|
|
|
#define CODE_AGE_LIST_COMPLETE(V) \
|
|
|
|
V(ToBeExecutedOnce) \
|
|
|
|
V(NotExecuted) \
|
|
|
|
V(ExecutedOnce) \
|
|
|
|
V(NoAge) \
|
|
|
|
CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V)
|
|
|
|
|
|
|
|
#define DECLARE_CODE_AGE_BUILTIN(C, V) V(Make##C##CodeYoungAgain)
|
|
|
|
|
|
|
|
// CPP: Builtin in C++. Entered via BUILTIN_EXIT frame.
|
|
|
|
// Args: name
|
|
|
|
// API: Builtin in C++ for API callbacks. Entered via EXIT frame.
|
|
|
|
// Args: name
|
|
|
|
// TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function).
|
|
|
|
// Args: name, arguments count, explicit argument names...
|
|
|
|
// TFS: Builtin in Turbofan, with CodeStub linkage.
|
2017-04-07 15:42:11 +00:00
|
|
|
// Args: name, explicit argument names...
|
|
|
|
// TFC: Builtin in Turbofan, with CodeStub linkage and custom descriptor.
|
2017-03-29 09:56:08 +00:00
|
|
|
// Args: name, interface descriptor, return_size
|
|
|
|
// TFH: Handlers in Turbofan, with CodeStub linkage.
|
|
|
|
// Args: name, code kind, extra IC state, interface descriptor
|
|
|
|
// ASM: Builtin in platform-dependent assembly.
|
|
|
|
// Args: name
|
|
|
|
// DBG: Builtin in platform-dependent assembly, used by the debugger.
|
|
|
|
// Args: name
|
|
|
|
|
2017-04-07 15:42:11 +00:00
|
|
|
#define BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(Abort) \
|
|
|
|
/* Code aging */ \
|
|
|
|
CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \
|
|
|
|
\
|
|
|
|
/* Declared first for dependency reasons */ \
|
|
|
|
ASM(CompileLazy) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(ToObject, TypeConversion, 1) \
|
|
|
|
TFC(FastNewObject, FastNewObject, 1) \
|
|
|
|
TFS(HasProperty, kKey, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Calls */ \
|
|
|
|
ASM(ArgumentsAdaptorTrampoline) \
|
|
|
|
/* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \
|
|
|
|
ASM(CallFunction_ReceiverIsNullOrUndefined) \
|
|
|
|
ASM(CallFunction_ReceiverIsNotNullOrUndefined) \
|
|
|
|
ASM(CallFunction_ReceiverIsAny) \
|
|
|
|
ASM(TailCallFunction_ReceiverIsNullOrUndefined) \
|
|
|
|
ASM(TailCallFunction_ReceiverIsNotNullOrUndefined) \
|
|
|
|
ASM(TailCallFunction_ReceiverIsAny) \
|
|
|
|
/* ES6 section 9.4.1.1 [[Call]] ( thisArgument, argumentsList) */ \
|
|
|
|
ASM(CallBoundFunction) \
|
|
|
|
ASM(TailCallBoundFunction) \
|
|
|
|
/* ES6 section 7.3.12 Call(F, V, [argumentsList]) */ \
|
|
|
|
ASM(Call_ReceiverIsNullOrUndefined) \
|
|
|
|
ASM(Call_ReceiverIsNotNullOrUndefined) \
|
|
|
|
ASM(Call_ReceiverIsAny) \
|
|
|
|
ASM(TailCall_ReceiverIsNullOrUndefined) \
|
|
|
|
ASM(TailCall_ReceiverIsNotNullOrUndefined) \
|
|
|
|
ASM(TailCall_ReceiverIsAny) \
|
2017-06-08 18:31:59 +00:00
|
|
|
ASM(CallVarargs) \
|
2017-06-20 11:14:26 +00:00
|
|
|
TFC(CallWithSpread, CallWithSpread, 1) \
|
2017-06-08 18:31:59 +00:00
|
|
|
TFC(CallWithArrayLike, CallWithArrayLike, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(CallForwardVarargs) \
|
|
|
|
ASM(CallFunctionForwardVarargs) \
|
|
|
|
\
|
|
|
|
/* Construct */ \
|
|
|
|
/* ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) */ \
|
|
|
|
ASM(ConstructFunction) \
|
|
|
|
/* ES6 section 9.4.1.2 [[Construct]] (argumentsList, newTarget) */ \
|
|
|
|
ASM(ConstructBoundFunction) \
|
|
|
|
ASM(ConstructedNonConstructable) \
|
|
|
|
/* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \
|
|
|
|
ASM(ConstructProxy) \
|
|
|
|
/* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \
|
|
|
|
ASM(Construct) \
|
2017-06-08 18:31:59 +00:00
|
|
|
ASM(ConstructVarargs) \
|
2017-06-20 11:14:26 +00:00
|
|
|
TFC(ConstructWithSpread, ConstructWithSpread, 1) \
|
2017-06-08 18:31:59 +00:00
|
|
|
TFC(ConstructWithArrayLike, ConstructWithArrayLike, 1) \
|
[turbofan] Avoid allocating rest parameters for spread calls.
We already had an optimization to turn Function.prototype.apply with
arguments object, i.e.
function foo() { return bar.apply(this, arguments); }
into a special operator JSCallForwardVarargs, which avoids the
allocation and deconstruction of the arguments object, but just passes
along the incoming parameters. We can do the same for rest parameters
and spread calls/constructs, i.e.
class A extends B {
constructor(...args) { super(...args); }
}
or
function foo(...args) { return bar(1, 2, 3, ...args); }
where we basically pass along the parameters (plus maybe additional
statically known parameters).
For this, we introduce a new JSConstructForwardVarargs operator and
generalize the CallForwardVarargs builtins that are backing this.
BUG=v8:6407,v8:6278,v8:6344
R=jarin@chromium.org
Review-Url: https://codereview.chromium.org/2890023004
Cr-Commit-Position: refs/heads/master@{#45388}
2017-05-18 07:32:22 +00:00
|
|
|
ASM(ConstructForwardVarargs) \
|
|
|
|
ASM(ConstructFunctionForwardVarargs) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(JSConstructStubApi) \
|
2017-05-10 12:37:52 +00:00
|
|
|
ASM(JSConstructStubGenericRestrictedReturn) \
|
|
|
|
ASM(JSConstructStubGenericUnrestrictedReturn) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(JSBuiltinsConstructStub) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(FastNewClosure, FastNewClosure, 1) \
|
|
|
|
TFC(FastNewFunctionContextEval, FastNewFunctionContext, 1) \
|
|
|
|
TFC(FastNewFunctionContextFunction, FastNewFunctionContext, 1) \
|
|
|
|
TFC(FastNewStrictArguments, FastNewArguments, 1) \
|
|
|
|
TFC(FastNewSloppyArguments, FastNewArguments, 1) \
|
|
|
|
TFC(FastNewRestParameter, FastNewArguments, 1) \
|
|
|
|
TFC(FastCloneRegExp, FastCloneRegExp, 1) \
|
|
|
|
TFC(FastCloneShallowArrayTrack, FastCloneShallowArray, 1) \
|
|
|
|
TFC(FastCloneShallowArrayDontTrack, FastCloneShallowArray, 1) \
|
2017-05-18 07:29:45 +00:00
|
|
|
TFC(FastCloneShallowObject, FastCloneShallowObject, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Apply and entries */ \
|
|
|
|
ASM(JSEntryTrampoline) \
|
|
|
|
ASM(JSConstructEntryTrampoline) \
|
|
|
|
ASM(ResumeGeneratorTrampoline) \
|
|
|
|
\
|
|
|
|
/* Stack and interrupt check */ \
|
|
|
|
ASM(InterruptCheck) \
|
|
|
|
ASM(StackCheck) \
|
|
|
|
\
|
|
|
|
/* String helpers */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(StringCharAt, StringCharAt, 1) \
|
|
|
|
TFC(StringCharCodeAt, StringCharCodeAt, 1) \
|
|
|
|
TFC(StringEqual, Compare, 1) \
|
|
|
|
TFC(StringGreaterThan, Compare, 1) \
|
|
|
|
TFC(StringGreaterThanOrEqual, Compare, 1) \
|
|
|
|
TFS(StringIndexOf, kReceiver, kSearchString, kPosition) \
|
|
|
|
TFC(StringLessThan, Compare, 1) \
|
|
|
|
TFC(StringLessThanOrEqual, Compare, 1) \
|
2017-06-07 11:12:49 +00:00
|
|
|
TFC(StringConcat, StringConcat, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Interpreter */ \
|
|
|
|
ASM(InterpreterEntryTrampoline) \
|
2017-04-11 14:20:30 +00:00
|
|
|
ASM(InterpreterPushArgsThenCall) \
|
|
|
|
ASM(InterpreterPushUndefinedAndArgsThenCall) \
|
|
|
|
ASM(InterpreterPushArgsThenCallFunction) \
|
|
|
|
ASM(InterpreterPushUndefinedAndArgsThenCallFunction) \
|
|
|
|
ASM(InterpreterPushArgsThenCallWithFinalSpread) \
|
|
|
|
ASM(InterpreterPushArgsThenTailCall) \
|
|
|
|
ASM(InterpreterPushArgsThenTailCallFunction) \
|
|
|
|
ASM(InterpreterPushArgsThenConstruct) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructFunction) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructArray) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructWithFinalSpread) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(InterpreterEnterBytecodeAdvance) \
|
|
|
|
ASM(InterpreterEnterBytecodeDispatch) \
|
|
|
|
ASM(InterpreterOnStackReplacement) \
|
|
|
|
\
|
|
|
|
/* Code life-cycle */ \
|
2017-06-15 14:53:38 +00:00
|
|
|
ASM(CheckOptimizationMarker) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(InstantiateAsmJs) \
|
|
|
|
ASM(MarkCodeAsToBeExecutedOnce) \
|
|
|
|
ASM(MarkCodeAsExecutedOnce) \
|
|
|
|
ASM(MarkCodeAsExecutedTwice) \
|
|
|
|
ASM(NotifyDeoptimized) \
|
|
|
|
ASM(NotifySoftDeoptimized) \
|
|
|
|
ASM(NotifyLazyDeoptimized) \
|
2017-06-07 13:23:33 +00:00
|
|
|
ASM(NotifyBuiltinContinuation) \
|
|
|
|
\
|
|
|
|
/* Trampolines called when returning from a deoptimization that expects */ \
|
|
|
|
/* to continue in a JavaScript builtin to finish the functionality of a */ \
|
|
|
|
/* an TF-inlined version of builtin that has side-effects. */ \
|
|
|
|
/* */ \
|
|
|
|
/* The trampolines work as follows: */ \
|
|
|
|
/* 1. Trampoline restores input register values that */ \
|
|
|
|
/* the builtin expects from a BuiltinContinuationFrame. */ \
|
|
|
|
/* 2. Trampoline tears down BuiltinContinuationFrame. */ \
|
|
|
|
/* 3. Trampoline jumps to the builtin's address. */ \
|
|
|
|
/* 4. Builtin executes as if invoked by the frame above it. */ \
|
|
|
|
/* 5. When the builtin returns, execution resumes normally in the */ \
|
|
|
|
/* calling frame, processing any return result from the JavaScript */ \
|
|
|
|
/* builtin as if it had called the builtin directly. */ \
|
|
|
|
/* */ \
|
|
|
|
/* There are two variants of the stub that differ in their handling of a */ \
|
|
|
|
/* value returned by the next frame deeper on the stack. For LAZY deopts, */ \
|
|
|
|
/* the return value (e.g. rax on x64) is explicitly passed as an extra */ \
|
|
|
|
/* stack parameter to the JavaScript builtin by the "WithResult" */ \
|
|
|
|
/* trampoline variant. The plain variant is used in EAGER deopt contexts */ \
|
|
|
|
/* and has no such special handling. */ \
|
|
|
|
ASM(ContinueToCodeStubBuiltin) \
|
|
|
|
ASM(ContinueToCodeStubBuiltinWithResult) \
|
|
|
|
ASM(ContinueToJavaScriptBuiltin) \
|
|
|
|
ASM(ContinueToJavaScriptBuiltinWithResult) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(OnStackReplacement) \
|
|
|
|
\
|
|
|
|
/* API callback handling */ \
|
|
|
|
API(HandleApiCall) \
|
|
|
|
API(HandleApiCallAsFunction) \
|
|
|
|
API(HandleApiCallAsConstructor) \
|
|
|
|
\
|
|
|
|
/* Adapters for Turbofan into runtime */ \
|
|
|
|
ASM(AllocateInNewSpace) \
|
|
|
|
ASM(AllocateInOldSpace) \
|
|
|
|
\
|
|
|
|
/* TurboFan support builtins */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(CopyFastSmiOrObjectElements, kObject) \
|
|
|
|
TFC(GrowFastDoubleElements, GrowArrayElements, 1) \
|
|
|
|
TFC(GrowFastSmiOrObjectElements, GrowArrayElements, 1) \
|
|
|
|
TFC(NewUnmappedArgumentsElements, NewArgumentsElements, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Debugger */ \
|
|
|
|
DBG(FrameDropperTrampoline) \
|
|
|
|
DBG(HandleDebuggerStatement) \
|
|
|
|
DBG(Return_DebugBreak) \
|
|
|
|
DBG(Slot_DebugBreak) \
|
|
|
|
\
|
|
|
|
/* Type conversions */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(ToBoolean, TypeConversion, 1) \
|
|
|
|
TFC(OrdinaryToPrimitive_Number, TypeConversion, 1) \
|
|
|
|
TFC(OrdinaryToPrimitive_String, TypeConversion, 1) \
|
|
|
|
TFC(NonPrimitiveToPrimitive_Default, TypeConversion, 1) \
|
|
|
|
TFC(NonPrimitiveToPrimitive_Number, TypeConversion, 1) \
|
|
|
|
TFC(NonPrimitiveToPrimitive_String, TypeConversion, 1) \
|
|
|
|
TFC(StringToNumber, TypeConversion, 1) \
|
|
|
|
TFC(ToName, TypeConversion, 1) \
|
|
|
|
TFC(NonNumberToNumber, TypeConversion, 1) \
|
|
|
|
TFC(ToNumber, TypeConversion, 1) \
|
|
|
|
TFC(ToString, TypeConversion, 1) \
|
2017-06-07 11:12:49 +00:00
|
|
|
TFC(ToPrimitiveToString, TypeConversion, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(ToInteger, TypeConversion, 1) \
|
|
|
|
TFC(ToLength, TypeConversion, 1) \
|
|
|
|
TFC(ClassOf, Typeof, 1) \
|
|
|
|
TFC(Typeof, Typeof, 1) \
|
|
|
|
TFC(GetSuperConstructor, Typeof, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2017-06-22 15:43:35 +00:00
|
|
|
/* Type conversions continuations */ \
|
|
|
|
TFC(ToBooleanLazyDeoptContinuation, TypeConversionStackParameter, 1) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Handlers */ \
|
|
|
|
TFH(LoadICProtoArray, BUILTIN, kNoExtraICState, LoadICProtoArray) \
|
|
|
|
TFH(LoadICProtoArrayThrowIfNonexistent, BUILTIN, kNoExtraICState, \
|
|
|
|
LoadICProtoArray) \
|
|
|
|
TFH(KeyedLoadIC_Megamorphic, BUILTIN, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(KeyedLoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(KeyedLoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \
|
|
|
|
TFH(KeyedLoadIC_IndexedString, HANDLER, Code::LOAD_IC, LoadWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Megamorphic, BUILTIN, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Megamorphic_Strict, BUILTIN, kNoExtraICState, \
|
|
|
|
StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Slow, HANDLER, Code::STORE_IC, StoreWithVector) \
|
|
|
|
TFH(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \
|
|
|
|
TFH(LoadGlobalIC_Slow, HANDLER, Code::LOAD_GLOBAL_IC, LoadGlobalWithVector) \
|
|
|
|
TFH(LoadField, BUILTIN, kNoExtraICState, LoadField) \
|
|
|
|
TFH(LoadIC_FunctionPrototype, HANDLER, Code::LOAD_IC, LoadWithVector) \
|
|
|
|
ASM(LoadIC_Getter_ForDeopt) \
|
|
|
|
TFH(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \
|
|
|
|
TFH(LoadIC_Uninitialized, BUILTIN, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(StoreIC_Miss, BUILTIN, kNoExtraICState, StoreWithVector) \
|
|
|
|
ASM(StoreIC_Setter_ForDeopt) \
|
|
|
|
TFH(StoreIC_Uninitialized, BUILTIN, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(StoreICStrict_Uninitialized, BUILTIN, kNoExtraICState, StoreWithVector) \
|
|
|
|
\
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(ResolveNativePromise, kPromise, kValue) \
|
|
|
|
TFS(RejectNativePromise, kPromise, kValue, kDebugEvent) \
|
|
|
|
TFS(PerformNativePromiseThen, kPromise, kResolveReaction, kRejectReaction, \
|
|
|
|
kResultPromise) \
|
2017-04-06 16:03:26 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Built-in functions for Javascript */ \
|
|
|
|
/* Special internal builtins */ \
|
|
|
|
CPP(EmptyFunction) \
|
|
|
|
CPP(Illegal) \
|
|
|
|
CPP(RestrictedFunctionPropertiesThrower) \
|
|
|
|
CPP(RestrictedStrictArgumentsPropertiesThrower) \
|
|
|
|
CPP(UnsupportedThrower) \
|
|
|
|
TFJ(ReturnReceiver, 0) \
|
|
|
|
\
|
2017-04-20 12:11:05 +00:00
|
|
|
TFS(DeleteProperty, kObject, kKey, kLanguageMode) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Array */ \
|
|
|
|
ASM(ArrayCode) \
|
|
|
|
ASM(InternalArrayCode) \
|
|
|
|
CPP(ArrayConcat) \
|
|
|
|
/* ES6 #sec-array.isarray */ \
|
|
|
|
TFJ(ArrayIsArray, 1, kArg) \
|
|
|
|
/* ES7 #sec-array.prototype.includes */ \
|
2017-05-10 06:46:29 +00:00
|
|
|
TFJ(ArrayIncludes, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.indexof */ \
|
2017-05-10 06:46:29 +00:00
|
|
|
TFJ(ArrayIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.pop */ \
|
|
|
|
CPP(ArrayPop) \
|
2017-05-05 12:11:36 +00:00
|
|
|
TFJ(FastArrayPop, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.push */ \
|
|
|
|
CPP(ArrayPush) \
|
|
|
|
TFJ(FastArrayPush, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-array.prototype.shift */ \
|
|
|
|
CPP(ArrayShift) \
|
2017-05-17 14:39:34 +00:00
|
|
|
TFJ(FastArrayShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.slice */ \
|
|
|
|
CPP(ArraySlice) \
|
|
|
|
/* ES6 #sec-array.prototype.splice */ \
|
|
|
|
CPP(ArraySplice) \
|
|
|
|
/* ES6 #sec-array.prototype.unshift */ \
|
|
|
|
CPP(ArrayUnshift) \
|
|
|
|
/* ES6 #sec-array.prototype.foreach */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFS(ArrayForEachLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kObject, kInitialK, kLength, kTo) \
|
2017-06-07 13:23:33 +00:00
|
|
|
TFJ(ArrayForEachLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength) \
|
|
|
|
TFJ(ArrayForEachLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength, kResult) \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(ArrayForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.every */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFS(ArrayEveryLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kObject, kInitialK, kLength, kTo) \
|
|
|
|
TFJ(ArrayEvery, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.some */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFS(ArraySomeLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kObject, kInitialK, kLength, kTo) \
|
|
|
|
TFJ(ArraySome, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.filter */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFS(ArrayFilterLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kObject, kInitialK, kLength, kTo) \
|
|
|
|
TFJ(ArrayFilter, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.foreach */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFS(ArrayMapLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
|
2017-04-29 10:58:50 +00:00
|
|
|
kObject, kInitialK, kLength, kTo) \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(ArrayMap, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-array.prototype.reduce */ \
|
|
|
|
TFS(ArrayReduceLoopContinuation, kReceiver, kCallbackFn, kThisArg, \
|
|
|
|
kAccumulator, kObject, kInitialK, kLength, kTo) \
|
|
|
|
TFJ(ArrayReduce, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.reduceRight */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFS(ArrayReduceRightLoopContinuation, kReceiver, kCallbackFn, kThisArg, \
|
2017-03-29 09:56:08 +00:00
|
|
|
kAccumulator, kObject, kInitialK, kLength, kTo) \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(ArrayReduceRight, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.entries */ \
|
|
|
|
TFJ(ArrayPrototypeEntries, 0) \
|
|
|
|
/* ES6 #sec-array.prototype.keys */ \
|
|
|
|
TFJ(ArrayPrototypeKeys, 0) \
|
|
|
|
/* ES6 #sec-array.prototype.values */ \
|
|
|
|
TFJ(ArrayPrototypeValues, 0) \
|
|
|
|
/* ES6 #sec-%arrayiteratorprototype%.next */ \
|
|
|
|
TFJ(ArrayIteratorPrototypeNext, 0) \
|
|
|
|
\
|
|
|
|
/* ArrayBuffer */ \
|
|
|
|
CPP(ArrayBufferConstructor) \
|
|
|
|
CPP(ArrayBufferConstructor_ConstructStub) \
|
2017-04-06 13:09:38 +00:00
|
|
|
CPP(ArrayBufferConstructor_DoNotInitialize) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ArrayBufferPrototypeGetByteLength) \
|
|
|
|
CPP(ArrayBufferIsView) \
|
|
|
|
CPP(ArrayBufferPrototypeSlice) \
|
|
|
|
\
|
|
|
|
/* AsyncFunction */ \
|
|
|
|
TFJ(AsyncFunctionAwaitCaught, 3, kGenerator, kAwaited, kOuterPromise) \
|
|
|
|
TFJ(AsyncFunctionAwaitUncaught, 3, kGenerator, kAwaited, kOuterPromise) \
|
|
|
|
TFJ(AsyncFunctionAwaitRejectClosure, 1, kSentError) \
|
|
|
|
TFJ(AsyncFunctionAwaitResolveClosure, 1, kSentValue) \
|
|
|
|
TFJ(AsyncFunctionPromiseCreate, 0) \
|
|
|
|
TFJ(AsyncFunctionPromiseRelease, 1, kPromise) \
|
|
|
|
\
|
|
|
|
/* Boolean */ \
|
|
|
|
CPP(BooleanConstructor) \
|
|
|
|
CPP(BooleanConstructor_ConstructStub) \
|
|
|
|
/* ES6 #sec-boolean.prototype.tostring */ \
|
|
|
|
TFJ(BooleanPrototypeToString, 0) \
|
|
|
|
/* ES6 #sec-boolean.prototype.valueof */ \
|
|
|
|
TFJ(BooleanPrototypeValueOf, 0) \
|
|
|
|
\
|
|
|
|
/* CallSite */ \
|
|
|
|
CPP(CallSitePrototypeGetColumnNumber) \
|
|
|
|
CPP(CallSitePrototypeGetEvalOrigin) \
|
|
|
|
CPP(CallSitePrototypeGetFileName) \
|
|
|
|
CPP(CallSitePrototypeGetFunction) \
|
|
|
|
CPP(CallSitePrototypeGetFunctionName) \
|
|
|
|
CPP(CallSitePrototypeGetLineNumber) \
|
|
|
|
CPP(CallSitePrototypeGetMethodName) \
|
|
|
|
CPP(CallSitePrototypeGetPosition) \
|
|
|
|
CPP(CallSitePrototypeGetScriptNameOrSourceURL) \
|
|
|
|
CPP(CallSitePrototypeGetThis) \
|
|
|
|
CPP(CallSitePrototypeGetTypeName) \
|
|
|
|
CPP(CallSitePrototypeIsConstructor) \
|
|
|
|
CPP(CallSitePrototypeIsEval) \
|
|
|
|
CPP(CallSitePrototypeIsNative) \
|
|
|
|
CPP(CallSitePrototypeIsToplevel) \
|
|
|
|
CPP(CallSitePrototypeToString) \
|
|
|
|
\
|
2017-04-18 20:50:30 +00:00
|
|
|
/* Console */ \
|
|
|
|
CPP(ConsoleDebug) \
|
|
|
|
CPP(ConsoleError) \
|
|
|
|
CPP(ConsoleInfo) \
|
|
|
|
CPP(ConsoleLog) \
|
|
|
|
CPP(ConsoleWarn) \
|
|
|
|
CPP(ConsoleDir) \
|
|
|
|
CPP(ConsoleDirXml) \
|
|
|
|
CPP(ConsoleTable) \
|
|
|
|
CPP(ConsoleTrace) \
|
|
|
|
CPP(ConsoleGroup) \
|
|
|
|
CPP(ConsoleGroupCollapsed) \
|
|
|
|
CPP(ConsoleGroupEnd) \
|
|
|
|
CPP(ConsoleClear) \
|
|
|
|
CPP(ConsoleCount) \
|
|
|
|
CPP(ConsoleAssert) \
|
2017-04-20 17:17:18 +00:00
|
|
|
TFJ(FastConsoleAssert, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-04-18 20:50:30 +00:00
|
|
|
CPP(ConsoleMarkTimeline) \
|
|
|
|
CPP(ConsoleProfile) \
|
|
|
|
CPP(ConsoleProfileEnd) \
|
|
|
|
CPP(ConsoleTimeline) \
|
|
|
|
CPP(ConsoleTimelineEnd) \
|
|
|
|
CPP(ConsoleTime) \
|
|
|
|
CPP(ConsoleTimeEnd) \
|
|
|
|
CPP(ConsoleTimeStamp) \
|
2017-06-12 10:01:19 +00:00
|
|
|
CPP(ConsoleContext) \
|
2017-04-18 20:50:30 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* DataView */ \
|
|
|
|
CPP(DataViewConstructor) \
|
|
|
|
CPP(DataViewConstructor_ConstructStub) \
|
|
|
|
CPP(DataViewPrototypeGetBuffer) \
|
|
|
|
CPP(DataViewPrototypeGetByteLength) \
|
|
|
|
CPP(DataViewPrototypeGetByteOffset) \
|
|
|
|
CPP(DataViewPrototypeGetInt8) \
|
|
|
|
CPP(DataViewPrototypeSetInt8) \
|
|
|
|
CPP(DataViewPrototypeGetUint8) \
|
|
|
|
CPP(DataViewPrototypeSetUint8) \
|
|
|
|
CPP(DataViewPrototypeGetInt16) \
|
|
|
|
CPP(DataViewPrototypeSetInt16) \
|
|
|
|
CPP(DataViewPrototypeGetUint16) \
|
|
|
|
CPP(DataViewPrototypeSetUint16) \
|
|
|
|
CPP(DataViewPrototypeGetInt32) \
|
|
|
|
CPP(DataViewPrototypeSetInt32) \
|
|
|
|
CPP(DataViewPrototypeGetUint32) \
|
|
|
|
CPP(DataViewPrototypeSetUint32) \
|
|
|
|
CPP(DataViewPrototypeGetFloat32) \
|
|
|
|
CPP(DataViewPrototypeSetFloat32) \
|
|
|
|
CPP(DataViewPrototypeGetFloat64) \
|
|
|
|
CPP(DataViewPrototypeSetFloat64) \
|
|
|
|
\
|
|
|
|
/* Date */ \
|
|
|
|
CPP(DateConstructor) \
|
|
|
|
CPP(DateConstructor_ConstructStub) \
|
|
|
|
/* ES6 #sec-date.prototype.getdate */ \
|
|
|
|
TFJ(DatePrototypeGetDate, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getday */ \
|
|
|
|
TFJ(DatePrototypeGetDay, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getfullyear */ \
|
|
|
|
TFJ(DatePrototypeGetFullYear, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.gethours */ \
|
|
|
|
TFJ(DatePrototypeGetHours, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getmilliseconds */ \
|
|
|
|
TFJ(DatePrototypeGetMilliseconds, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getminutes */ \
|
|
|
|
TFJ(DatePrototypeGetMinutes, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getmonth */ \
|
|
|
|
TFJ(DatePrototypeGetMonth, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getseconds */ \
|
|
|
|
TFJ(DatePrototypeGetSeconds, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.gettime */ \
|
|
|
|
TFJ(DatePrototypeGetTime, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.gettimezoneoffset */ \
|
|
|
|
TFJ(DatePrototypeGetTimezoneOffset, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcdate */ \
|
|
|
|
TFJ(DatePrototypeGetUTCDate, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcday */ \
|
|
|
|
TFJ(DatePrototypeGetUTCDay, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcfullyear */ \
|
|
|
|
TFJ(DatePrototypeGetUTCFullYear, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutchours */ \
|
|
|
|
TFJ(DatePrototypeGetUTCHours, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcmilliseconds */ \
|
|
|
|
TFJ(DatePrototypeGetUTCMilliseconds, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcminutes */ \
|
|
|
|
TFJ(DatePrototypeGetUTCMinutes, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcmonth */ \
|
|
|
|
TFJ(DatePrototypeGetUTCMonth, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.getutcseconds */ \
|
|
|
|
TFJ(DatePrototypeGetUTCSeconds, 0) \
|
|
|
|
/* ES6 #sec-date.prototype.valueof */ \
|
|
|
|
TFJ(DatePrototypeValueOf, 0) \
|
|
|
|
/* ES6 #sec-date.prototype-@@toprimitive */ \
|
|
|
|
TFJ(DatePrototypeToPrimitive, 1, kHint) \
|
|
|
|
CPP(DatePrototypeGetYear) \
|
|
|
|
CPP(DatePrototypeSetYear) \
|
|
|
|
CPP(DateNow) \
|
|
|
|
CPP(DateParse) \
|
|
|
|
CPP(DatePrototypeSetDate) \
|
|
|
|
CPP(DatePrototypeSetFullYear) \
|
|
|
|
CPP(DatePrototypeSetHours) \
|
|
|
|
CPP(DatePrototypeSetMilliseconds) \
|
|
|
|
CPP(DatePrototypeSetMinutes) \
|
|
|
|
CPP(DatePrototypeSetMonth) \
|
|
|
|
CPP(DatePrototypeSetSeconds) \
|
|
|
|
CPP(DatePrototypeSetTime) \
|
|
|
|
CPP(DatePrototypeSetUTCDate) \
|
|
|
|
CPP(DatePrototypeSetUTCFullYear) \
|
|
|
|
CPP(DatePrototypeSetUTCHours) \
|
|
|
|
CPP(DatePrototypeSetUTCMilliseconds) \
|
|
|
|
CPP(DatePrototypeSetUTCMinutes) \
|
|
|
|
CPP(DatePrototypeSetUTCMonth) \
|
|
|
|
CPP(DatePrototypeSetUTCSeconds) \
|
|
|
|
CPP(DatePrototypeToDateString) \
|
|
|
|
CPP(DatePrototypeToISOString) \
|
|
|
|
CPP(DatePrototypeToUTCString) \
|
|
|
|
CPP(DatePrototypeToString) \
|
|
|
|
CPP(DatePrototypeToTimeString) \
|
|
|
|
CPP(DatePrototypeToJson) \
|
|
|
|
CPP(DateUTC) \
|
|
|
|
\
|
|
|
|
/* Error */ \
|
|
|
|
CPP(ErrorConstructor) \
|
|
|
|
CPP(ErrorCaptureStackTrace) \
|
|
|
|
CPP(ErrorPrototypeToString) \
|
|
|
|
CPP(MakeError) \
|
|
|
|
CPP(MakeRangeError) \
|
|
|
|
CPP(MakeSyntaxError) \
|
|
|
|
CPP(MakeTypeError) \
|
|
|
|
CPP(MakeURIError) \
|
|
|
|
\
|
|
|
|
/* Function */ \
|
|
|
|
CPP(FunctionConstructor) \
|
|
|
|
ASM(FunctionPrototypeApply) \
|
|
|
|
CPP(FunctionPrototypeBind) \
|
|
|
|
/* ES6 #sec-function.prototype.bind */ \
|
|
|
|
TFJ(FastFunctionPrototypeBind, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
ASM(FunctionPrototypeCall) \
|
|
|
|
/* ES6 #sec-function.prototype-@@hasinstance */ \
|
|
|
|
TFJ(FunctionPrototypeHasInstance, 1, kV) \
|
|
|
|
/* ES6 #sec-function.prototype.tostring */ \
|
|
|
|
CPP(FunctionPrototypeToString) \
|
|
|
|
\
|
|
|
|
/* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(CreateIterResultObject, kValue, kDone) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Generator and Async */ \
|
2017-05-05 18:33:00 +00:00
|
|
|
TFS(CreateGeneratorObject, kClosure, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(GeneratorFunctionConstructor) \
|
|
|
|
/* ES6 #sec-generator.prototype.next */ \
|
2017-06-19 10:42:08 +00:00
|
|
|
TFJ(GeneratorPrototypeNext, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-generator.prototype.return */ \
|
2017-06-19 10:42:08 +00:00
|
|
|
TFJ(GeneratorPrototypeReturn, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-generator.prototype.throw */ \
|
2017-06-19 10:42:08 +00:00
|
|
|
TFJ(GeneratorPrototypeThrow, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(AsyncFunctionConstructor) \
|
|
|
|
\
|
|
|
|
/* Global object */ \
|
|
|
|
CPP(GlobalDecodeURI) \
|
|
|
|
CPP(GlobalDecodeURIComponent) \
|
|
|
|
CPP(GlobalEncodeURI) \
|
|
|
|
CPP(GlobalEncodeURIComponent) \
|
|
|
|
CPP(GlobalEscape) \
|
|
|
|
CPP(GlobalUnescape) \
|
|
|
|
CPP(GlobalEval) \
|
|
|
|
/* ES6 #sec-isfinite-number */ \
|
|
|
|
TFJ(GlobalIsFinite, 1, kNumber) \
|
|
|
|
/* ES6 #sec-isnan-number */ \
|
|
|
|
TFJ(GlobalIsNaN, 1, kNumber) \
|
|
|
|
\
|
|
|
|
/* JSON */ \
|
|
|
|
CPP(JsonParse) \
|
|
|
|
CPP(JsonStringify) \
|
|
|
|
\
|
|
|
|
/* ICs */ \
|
|
|
|
TFH(LoadIC, LOAD_IC, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(LoadIC_Noninlined, BUILTIN, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(LoadICTrampoline, LOAD_IC, kNoExtraICState, Load) \
|
|
|
|
TFH(KeyedLoadIC, KEYED_LOAD_IC, kNoExtraICState, LoadWithVector) \
|
|
|
|
TFH(KeyedLoadICTrampoline, KEYED_LOAD_IC, kNoExtraICState, Load) \
|
|
|
|
TFH(StoreIC, STORE_IC, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(StoreICTrampoline, STORE_IC, kNoExtraICState, Store) \
|
|
|
|
TFH(StoreICStrict, STORE_IC, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(StoreICStrictTrampoline, STORE_IC, kNoExtraICState, Store) \
|
|
|
|
TFH(KeyedStoreIC, KEYED_STORE_IC, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreICTrampoline, KEYED_STORE_IC, kNoExtraICState, Store) \
|
|
|
|
TFH(KeyedStoreICStrict, KEYED_STORE_IC, kNoExtraICState, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreICStrictTrampoline, KEYED_STORE_IC, kNoExtraICState, Store) \
|
|
|
|
TFH(LoadGlobalIC, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobalWithVector) \
|
|
|
|
TFH(LoadGlobalICInsideTypeof, LOAD_GLOBAL_IC, kNoExtraICState, \
|
|
|
|
LoadGlobalWithVector) \
|
|
|
|
TFH(LoadGlobalICTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, LoadGlobal) \
|
|
|
|
TFH(LoadGlobalICInsideTypeofTrampoline, LOAD_GLOBAL_IC, kNoExtraICState, \
|
|
|
|
LoadGlobal) \
|
|
|
|
\
|
2017-05-23 09:06:51 +00:00
|
|
|
/* Map */ \
|
2017-06-07 19:36:36 +00:00
|
|
|
TFJ(MapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-06-01 15:33:05 +00:00
|
|
|
TFJ(MapGet, 1, kKey) \
|
2017-06-02 10:28:57 +00:00
|
|
|
TFJ(MapHas, 1, kKey) \
|
2017-06-08 19:13:17 +00:00
|
|
|
CPP(MapGetSize) \
|
|
|
|
CPP(MapClear) \
|
|
|
|
CPP(MapForEach) \
|
2017-05-23 09:06:51 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Math */ \
|
|
|
|
/* ES6 #sec-math.abs */ \
|
|
|
|
TFJ(MathAbs, 1, kX) \
|
|
|
|
/* ES6 #sec-math.acos */ \
|
|
|
|
TFJ(MathAcos, 1, kX) \
|
|
|
|
/* ES6 #sec-math.acosh */ \
|
|
|
|
TFJ(MathAcosh, 1, kX) \
|
|
|
|
/* ES6 #sec-math.asin */ \
|
|
|
|
TFJ(MathAsin, 1, kX) \
|
|
|
|
/* ES6 #sec-math.asinh */ \
|
|
|
|
TFJ(MathAsinh, 1, kX) \
|
|
|
|
/* ES6 #sec-math.atan */ \
|
|
|
|
TFJ(MathAtan, 1, kX) \
|
|
|
|
/* ES6 #sec-math.atanh */ \
|
|
|
|
TFJ(MathAtanh, 1, kX) \
|
|
|
|
/* ES6 #sec-math.atan2 */ \
|
|
|
|
TFJ(MathAtan2, 2, kY, kX) \
|
|
|
|
/* ES6 #sec-math.cbrt */ \
|
|
|
|
TFJ(MathCbrt, 1, kX) \
|
|
|
|
/* ES6 #sec-math.ceil */ \
|
|
|
|
TFJ(MathCeil, 1, kX) \
|
|
|
|
/* ES6 #sec-math.clz32 */ \
|
|
|
|
TFJ(MathClz32, 1, kX) \
|
|
|
|
/* ES6 #sec-math.cos */ \
|
|
|
|
TFJ(MathCos, 1, kX) \
|
|
|
|
/* ES6 #sec-math.cosh */ \
|
|
|
|
TFJ(MathCosh, 1, kX) \
|
|
|
|
/* ES6 #sec-math.exp */ \
|
|
|
|
TFJ(MathExp, 1, kX) \
|
|
|
|
/* ES6 #sec-math.expm1 */ \
|
|
|
|
TFJ(MathExpm1, 1, kX) \
|
|
|
|
/* ES6 #sec-math.floor */ \
|
|
|
|
TFJ(MathFloor, 1, kX) \
|
|
|
|
/* ES6 #sec-math.fround */ \
|
|
|
|
TFJ(MathFround, 1, kX) \
|
|
|
|
/* ES6 #sec-math.hypot */ \
|
|
|
|
CPP(MathHypot) \
|
|
|
|
/* ES6 #sec-math.imul */ \
|
|
|
|
TFJ(MathImul, 2, kX, kY) \
|
|
|
|
/* ES6 #sec-math.log */ \
|
|
|
|
TFJ(MathLog, 1, kX) \
|
|
|
|
/* ES6 #sec-math.log1p */ \
|
|
|
|
TFJ(MathLog1p, 1, kX) \
|
|
|
|
/* ES6 #sec-math.log10 */ \
|
|
|
|
TFJ(MathLog10, 1, kX) \
|
|
|
|
/* ES6 #sec-math.log2 */ \
|
|
|
|
TFJ(MathLog2, 1, kX) \
|
|
|
|
/* ES6 #sec-math.max */ \
|
|
|
|
TFJ(MathMax, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-math.min */ \
|
|
|
|
TFJ(MathMin, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-math.pow */ \
|
|
|
|
TFJ(MathPow, 2, kBase, kExponent) \
|
|
|
|
/* ES6 #sec-math.random */ \
|
|
|
|
TFJ(MathRandom, 0) \
|
|
|
|
/* ES6 #sec-math.round */ \
|
|
|
|
TFJ(MathRound, 1, kX) \
|
|
|
|
/* ES6 #sec-math.sign */ \
|
|
|
|
TFJ(MathSign, 1, kX) \
|
|
|
|
/* ES6 #sec-math.sin */ \
|
|
|
|
TFJ(MathSin, 1, kX) \
|
|
|
|
/* ES6 #sec-math.sinh */ \
|
|
|
|
TFJ(MathSinh, 1, kX) \
|
|
|
|
/* ES6 #sec-math.sqrt */ \
|
|
|
|
TFJ(MathTan, 1, kX) \
|
|
|
|
/* ES6 #sec-math.tan */ \
|
|
|
|
TFJ(MathTanh, 1, kX) \
|
|
|
|
/* ES6 #sec-math.tanh */ \
|
|
|
|
TFJ(MathSqrt, 1, kX) \
|
|
|
|
/* ES6 #sec-math.trunc */ \
|
|
|
|
TFJ(MathTrunc, 1, kX) \
|
|
|
|
\
|
|
|
|
/* Number */ \
|
|
|
|
/* ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case */ \
|
|
|
|
ASM(NumberConstructor) \
|
|
|
|
/* ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Construct]] case */ \
|
|
|
|
ASM(NumberConstructor_ConstructStub) \
|
|
|
|
/* ES6 #sec-number.isfinite */ \
|
|
|
|
TFJ(NumberIsFinite, 1, kNumber) \
|
|
|
|
/* ES6 #sec-number.isinteger */ \
|
|
|
|
TFJ(NumberIsInteger, 1, kNumber) \
|
|
|
|
/* ES6 #sec-number.isnan */ \
|
|
|
|
TFJ(NumberIsNaN, 1, kNumber) \
|
|
|
|
/* ES6 #sec-number.issafeinteger */ \
|
|
|
|
TFJ(NumberIsSafeInteger, 1, kNumber) \
|
|
|
|
/* ES6 #sec-number.parsefloat */ \
|
|
|
|
TFJ(NumberParseFloat, 1, kString) \
|
|
|
|
/* ES6 #sec-number.parseint */ \
|
|
|
|
TFJ(NumberParseInt, 2, kString, kRadix) \
|
|
|
|
CPP(NumberPrototypeToExponential) \
|
|
|
|
CPP(NumberPrototypeToFixed) \
|
|
|
|
CPP(NumberPrototypeToLocaleString) \
|
|
|
|
CPP(NumberPrototypeToPrecision) \
|
|
|
|
CPP(NumberPrototypeToString) \
|
|
|
|
/* ES6 #sec-number.prototype.valueof */ \
|
|
|
|
TFJ(NumberPrototypeValueOf, 0) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(Add, BinaryOp, 1) \
|
|
|
|
TFC(Subtract, BinaryOp, 1) \
|
|
|
|
TFC(Multiply, BinaryOp, 1) \
|
|
|
|
TFC(Divide, BinaryOp, 1) \
|
|
|
|
TFC(Modulus, BinaryOp, 1) \
|
|
|
|
TFC(BitwiseAnd, BinaryOp, 1) \
|
|
|
|
TFC(BitwiseOr, BinaryOp, 1) \
|
|
|
|
TFC(BitwiseXor, BinaryOp, 1) \
|
|
|
|
TFC(ShiftLeft, BinaryOp, 1) \
|
|
|
|
TFC(ShiftRight, BinaryOp, 1) \
|
|
|
|
TFC(ShiftRightLogical, BinaryOp, 1) \
|
|
|
|
TFC(LessThan, Compare, 1) \
|
|
|
|
TFC(LessThanOrEqual, Compare, 1) \
|
|
|
|
TFC(GreaterThan, Compare, 1) \
|
|
|
|
TFC(GreaterThanOrEqual, Compare, 1) \
|
|
|
|
TFC(Equal, Compare, 1) \
|
|
|
|
TFC(StrictEqual, Compare, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Object */ \
|
|
|
|
CPP(ObjectAssign) \
|
|
|
|
/* ES #sec-object.create */ \
|
2017-06-23 06:13:25 +00:00
|
|
|
TFJ(ObjectCreate, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectDefineGetter) \
|
|
|
|
CPP(ObjectDefineProperties) \
|
|
|
|
CPP(ObjectDefineProperty) \
|
|
|
|
CPP(ObjectDefineSetter) \
|
|
|
|
CPP(ObjectEntries) \
|
|
|
|
CPP(ObjectFreeze) \
|
|
|
|
CPP(ObjectGetOwnPropertyDescriptor) \
|
|
|
|
CPP(ObjectGetOwnPropertyDescriptors) \
|
|
|
|
CPP(ObjectGetOwnPropertyNames) \
|
|
|
|
CPP(ObjectGetOwnPropertySymbols) \
|
|
|
|
CPP(ObjectGetPrototypeOf) \
|
|
|
|
CPP(ObjectSetPrototypeOf) \
|
|
|
|
/* ES6 #sec-object.prototype.hasownproperty */ \
|
|
|
|
TFJ(ObjectHasOwnProperty, 1, kKey) \
|
|
|
|
CPP(ObjectIs) \
|
|
|
|
CPP(ObjectIsExtensible) \
|
|
|
|
CPP(ObjectIsFrozen) \
|
|
|
|
CPP(ObjectIsSealed) \
|
2017-05-17 08:45:30 +00:00
|
|
|
TFJ(ObjectKeys, 1, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectLookupGetter) \
|
|
|
|
CPP(ObjectLookupSetter) \
|
|
|
|
CPP(ObjectPreventExtensions) \
|
|
|
|
/* ES6 #sec-object.prototype.tostring */ \
|
|
|
|
TFJ(ObjectProtoToString, 0) \
|
|
|
|
/* ES6 #sec-object.prototype.valueof */ \
|
|
|
|
TFJ(ObjectPrototypeValueOf, 0) \
|
[builtins] Properly optimize Object.prototype.isPrototypeOf.
Port the baseline implementation of Object.prototype.isPrototypeOf to
the CodeStubAssembler, sharing the existing prototype chain lookup logic
with the instanceof / OrdinaryHasInstance implementation. Based on that,
do the same in TurboFan, introducing a new JSHasInPrototypeChain
operator, which encapsulates the central prototype chain walk logic.
This speeds up Object.prototype.isPrototypeOf by more than a factor of
four, so that the code
A.prototype.isPrototypeOf(a)
is now performance-wise on par with
a instanceof A
for the case where A is a regular constructor function and a is an
instance of A.
Since instanceof does more than just the fundamental prototype chain
lookup, it was discovered in Node core that O.p.isPrototypeOf would
be a more appropriate alternative for certain sanity checks, since
it's less vulnerable to monkey-patching. In addition, the Object
builtin would also avoid the performance-cliff associated with
instanceof (due to the Symbol.hasInstance hook), as for example hit
by https://github.com/nodejs/node/pull/13403#issuecomment-305915874.
The main blocker was the missing performance of isPrototypeOf, since
it was still a JS builtin backed by a runtime call.
This CL also adds more test coverage for the
Object.prototype.isPrototypeOf builtin, especially when called from
optimized code.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
BUG=v8:5269,v8:5989,v8:6483
R=jgruber@chromium.org
Review-Url: https://codereview.chromium.org/2934893002
Cr-Commit-Position: refs/heads/master@{#45925}
2017-06-13 19:14:00 +00:00
|
|
|
TFJ(ObjectPrototypeIsPrototypeOf, 1, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectPrototypePropertyIsEnumerable) \
|
|
|
|
CPP(ObjectPrototypeGetProto) \
|
|
|
|
CPP(ObjectPrototypeSetProto) \
|
|
|
|
CPP(ObjectSeal) \
|
|
|
|
CPP(ObjectValues) \
|
|
|
|
\
|
|
|
|
/* instanceof */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(OrdinaryHasInstance, Compare, 1) \
|
|
|
|
TFC(InstanceOf, Compare, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* for-in */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(ForInFilter, kKey, kObject) \
|
|
|
|
TFS(ForInNext, kObject, kCacheArray, kCacheType, kIndex) \
|
|
|
|
TFC(ForInPrepare, ForInPrepare, 3) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Promise */ \
|
|
|
|
/* ES6 #sec-getcapabilitiesexecutor-functions */ \
|
|
|
|
TFJ(PromiseGetCapabilitiesExecutor, 2, kResolve, kReject) \
|
|
|
|
/* ES6 #sec-newpromisecapability */ \
|
|
|
|
TFJ(NewPromiseCapability, 2, kConstructor, kDebugEvent) \
|
|
|
|
/* ES6 #sec-promise-executor */ \
|
|
|
|
TFJ(PromiseConstructor, 1, kExecutor) \
|
|
|
|
TFJ(PromiseInternalConstructor, 1, kParent) \
|
|
|
|
TFJ(IsPromise, 1, kObject) \
|
|
|
|
/* ES #sec-promise-resolve-functions */ \
|
|
|
|
TFJ(PromiseResolveClosure, 1, kValue) \
|
|
|
|
/* ES #sec-promise-reject-functions */ \
|
|
|
|
TFJ(PromiseRejectClosure, 1, kValue) \
|
Reland "[builtins] port Promise.all to CSA"
Simplifies the implementation of IteratorClose in IteratorBuiltinsAssembler, and makes clear that it is only invoked when an exception occurs. Adds exception handling support to GetIterator, IteratorStep, and IteratorCloseOnException.
Moves the Promise.all resolveElement closure and it's caller to
builtins-promise-gen.cc.
Instead of creating an internal array (and copying its elements into a
result
array), a single JSArray is allocated, and appended with
BuildAppendJSArray(),
falling back to %CreateDataProperty(), and elements are updated in the
resolve
closure the same way. This should always be unobservable.
This CL increases the size of snapshot_blob.bin on an x64.release build
by 8.51kb
BUG=v8:5343
R=cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org, hpayer@chromium.org, tebbi@chromium.org
Change-Id: I29c4a529154ef49ad65555ce6ddc2c5b7c9de6b3
Reviewed-on: https://chromium-review.googlesource.com/508473
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45946}
2017-06-13 17:14:57 +00:00
|
|
|
TFJ(PromiseAllResolveElementClosure, 1, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-promise.prototype.then */ \
|
|
|
|
TFJ(PromiseThen, 2, kOnFullfilled, kOnRejected) \
|
|
|
|
/* ES #sec-promise.prototype.catch */ \
|
|
|
|
TFJ(PromiseCatch, 1, kOnRejected) \
|
|
|
|
/* ES #sec-fulfillpromise */ \
|
|
|
|
TFJ(ResolvePromise, 2, kPromise, kValue) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(PromiseHandleReject, kPromise, kOnReject, kException) \
|
2017-03-29 09:56:08 +00:00
|
|
|
TFJ(PromiseHandle, 5, kValue, kHandler, kDeferredPromise, \
|
|
|
|
kDeferredOnResolve, kDeferredOnReject) \
|
|
|
|
/* ES #sec-promise.resolve */ \
|
|
|
|
TFJ(PromiseResolve, 1, kValue) \
|
|
|
|
/* ES #sec-promise.reject */ \
|
|
|
|
TFJ(PromiseReject, 1, kReason) \
|
|
|
|
TFJ(InternalPromiseReject, 3, kPromise, kReason, kDebugEvent) \
|
|
|
|
TFJ(PromiseFinally, 1, kOnFinally) \
|
|
|
|
TFJ(PromiseThenFinally, 1, kValue) \
|
|
|
|
TFJ(PromiseCatchFinally, 1, kReason) \
|
|
|
|
TFJ(PromiseValueThunkFinally, 0) \
|
|
|
|
TFJ(PromiseThrowerFinally, 0) \
|
Reland "[builtins] port Promise.all to CSA"
Simplifies the implementation of IteratorClose in IteratorBuiltinsAssembler, and makes clear that it is only invoked when an exception occurs. Adds exception handling support to GetIterator, IteratorStep, and IteratorCloseOnException.
Moves the Promise.all resolveElement closure and it's caller to
builtins-promise-gen.cc.
Instead of creating an internal array (and copying its elements into a
result
array), a single JSArray is allocated, and appended with
BuildAppendJSArray(),
falling back to %CreateDataProperty(), and elements are updated in the
resolve
closure the same way. This should always be unobservable.
This CL increases the size of snapshot_blob.bin on an x64.release build
by 8.51kb
BUG=v8:5343
R=cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org, hpayer@chromium.org, tebbi@chromium.org
Change-Id: I29c4a529154ef49ad65555ce6ddc2c5b7c9de6b3
Reviewed-on: https://chromium-review.googlesource.com/508473
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45946}
2017-06-13 17:14:57 +00:00
|
|
|
/* ES #sec-promise.all */ \
|
|
|
|
TFJ(PromiseAll, 1, kIterable) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Proxy */ \
|
|
|
|
CPP(ProxyConstructor) \
|
|
|
|
CPP(ProxyConstructor_ConstructStub) \
|
|
|
|
\
|
|
|
|
/* Reflect */ \
|
|
|
|
ASM(ReflectApply) \
|
|
|
|
ASM(ReflectConstruct) \
|
|
|
|
CPP(ReflectDefineProperty) \
|
|
|
|
CPP(ReflectDeleteProperty) \
|
|
|
|
CPP(ReflectGet) \
|
|
|
|
CPP(ReflectGetOwnPropertyDescriptor) \
|
|
|
|
CPP(ReflectGetPrototypeOf) \
|
|
|
|
CPP(ReflectHas) \
|
|
|
|
CPP(ReflectIsExtensible) \
|
|
|
|
CPP(ReflectOwnKeys) \
|
|
|
|
CPP(ReflectPreventExtensions) \
|
|
|
|
CPP(ReflectSet) \
|
|
|
|
CPP(ReflectSetPrototypeOf) \
|
|
|
|
\
|
|
|
|
/* RegExp */ \
|
2017-06-14 12:58:38 +00:00
|
|
|
TFS(RegExpExecAtom, kRegExp, kString, kLastIndex, kMatchInfo) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(RegExpPrototypeExecSlow, kReceiver, kString) \
|
2017-06-14 12:58:38 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(RegExpCapture1Getter) \
|
|
|
|
CPP(RegExpCapture2Getter) \
|
|
|
|
CPP(RegExpCapture3Getter) \
|
|
|
|
CPP(RegExpCapture4Getter) \
|
|
|
|
CPP(RegExpCapture5Getter) \
|
|
|
|
CPP(RegExpCapture6Getter) \
|
|
|
|
CPP(RegExpCapture7Getter) \
|
|
|
|
CPP(RegExpCapture8Getter) \
|
|
|
|
CPP(RegExpCapture9Getter) \
|
|
|
|
/* ES #sec-regexp-pattern-flags */ \
|
|
|
|
TFJ(RegExpConstructor, 2, kPattern, kFlags) \
|
|
|
|
TFJ(RegExpInternalMatch, 2, kRegExp, kString) \
|
|
|
|
CPP(RegExpInputGetter) \
|
|
|
|
CPP(RegExpInputSetter) \
|
|
|
|
CPP(RegExpLastMatchGetter) \
|
|
|
|
CPP(RegExpLastParenGetter) \
|
|
|
|
CPP(RegExpLeftContextGetter) \
|
|
|
|
/* ES #sec-regexp.prototype.compile */ \
|
|
|
|
TFJ(RegExpPrototypeCompile, 2, kPattern, kFlags) \
|
|
|
|
/* ES #sec-regexp.prototype.exec */ \
|
|
|
|
TFJ(RegExpPrototypeExec, 1, kString) \
|
2017-03-31 09:20:13 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.dotAll */ \
|
|
|
|
TFJ(RegExpPrototypeDotAllGetter, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.flags */ \
|
|
|
|
TFJ(RegExpPrototypeFlagsGetter, 0) \
|
|
|
|
/* ES #sec-get-regexp.prototype.global */ \
|
|
|
|
TFJ(RegExpPrototypeGlobalGetter, 0) \
|
|
|
|
/* ES #sec-get-regexp.prototype.ignorecase */ \
|
|
|
|
TFJ(RegExpPrototypeIgnoreCaseGetter, 0) \
|
|
|
|
/* ES #sec-regexp.prototype-@@match */ \
|
|
|
|
TFJ(RegExpPrototypeMatch, 1, kString) \
|
|
|
|
/* ES #sec-get-regexp.prototype.multiline */ \
|
|
|
|
TFJ(RegExpPrototypeMultilineGetter, 0) \
|
|
|
|
/* ES #sec-regexp.prototype-@@search */ \
|
|
|
|
TFJ(RegExpPrototypeSearch, 1, kString) \
|
|
|
|
/* ES #sec-get-regexp.prototype.source */ \
|
|
|
|
TFJ(RegExpPrototypeSourceGetter, 0) \
|
|
|
|
/* ES #sec-get-regexp.prototype.sticky */ \
|
|
|
|
TFJ(RegExpPrototypeStickyGetter, 0) \
|
|
|
|
/* ES #sec-regexp.prototype.test */ \
|
|
|
|
TFJ(RegExpPrototypeTest, 1, kString) \
|
|
|
|
CPP(RegExpPrototypeToString) \
|
|
|
|
/* ES #sec-get-regexp.prototype.unicode */ \
|
|
|
|
TFJ(RegExpPrototypeUnicodeGetter, 0) \
|
|
|
|
CPP(RegExpRightContextGetter) \
|
|
|
|
\
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(RegExpReplace, kRegExp, kString, kReplaceValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-regexp.prototype-@@replace */ \
|
2017-05-10 06:51:56 +00:00
|
|
|
TFJ(RegExpPrototypeReplace, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(RegExpSplit, kRegExp, kString, kLimit) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-regexp.prototype-@@split */ \
|
2017-05-10 06:51:56 +00:00
|
|
|
TFJ(RegExpPrototypeSplit, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2017-06-02 12:29:59 +00:00
|
|
|
/* Set */ \
|
2017-06-07 19:36:36 +00:00
|
|
|
TFJ(SetConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-06-02 12:29:59 +00:00
|
|
|
TFJ(SetHas, 1, kKey) \
|
2017-06-08 19:13:17 +00:00
|
|
|
CPP(SetGetSize) \
|
|
|
|
CPP(SetClear) \
|
|
|
|
CPP(SetForEach) \
|
2017-06-02 12:29:59 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* SharedArrayBuffer */ \
|
|
|
|
CPP(SharedArrayBufferPrototypeGetByteLength) \
|
|
|
|
CPP(SharedArrayBufferPrototypeSlice) \
|
|
|
|
TFJ(AtomicsLoad, 2, kArray, kIndex) \
|
|
|
|
TFJ(AtomicsStore, 3, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsExchange, 3, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsCompareExchange, 4, kArray, kIndex, kOldValue, kNewValue) \
|
2017-04-11 00:09:37 +00:00
|
|
|
TFJ(AtomicsAdd, 3, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsSub, 3, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsAnd, 3, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsOr, 3, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsXor, 3, kArray, kIndex, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(AtomicsIsLockFree) \
|
|
|
|
CPP(AtomicsWait) \
|
|
|
|
CPP(AtomicsWake) \
|
|
|
|
\
|
|
|
|
/* String */ \
|
|
|
|
ASM(StringConstructor) \
|
|
|
|
ASM(StringConstructor_ConstructStub) \
|
|
|
|
CPP(StringFromCodePoint) \
|
|
|
|
/* ES6 #sec-string.fromcharcode */ \
|
|
|
|
TFJ(StringFromCharCode, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-string.prototype.charat */ \
|
|
|
|
TFJ(StringPrototypeCharAt, 1, kPosition) \
|
|
|
|
/* ES6 #sec-string.prototype.charcodeat */ \
|
|
|
|
TFJ(StringPrototypeCharCodeAt, 1, kPosition) \
|
|
|
|
/* ES6 #sec-string.prototype.concat */ \
|
|
|
|
TFJ(StringPrototypeConcat, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-string.prototype.endswith */ \
|
|
|
|
CPP(StringPrototypeEndsWith) \
|
|
|
|
/* ES6 #sec-string.prototype.includes */ \
|
|
|
|
CPP(StringPrototypeIncludes) \
|
|
|
|
/* ES6 #sec-string.prototype.indexof */ \
|
|
|
|
TFJ(StringPrototypeIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-string.prototype.lastindexof */ \
|
|
|
|
CPP(StringPrototypeLastIndexOf) \
|
|
|
|
/* ES6 #sec-string.prototype.localecompare */ \
|
|
|
|
CPP(StringPrototypeLocaleCompare) \
|
|
|
|
/* ES6 #sec-string.prototype.replace */ \
|
|
|
|
TFJ(StringPrototypeReplace, 2, kSearch, kReplace) \
|
2017-05-12 11:35:32 +00:00
|
|
|
/* ES6 #sec-string.prototype.slice */ \
|
|
|
|
TFJ(StringPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.split */ \
|
2017-06-08 14:29:09 +00:00
|
|
|
TFJ(StringPrototypeSplit, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.substr */ \
|
2017-06-08 14:29:09 +00:00
|
|
|
TFJ(StringPrototypeSubstr, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.substring */ \
|
2017-06-08 14:29:09 +00:00
|
|
|
TFJ(StringPrototypeSubstring, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.startswith */ \
|
|
|
|
CPP(StringPrototypeStartsWith) \
|
|
|
|
/* ES6 #sec-string.prototype.tostring */ \
|
|
|
|
TFJ(StringPrototypeToString, 0) \
|
|
|
|
CPP(StringPrototypeTrim) \
|
|
|
|
CPP(StringPrototypeTrimLeft) \
|
|
|
|
CPP(StringPrototypeTrimRight) \
|
|
|
|
/* ES6 #sec-string.prototype.valueof */ \
|
|
|
|
TFJ(StringPrototypeValueOf, 0) \
|
|
|
|
/* ES6 #sec-string.prototype-@@iterator */ \
|
|
|
|
TFJ(StringPrototypeIterator, 0) \
|
|
|
|
\
|
|
|
|
/* StringIterator */ \
|
|
|
|
/* ES6 #sec-%stringiteratorprototype%.next */ \
|
|
|
|
TFJ(StringIteratorPrototypeNext, 0) \
|
|
|
|
\
|
|
|
|
/* Symbol */ \
|
|
|
|
CPP(SymbolConstructor) \
|
|
|
|
CPP(SymbolConstructor_ConstructStub) \
|
|
|
|
/* ES6 #sec-symbol.for */ \
|
|
|
|
CPP(SymbolFor) \
|
|
|
|
/* ES6 #sec-symbol.keyfor */ \
|
|
|
|
CPP(SymbolKeyFor) \
|
|
|
|
/* ES6 #sec-symbol.prototype-@@toprimitive */ \
|
|
|
|
TFJ(SymbolPrototypeToPrimitive, 1, kHint) \
|
|
|
|
/* ES6 #sec-symbol.prototype.tostring */ \
|
|
|
|
TFJ(SymbolPrototypeToString, 0) \
|
|
|
|
/* ES6 #sec-symbol.prototype.valueof */ \
|
|
|
|
TFJ(SymbolPrototypeValueOf, 0) \
|
|
|
|
\
|
|
|
|
/* TypedArray */ \
|
2017-04-25 12:11:44 +00:00
|
|
|
TFS(TypedArrayInitialize, kHolder, kLength, kElementSize, kInitialize) \
|
|
|
|
TFS(TypedArrayInitializeWithBuffer, kHolder, kLength, kBuffer, kElementSize, \
|
|
|
|
kByteOffset) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-typedarray-buffer-byteoffset-length */ \
|
|
|
|
TFJ(TypedArrayConstructByArrayBuffer, 5, kHolder, kBuffer, kByteOffset, \
|
|
|
|
kLength, kElementSize) \
|
|
|
|
TFJ(TypedArrayConstructByArrayLike, 4, kHolder, kArrayLike, kLength, \
|
|
|
|
kElementSize) \
|
|
|
|
/* ES6 #sec-typedarray-length */ \
|
|
|
|
TFJ(TypedArrayConstructByLength, 3, kHolder, kLength, kElementSize) \
|
|
|
|
CPP(TypedArrayPrototypeBuffer) \
|
|
|
|
/* ES6 #sec-get-%typedarray%.prototype.bytelength */ \
|
|
|
|
TFJ(TypedArrayPrototypeByteLength, 0) \
|
|
|
|
/* ES6 #sec-get-%typedarray%.prototype.byteoffset */ \
|
|
|
|
TFJ(TypedArrayPrototypeByteOffset, 0) \
|
|
|
|
/* ES6 #sec-get-%typedarray%.prototype.length */ \
|
|
|
|
TFJ(TypedArrayPrototypeLength, 0) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.entries */ \
|
|
|
|
TFJ(TypedArrayPrototypeEntries, 0) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.keys */ \
|
|
|
|
TFJ(TypedArrayPrototypeKeys, 0) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.values */ \
|
|
|
|
TFJ(TypedArrayPrototypeValues, 0) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.copywithin */ \
|
|
|
|
CPP(TypedArrayPrototypeCopyWithin) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.fill */ \
|
|
|
|
CPP(TypedArrayPrototypeFill) \
|
|
|
|
/* ES7 #sec-%typedarray%.prototype.includes */ \
|
|
|
|
CPP(TypedArrayPrototypeIncludes) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.indexof */ \
|
|
|
|
CPP(TypedArrayPrototypeIndexOf) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.lastindexof */ \
|
|
|
|
CPP(TypedArrayPrototypeLastIndexOf) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.reverse */ \
|
|
|
|
CPP(TypedArrayPrototypeReverse) \
|
2017-04-01 16:46:10 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.slice */ \
|
|
|
|
CPP(TypedArrayPrototypeSlice) \
|
2017-03-30 16:36:53 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.every */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(TypedArrayPrototypeEvery, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-30 16:36:53 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.some */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(TypedArrayPrototypeSome, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-04-11 11:02:27 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.reduce */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(TypedArrayPrototypeReduce, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-04-11 11:02:27 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.reduceRight */ \
|
2017-04-29 11:40:48 +00:00
|
|
|
TFJ(TypedArrayPrototypeReduceRight, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-05-17 15:27:37 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.map */ \
|
|
|
|
TFJ(TypedArrayPrototypeMap, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-05-22 08:23:34 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.forEach */ \
|
|
|
|
TFJ(TypedArrayPrototypeForEach, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Wasm */ \
|
|
|
|
ASM(WasmCompileLazy) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(WasmStackGuard, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \
|
|
|
|
TFC(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
/* AsyncGenerator */ \
|
|
|
|
\
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(AsyncGeneratorResolve, kGenerator, kValue, kDone) \
|
|
|
|
TFS(AsyncGeneratorReject, kGenerator, kValue) \
|
|
|
|
TFS(AsyncGeneratorResumeNext, kGenerator) \
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
\
|
|
|
|
/* AsyncGeneratorFunction( p1, p2, ... pn, body ) */ \
|
|
|
|
/* proposal-async-iteration/#sec-asyncgeneratorfunction-constructor */ \
|
|
|
|
CPP(AsyncGeneratorFunctionConstructor) \
|
|
|
|
/* AsyncGenerator.prototype.next ( value ) */ \
|
|
|
|
/* proposal-async-iteration/#sec-asyncgenerator-prototype-next */ \
|
2017-06-19 10:42:08 +00:00
|
|
|
TFJ(AsyncGeneratorPrototypeNext, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
/* AsyncGenerator.prototype.return ( value ) */ \
|
|
|
|
/* proposal-async-iteration/#sec-asyncgenerator-prototype-return */ \
|
2017-06-19 10:42:08 +00:00
|
|
|
TFJ(AsyncGeneratorPrototypeReturn, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
/* AsyncGenerator.prototype.throw ( exception ) */ \
|
|
|
|
/* proposal-async-iteration/#sec-asyncgenerator-prototype-throw */ \
|
2017-06-19 10:42:08 +00:00
|
|
|
TFJ(AsyncGeneratorPrototypeThrow, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
\
|
|
|
|
/* Await (proposal-async-iteration/#await), with resume behaviour */ \
|
|
|
|
/* specific to Async Generators. Internal / Not exposed to JS code. */ \
|
|
|
|
TFJ(AsyncGeneratorAwaitCaught, 2, kGenerator, kAwaited) \
|
|
|
|
TFJ(AsyncGeneratorAwaitUncaught, 2, kGenerator, kAwaited) \
|
|
|
|
TFJ(AsyncGeneratorAwaitResolveClosure, 1, kValue) \
|
|
|
|
TFJ(AsyncGeneratorAwaitRejectClosure, 1, kValue) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Async-from-Sync Iterator */ \
|
|
|
|
\
|
|
|
|
/* %AsyncFromSyncIteratorPrototype% */ \
|
|
|
|
/* See tc39.github.io/proposal-async-iteration/ */ \
|
|
|
|
/* #sec-%asyncfromsynciteratorprototype%-object) */ \
|
|
|
|
TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \
|
|
|
|
/* #sec-%asyncfromsynciteratorprototype%.throw */ \
|
|
|
|
TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \
|
|
|
|
/* #sec-%asyncfromsynciteratorprototype%.return */ \
|
|
|
|
TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \
|
|
|
|
/* #sec-async-iterator-value-unwrap-functions */ \
|
|
|
|
TFJ(AsyncIteratorValueUnwrap, 1, kValue)
|
|
|
|
|
2017-04-21 08:35:12 +00:00
|
|
|
#ifdef V8_INTL_SUPPORT
|
2017-06-29 22:28:00 +00:00
|
|
|
#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \
|
|
|
|
BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \
|
|
|
|
\
|
|
|
|
TFS(StringToLowerCaseIntl, kString) \
|
|
|
|
/* ES #sec-string.prototype.tolowercase */ \
|
|
|
|
TFJ(StringPrototypeToLowerCaseIntl, 0) \
|
|
|
|
/* ES #sec-string.prototype.touppercase */ \
|
|
|
|
CPP(StringPrototypeToUpperCaseIntl) \
|
|
|
|
/* ES #sec-string.prototype.normalize */ \
|
|
|
|
CPP(StringPrototypeNormalizeIntl) \
|
|
|
|
/* ecma402 #sec-intl.numberformat.prototype.formattoparts */ \
|
|
|
|
CPP(NumberFormatPrototypeFormatToParts)
|
2017-03-29 09:56:08 +00:00
|
|
|
#else
|
2017-04-07 15:42:11 +00:00
|
|
|
#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \
|
|
|
|
BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \
|
|
|
|
\
|
2017-04-21 08:35:12 +00:00
|
|
|
/* no-op fallback version */ \
|
2017-06-29 03:01:13 +00:00
|
|
|
CPP(StringPrototypeNormalize) \
|
|
|
|
/* same as toLowercase; fallback version */ \
|
|
|
|
CPP(StringPrototypeToLocaleLowerCase) \
|
|
|
|
/* same as toUppercase; fallback version */ \
|
|
|
|
CPP(StringPrototypeToLocaleUpperCase) \
|
|
|
|
/* (obsolete) Unibrow version */ \
|
|
|
|
CPP(StringPrototypeToLowerCase) \
|
|
|
|
/* (obsolete) Unibrow version */ \
|
|
|
|
CPP(StringPrototypeToUpperCase)
|
2017-04-21 08:35:12 +00:00
|
|
|
#endif // V8_INTL_SUPPORT
|
2017-03-29 09:56:08 +00:00
|
|
|
|
2017-06-07 14:22:44 +00:00
|
|
|
// The exception thrown in the following builtins are caught
|
|
|
|
// internally and result in a promise rejection.
|
2017-03-29 09:56:08 +00:00
|
|
|
#define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \
|
|
|
|
V(AsyncFromSyncIteratorPrototypeNext) \
|
|
|
|
V(AsyncFromSyncIteratorPrototypeReturn) \
|
|
|
|
V(AsyncFromSyncIteratorPrototypeThrow) \
|
|
|
|
V(AsyncFunctionAwaitCaught) \
|
|
|
|
V(AsyncFunctionAwaitUncaught) \
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
V(AsyncGeneratorResolve) \
|
|
|
|
V(AsyncGeneratorAwaitCaught) \
|
|
|
|
V(AsyncGeneratorAwaitUncaught) \
|
2017-04-06 16:03:26 +00:00
|
|
|
V(PerformNativePromiseThen) \
|
Reland "[builtins] port Promise.all to CSA"
Simplifies the implementation of IteratorClose in IteratorBuiltinsAssembler, and makes clear that it is only invoked when an exception occurs. Adds exception handling support to GetIterator, IteratorStep, and IteratorCloseOnException.
Moves the Promise.all resolveElement closure and it's caller to
builtins-promise-gen.cc.
Instead of creating an internal array (and copying its elements into a
result
array), a single JSArray is allocated, and appended with
BuildAppendJSArray(),
falling back to %CreateDataProperty(), and elements are updated in the
resolve
closure the same way. This should always be unobservable.
This CL increases the size of snapshot_blob.bin on an x64.release build
by 8.51kb
BUG=v8:5343
R=cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org, hpayer@chromium.org, tebbi@chromium.org
Change-Id: I29c4a529154ef49ad65555ce6ddc2c5b7c9de6b3
Reviewed-on: https://chromium-review.googlesource.com/508473
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45946}
2017-06-13 17:14:57 +00:00
|
|
|
V(PromiseAll) \
|
2017-03-29 09:56:08 +00:00
|
|
|
V(PromiseConstructor) \
|
|
|
|
V(PromiseHandle) \
|
|
|
|
V(PromiseResolve) \
|
|
|
|
V(PromiseResolveClosure) \
|
2017-04-06 16:03:26 +00:00
|
|
|
V(RejectNativePromise) \
|
|
|
|
V(ResolveNativePromise) \
|
2017-03-29 09:56:08 +00:00
|
|
|
V(ResolvePromise)
|
|
|
|
|
2017-06-30 12:38:27 +00:00
|
|
|
// The exception thrown in the following builtins are caught internally and will
|
|
|
|
// not be propagated further or re-thrown
|
2017-03-29 09:56:08 +00:00
|
|
|
#define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject)
|
|
|
|
|
|
|
|
#define IGNORE_BUILTIN(...)
|
|
|
|
|
2017-04-07 15:42:11 +00:00
|
|
|
#define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V, V)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
|
|
|
#define BUILTIN_LIST_C(V) \
|
|
|
|
BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
2017-04-07 15:42:11 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
|
|
|
#define BUILTIN_LIST_A(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
2017-04-07 15:42:11 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, V, V)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
|
|
|
#define BUILTIN_LIST_DBG(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
2017-04-07 15:42:11 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V)
|
|
|
|
|
|
|
|
#define BUILTIN_LIST_TFS(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
|
|
|
V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
2017-06-07 13:23:33 +00:00
|
|
|
#define BUILTIN_LIST_TFJ(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, V, IGNORE_BUILTIN, \
|
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
|
|
|
|
|
|
|
#define BUILTIN_LIST_TFC(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V, \
|
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
|
|
|
|
2017-03-29 09:56:08 +00:00
|
|
|
#define BUILTINS_WITH_UNTAGGED_PARAMS(V) V(WasmCompileLazy)
|
|
|
|
|
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|
|
|
|
|
|
|
|
#endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_
|