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 {
|
|
|
|
|
|
|
|
// 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.
|
2017-09-29 08:06:44 +00:00
|
|
|
// Args: name, interface descriptor
|
2017-03-29 09:56:08 +00:00
|
|
|
// ASM: Builtin in platform-dependent assembly.
|
|
|
|
// Args: name
|
|
|
|
|
2017-08-16 05:41:03 +00:00
|
|
|
#define BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
2017-08-03 11:17:17 +00:00
|
|
|
/* GC write barrirer */ \
|
|
|
|
TFC(RecordWrite, RecordWrite, 1) \
|
|
|
|
\
|
2017-08-24 17:37:03 +00:00
|
|
|
/* Adaptors for CPP/API builtin */ \
|
|
|
|
ASM(AdaptorWithExitFrame) \
|
|
|
|
ASM(AdaptorWithBuiltinExitFrame) \
|
|
|
|
\
|
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) \
|
|
|
|
/* ES6 section 9.4.1.1 [[Call]] ( thisArgument, argumentsList) */ \
|
|
|
|
ASM(CallBoundFunction) \
|
|
|
|
/* ES6 section 7.3.12 Call(F, V, [argumentsList]) */ \
|
|
|
|
ASM(Call_ReceiverIsNullOrUndefined) \
|
|
|
|
ASM(Call_ReceiverIsNotNullOrUndefined) \
|
|
|
|
ASM(Call_ReceiverIsAny) \
|
2017-07-14 09:51:52 +00:00
|
|
|
\
|
|
|
|
/* ES6 section 9.5.12[[Call]] ( thisArgument, argumentsList ) */ \
|
|
|
|
TFC(CallProxy, CallTrampoline, 1) \
|
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 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-08-01 13:11:36 +00:00
|
|
|
TFC(FastNewObject, FastNewObject, 1) \
|
2018-02-22 12:04:01 +00:00
|
|
|
TFS(FastNewClosure, kSharedFunctionInfo, kFeedbackCell) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(FastNewFunctionContextEval, FastNewFunctionContext, 1) \
|
|
|
|
TFC(FastNewFunctionContextFunction, FastNewFunctionContext, 1) \
|
2017-09-25 12:30:25 +00:00
|
|
|
TFS(CreateRegExpLiteral, kFeedbackVector, kSlot, kPattern, kFlags) \
|
|
|
|
TFS(CreateEmptyArrayLiteral, kFeedbackVector, kSlot) \
|
|
|
|
TFS(CreateShallowArrayLiteral, kFeedbackVector, kSlot, kConstantElements) \
|
|
|
|
TFS(CreateShallowObjectLiteral, kFeedbackVector, kSlot, \
|
|
|
|
kBoilerplateDescription, kFlags) \
|
2017-07-18 14:24:26 +00:00
|
|
|
/* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \
|
|
|
|
TFC(ConstructProxy, ConstructTrampoline, 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 */ \
|
2018-01-15 09:21:20 +00:00
|
|
|
TFC(StringCharAt, StringAt, 1) \
|
2018-01-26 12:03:39 +00:00
|
|
|
TFC(StringCodePointAtUTF16, StringAt, 1) \
|
|
|
|
TFC(StringCodePointAtUTF32, StringAt, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
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-10-16 13:23:28 +00:00
|
|
|
TFS(StringRepeat, kString, kCount) \
|
2018-02-23 16:19:04 +00:00
|
|
|
TFC(StringSubstring, StringSubstring, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2017-07-14 05:35:21 +00:00
|
|
|
/* OrderedHashTable helpers */ \
|
|
|
|
TFS(OrderedHashTableHealIndex, kTable, kIndex) \
|
|
|
|
\
|
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(InterpreterPushArgsThenConstruct) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructFunction) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructWithFinalSpread) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(InterpreterEnterBytecodeAdvance) \
|
|
|
|
ASM(InterpreterEnterBytecodeDispatch) \
|
|
|
|
ASM(InterpreterOnStackReplacement) \
|
|
|
|
\
|
|
|
|
/* Code life-cycle */ \
|
2017-08-01 13:11:36 +00:00
|
|
|
ASM(CompileLazy) \
|
2017-09-04 16:56:30 +00:00
|
|
|
ASM(CompileLazyDeoptimizedCode) \
|
2017-09-07 11:51:08 +00:00
|
|
|
ASM(DeserializeLazy) \
|
2017-03-29 09:56:08 +00:00
|
|
|
ASM(InstantiateAsmJs) \
|
|
|
|
ASM(NotifyDeoptimized) \
|
2017-06-07 13:23:33 +00:00
|
|
|
\
|
|
|
|
/* 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) \
|
2017-09-01 08:54:08 +00:00
|
|
|
TFC(NewArgumentsElements, NewArgumentsElements, 1) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Debugger */ \
|
2017-08-16 05:41:03 +00:00
|
|
|
ASM(FrameDropperTrampoline) \
|
|
|
|
ASM(HandleDebuggerStatement) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Type conversions */ \
|
2017-08-01 13:11:36 +00:00
|
|
|
TFC(ToObject, TypeConversion, 1) \
|
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) \
|
2017-10-10 16:00:31 +00:00
|
|
|
TFC(NonNumberToNumeric, TypeConversion, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(ToNumber, TypeConversion, 1) \
|
2017-10-24 09:39:35 +00:00
|
|
|
TFC(ToNumeric, TypeConversion, 1) \
|
2017-11-20 10:18:52 +00:00
|
|
|
TFC(NumberToString, TypeConversion, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(ToString, TypeConversion, 1) \
|
|
|
|
TFC(ToInteger, TypeConversion, 1) \
|
2017-12-19 16:10:01 +00:00
|
|
|
TFC(ToInteger_TruncateMinusZero, TypeConversion, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(ToLength, TypeConversion, 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 */ \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(KeyedLoadIC_Megamorphic, LoadWithVector) \
|
[ic] Ensure that we make progress on KeyedLoadIC polymorphic name.
In the special case of KeyedLoadIC, where the key that is passed in is a
Name that is always the same we only checked for identity in both the
stub and the TurboFan case, which works fine for symbols and internalized
strings, but doesn't really work with non-internalized strings, where
the identity check will fail, the runtime will internalize the string,
and the IC will then see the original internalized string again and not
progress in the feedback lattice. This leads to tricky deoptimization
loops in TurboFan and constantly missing ICs.
This adds fixes the stub to always try to internalize strings first
when the identity check fails and then doing the check again. If the
name is not found in the string table we miss, since in that case the
string cannot match the previously recorded feedback name (which is
always a unique name).
In TurboFan we represent this checks with new CheckEqualsSymbol and
CheckEqualsInternalizedString operators, which validate the previously
recorded feedback, and the CheckEqualsInternalizedString operator does
the attempt to internalize the input.
Bug: v8:6936, v8:6948, v8:6969
Change-Id: I3f3b4a587c67f00f7c4b60d239eb98a9626fe04a
Reviewed-on: https://chromium-review.googlesource.com/730224
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48784}
2017-10-20 11:36:26 +00:00
|
|
|
TFH(KeyedLoadIC_PolymorphicName, LoadWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(KeyedLoadIC_Slow, LoadWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Megamorphic, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Slow, StoreWithVector) \
|
2017-12-20 15:29:31 +00:00
|
|
|
TFH(LoadGlobalIC_Slow, LoadWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(LoadField, LoadField) \
|
|
|
|
TFH(LoadIC_FunctionPrototype, LoadWithVector) \
|
|
|
|
TFH(LoadIC_Slow, LoadWithVector) \
|
2017-09-29 08:08:07 +00:00
|
|
|
TFH(LoadIC_StringLength, LoadWithVector) \
|
2017-11-15 12:30:07 +00:00
|
|
|
TFH(LoadIC_StringWrapperLength, LoadWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(LoadIC_Uninitialized, LoadWithVector) \
|
2017-10-12 12:30:22 +00:00
|
|
|
TFH(StoreGlobalIC_Slow, StoreWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(StoreIC_Uninitialized, StoreWithVector) \
|
2018-03-02 20:30:34 +00:00
|
|
|
TFH(StoreInArrayLiteralIC_Slow, StoreWithVector) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
[builtins] Refactor the promise resolution and rejection logic.
This introduces dedicated builtins
- FulfillPromise,
- RejectPromise, and
- ResolvePromise,
which perform the corresponding operations from the language
specification, and removes the redundant entry points and the
excessive inlining of these operations into other builtins. We
also add the same logic on the C++ side, so that we don't need
to go into JavaScript land when resolving/rejecting from the
API.
The C++ side has a complete implementation, including full support
for the debugger and the current PromiseHook machinery. This is to
avoid constantly crossing the boundary for those cases, and to also
simplify the CSA side (and soon the TurboFan side), where we only
do the fast-path and bail out to the runtime for the general handling.
On top of this we introduce %_RejectPromise and %_ResolvePromise,
which are entry points used by the bytecode and parser desugarings
for async functions, and also used by the V8 Extras API. Thanks to
this we can uniformly optimize these in TurboFan, where we have
corresponding operators JSRejectPromise and JSResolvePromise, which
currently just call into the builtins, but middle-term can be further
optimized, i.e. to skip the "then" lookup for JSResolvePromise when
we know something about the resolution.
In TurboFan we can also already inline the default PromiseCapability
[[Reject]] and [[Resolve]] functions, although this is not as effective
as it can be right now, until we have inlining support for the Promise
constructor (being worked on by petermarshall@ right now) and/or SFI
based CALL_IC feedback.
Overall this change is meant as a refactoring without significant
performance impact anywhere; it seems to improve performance of
simple async functions a bit, but otherwise is neutral.
Bug: v8:7253
Change-Id: Id0b979f9b2843560e38cd8df4b02627dad4b6d8c
Reviewed-on: https://chromium-review.googlesource.com/911632
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51260}
2018-02-12 19:10:29 +00:00
|
|
|
/* Microtask helpers */ \
|
2018-01-09 11:34:42 +00:00
|
|
|
TFS(EnqueueMicrotask, kMicrotask) \
|
2017-11-30 15:27:59 +00:00
|
|
|
TFC(RunMicrotasks, RunMicrotasks, 1) \
|
2017-04-06 16:03:26 +00:00
|
|
|
\
|
2017-08-01 13:11:36 +00:00
|
|
|
/* Object property helpers */ \
|
|
|
|
TFS(HasProperty, kKey, kObject) \
|
|
|
|
TFS(DeleteProperty, kObject, kKey, kLanguageMode) \
|
|
|
|
\
|
|
|
|
/* Abort */ \
|
|
|
|
ASM(Abort) \
|
2017-12-21 12:48:27 +00:00
|
|
|
TFC(AbortJS, AbortJS, 1) \
|
2017-08-01 13:11:36 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Built-in functions for Javascript */ \
|
|
|
|
/* Special internal builtins */ \
|
|
|
|
CPP(EmptyFunction) \
|
|
|
|
CPP(Illegal) \
|
2017-07-10 07:57:09 +00:00
|
|
|
CPP(StrictPoisonPillThrower) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(UnsupportedThrower) \
|
|
|
|
TFJ(ReturnReceiver, 0) \
|
|
|
|
\
|
|
|
|
/* Array */ \
|
2017-08-07 12:12:37 +00:00
|
|
|
ASM(ArrayConstructor) \
|
|
|
|
ASM(InternalArrayConstructor) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ArrayConcat) \
|
|
|
|
/* ES6 #sec-array.isarray */ \
|
|
|
|
TFJ(ArrayIsArray, 1, kArg) \
|
2018-02-08 17:27:59 +00:00
|
|
|
/* ES6 #sec-array.from */ \
|
|
|
|
TFJ(ArrayFrom, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-01-18 13:03:16 +00:00
|
|
|
/* ES6 #sec-array.of */ \
|
|
|
|
TFJ(ArrayOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES7 #sec-array.prototype.includes */ \
|
2018-03-05 12:48:04 +00:00
|
|
|
TFS(ArrayIncludesSmiOrObject, kElements, kSearchElement, kLength, \
|
|
|
|
kFromIndex) \
|
|
|
|
TFS(ArrayIncludesPackedDoubles, kElements, kSearchElement, kLength, \
|
|
|
|
kFromIndex) \
|
|
|
|
TFS(ArrayIncludesHoleyDoubles, kElements, kSearchElement, kLength, \
|
|
|
|
kFromIndex) \
|
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 */ \
|
2018-03-05 12:48:04 +00:00
|
|
|
TFS(ArrayIndexOfSmiOrObject, kElements, kSearchElement, kLength, kFromIndex) \
|
|
|
|
TFS(ArrayIndexOfPackedDoubles, kElements, kSearchElement, kLength, \
|
|
|
|
kFromIndex) \
|
|
|
|
TFS(ArrayIndexOfHoleyDoubles, kElements, kSearchElement, kLength, \
|
|
|
|
kFromIndex) \
|
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) \
|
2018-01-02 09:58:07 +00:00
|
|
|
TFJ(ArrayPrototypePop, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.push */ \
|
|
|
|
CPP(ArrayPush) \
|
2018-01-02 09:58:07 +00:00
|
|
|
TFJ(ArrayPrototypePush, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.shift */ \
|
|
|
|
CPP(ArrayShift) \
|
2018-01-02 09:58:07 +00:00
|
|
|
TFJ(ArrayPrototypeShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.slice */ \
|
|
|
|
CPP(ArraySlice) \
|
2018-01-02 09:58:07 +00:00
|
|
|
TFJ(ArrayPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.splice */ \
|
|
|
|
CPP(ArraySplice) \
|
|
|
|
/* ES6 #sec-array.prototype.unshift */ \
|
|
|
|
CPP(ArrayUnshift) \
|
2017-10-23 18:41:42 +00:00
|
|
|
/* Support for Array.from and other array-copying idioms */ \
|
|
|
|
TFS(CloneFastJSArray, kSource) \
|
|
|
|
TFS(ExtractFastJSArray, kSource, kBegin, kCount) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* 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) \
|
2017-12-29 10:44:41 +00:00
|
|
|
TFJ(ArrayEveryLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength) \
|
|
|
|
TFJ(ArrayEveryLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength, kResult) \
|
2017-04-29 11:40:48 +00:00
|
|
|
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) \
|
2018-01-04 09:51:47 +00:00
|
|
|
TFJ(ArraySomeLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength) \
|
|
|
|
TFJ(ArraySomeLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, kInitialK, \
|
|
|
|
kLength, kResult) \
|
2017-04-29 11:40:48 +00:00
|
|
|
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-10-23 14:23:27 +00:00
|
|
|
TFJ(ArrayFilterLoopEagerDeoptContinuation, 6, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kInitialK, kLength, kTo) \
|
|
|
|
TFJ(ArrayFilterLoopLazyDeoptContinuation, 8, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kInitialK, kLength, kValueK, kTo, kResult) \
|
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-07-13 08:16:17 +00:00
|
|
|
TFJ(ArrayMapLoopEagerDeoptContinuation, 5, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kInitialK, kLength) \
|
|
|
|
TFJ(ArrayMapLoopLazyDeoptContinuation, 6, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kInitialK, kLength, kResult) \
|
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) \
|
2018-02-07 12:51:58 +00:00
|
|
|
TFJ(ArrayReducePreLoopEagerDeoptContinuation, 2, kCallbackFn, kLength) \
|
2017-12-21 09:49:43 +00:00
|
|
|
TFJ(ArrayReduceLoopEagerDeoptContinuation, 4, kCallbackFn, kInitialK, \
|
|
|
|
kLength, kAccumulator) \
|
|
|
|
TFJ(ArrayReduceLoopLazyDeoptContinuation, 4, kCallbackFn, kInitialK, \
|
|
|
|
kLength, kResult) \
|
2017-04-29 11:40:48 +00:00
|
|
|
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) \
|
2018-02-07 12:51:58 +00:00
|
|
|
TFJ(ArrayReduceRightPreLoopEagerDeoptContinuation, 2, kCallbackFn, kLength) \
|
2017-12-21 16:42:10 +00:00
|
|
|
TFJ(ArrayReduceRightLoopEagerDeoptContinuation, 4, kCallbackFn, kInitialK, \
|
|
|
|
kLength, kAccumulator) \
|
|
|
|
TFJ(ArrayReduceRightLoopLazyDeoptContinuation, 4, kCallbackFn, kInitialK, \
|
|
|
|
kLength, kResult) \
|
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) \
|
2017-12-05 04:14:36 +00:00
|
|
|
/* ES6 #sec-array.prototype.find */ \
|
|
|
|
TFS(ArrayFindLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
|
|
|
|
kObject, kInitialK, kLength, kTo) \
|
2017-12-11 04:19:48 +00:00
|
|
|
TFJ(ArrayFindLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength) \
|
|
|
|
TFJ(ArrayFindLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, kInitialK, \
|
|
|
|
kLength, kResult) \
|
|
|
|
TFJ(ArrayFindLoopAfterCallbackLazyDeoptContinuation, 6, kCallbackFn, \
|
2017-12-15 15:50:11 +00:00
|
|
|
kThisArg, kInitialK, kLength, kFoundValue, kIsFound) \
|
2017-12-05 04:14:36 +00:00
|
|
|
TFJ(ArrayPrototypeFind, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-array.prototype.findIndex */ \
|
|
|
|
TFS(ArrayFindIndexLoopContinuation, kReceiver, kCallbackFn, kThisArg, \
|
|
|
|
kArray, kObject, kInitialK, kLength, kTo) \
|
2017-12-15 15:50:11 +00:00
|
|
|
TFJ(ArrayFindIndexLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength) \
|
|
|
|
TFJ(ArrayFindIndexLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, \
|
|
|
|
kInitialK, kLength, kResult) \
|
|
|
|
TFJ(ArrayFindIndexLoopAfterCallbackLazyDeoptContinuation, 6, kCallbackFn, \
|
|
|
|
kThisArg, kInitialK, kLength, kFoundValue, kIsFound) \
|
2017-12-05 04:14:36 +00:00
|
|
|
TFJ(ArrayPrototypeFindIndex, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.keys */ \
|
|
|
|
TFJ(ArrayPrototypeKeys, 0) \
|
|
|
|
/* ES6 #sec-array.prototype.values */ \
|
|
|
|
TFJ(ArrayPrototypeValues, 0) \
|
|
|
|
/* ES6 #sec-%arrayiteratorprototype%.next */ \
|
|
|
|
TFJ(ArrayIteratorPrototypeNext, 0) \
|
|
|
|
\
|
|
|
|
/* ArrayBuffer */ \
|
2018-02-28 11:35:12 +00:00
|
|
|
/* ES #sec-arraybuffer-constructor */ \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ArrayBufferConstructor) \
|
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 */ \
|
[async-await] Eliminate throwaway promise in async functions.
The ES2017 specification contains a so-called "throwaway" promise that
is used to specify the behavior of await in terms of PerformPromiseThen,
but it's actually not necessary and never exposed to user code. In
addition to that, hooking up the promise in await required a context (to
refer to the generator object) and two closures for the reject/fulfill
handling, which would resume the generator corresponding to the async
function. That meant, we had to allocate 4 additional objects for every
await.
Instead of using a JSPromise plus the callbacks, this CL adds logic to
allow PromiseReaction and PromiseReactionJobTask to carry arbitrary
payloads and Code handlers. We use this for await to avoid the
additional 4 objects mentioned above, and instead just have simple Code
handlers that resume the generator (for the async function), either by
throwing (in case of a rejection) or by resuming normally (in case of
fulfillment).
For this to work properly the JSGeneratorObject has to have a link to
the outer promise returned by the async function, so that the catch
prediction can still figure out what to do in case of promise rejection.
This is done by adding a new generator_outer_promise_symbol when the
debugger is active, which refers from the generator to the outer
promise.
With this change the doxbee-async-es2017-native test goes from around
100.54ms to around 82.45ms, which corresponds to a ~18% reduction in
execution time.
Bug: v8:7253
Change-Id: Iae25b3300bac351c3417be5ae687eff469b0e61f
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924069
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51334}
2018-02-16 13:20:15 +00:00
|
|
|
TFC(AsyncFunctionAwaitFulfill, PromiseReactionHandler, 1) \
|
|
|
|
TFC(AsyncFunctionAwaitReject, PromiseReactionHandler, 1) \
|
2018-02-19 11:34:06 +00:00
|
|
|
TFS(AsyncFunctionAwaitCaught, kGenerator, kValue, kOuterPromise) \
|
|
|
|
TFS(AsyncFunctionAwaitUncaught, kGenerator, kValue, kOuterPromise) \
|
2017-03-29 09:56:08 +00:00
|
|
|
TFJ(AsyncFunctionPromiseCreate, 0) \
|
|
|
|
TFJ(AsyncFunctionPromiseRelease, 1, kPromise) \
|
|
|
|
\
|
2017-09-20 05:32:15 +00:00
|
|
|
/* BigInt */ \
|
|
|
|
CPP(BigIntConstructor) \
|
|
|
|
CPP(BigIntAsUintN) \
|
|
|
|
CPP(BigIntAsIntN) \
|
|
|
|
CPP(BigIntPrototypeToLocaleString) \
|
|
|
|
CPP(BigIntPrototypeToString) \
|
|
|
|
CPP(BigIntPrototypeValueOf) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Boolean */ \
|
2018-02-28 10:35:16 +00:00
|
|
|
/* ES #sec-boolean-constructor */ \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(BooleanConstructor) \
|
|
|
|
/* 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 */ \
|
2018-02-28 13:48:48 +00:00
|
|
|
/* ES #sec-dataview-constructor */ \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(DataViewConstructor) \
|
|
|
|
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) \
|
2018-02-23 00:18:45 +00:00
|
|
|
CPP(DataViewPrototypeGetBigInt64) \
|
|
|
|
CPP(DataViewPrototypeSetBigInt64) \
|
|
|
|
CPP(DataViewPrototypeGetBigUint64) \
|
|
|
|
CPP(DataViewPrototypeSetBigUint64) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Date */ \
|
2018-02-28 09:42:42 +00:00
|
|
|
/* ES #sec-date-constructor */ \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(DateConstructor) \
|
|
|
|
/* 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 */ \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(LoadIC, LoadWithVector) \
|
|
|
|
TFH(LoadIC_Noninlined, LoadWithVector) \
|
|
|
|
TFH(LoadICTrampoline, Load) \
|
|
|
|
TFH(KeyedLoadIC, LoadWithVector) \
|
|
|
|
TFH(KeyedLoadICTrampoline, Load) \
|
2017-12-13 09:30:08 +00:00
|
|
|
TFH(StoreGlobalIC, StoreGlobalWithVector) \
|
|
|
|
TFH(StoreGlobalICTrampoline, StoreGlobal) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(StoreIC, StoreWithVector) \
|
|
|
|
TFH(StoreICTrampoline, Store) \
|
|
|
|
TFH(KeyedStoreIC, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreICTrampoline, Store) \
|
2018-03-02 20:30:34 +00:00
|
|
|
TFH(StoreInArrayLiteralIC, StoreWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(LoadGlobalIC, LoadGlobalWithVector) \
|
|
|
|
TFH(LoadGlobalICInsideTypeof, LoadGlobalWithVector) \
|
|
|
|
TFH(LoadGlobalICTrampoline, LoadGlobal) \
|
|
|
|
TFH(LoadGlobalICInsideTypeofTrampoline, LoadGlobal) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2017-05-23 09:06:51 +00:00
|
|
|
/* Map */ \
|
2017-10-09 18:41:12 +00:00
|
|
|
TFS(FindOrderedHashMapEntry, kTable, kKey) \
|
2017-06-07 19:36:36 +00:00
|
|
|
TFJ(MapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-10-09 18:15:51 +00:00
|
|
|
TFJ(MapPrototypeSet, 2, kKey, kValue) \
|
|
|
|
TFJ(MapPrototypeDelete, 1, kKey) \
|
|
|
|
TFJ(MapPrototypeGet, 1, kKey) \
|
|
|
|
TFJ(MapPrototypeHas, 1, kKey) \
|
|
|
|
CPP(MapPrototypeClear) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-map.prototype.entries */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(MapPrototypeEntries, 0) \
|
2017-07-11 12:41:29 +00:00
|
|
|
/* ES #sec-get-map.prototype.size */ \
|
|
|
|
TFJ(MapPrototypeGetSize, 0) \
|
2017-07-11 07:36:15 +00:00
|
|
|
/* ES #sec-map.prototype.forEach */ \
|
|
|
|
TFJ(MapPrototypeForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-map.prototype.keys */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(MapPrototypeKeys, 0) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-map.prototype.values */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(MapPrototypeValues, 0) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-%mapiteratorprototype%.next */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(MapIteratorPrototypeNext, 0) \
|
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 */ \
|
2017-09-29 05:43:46 +00:00
|
|
|
TFC(AllocateHeapNumber, AllocateHeapNumber, 1) \
|
2018-03-02 12:37:59 +00:00
|
|
|
/* ES #sec-number-constructor */ \
|
2017-09-11 13:25:54 +00:00
|
|
|
TFJ(NumberConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* 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) \
|
2017-11-28 10:05:00 +00:00
|
|
|
TFC(Exponentiate, BinaryOp, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
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) \
|
2017-10-27 07:34:03 +00:00
|
|
|
TFC(SameValue, Compare, 1) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFC(StrictEqual, Compare, 1) \
|
2017-11-20 15:08:35 +00:00
|
|
|
TFS(BitwiseNot, kValue) \
|
2017-11-20 16:04:54 +00:00
|
|
|
TFS(Decrement, kValue) \
|
|
|
|
TFS(Increment, kValue) \
|
2017-11-20 13:36:57 +00:00
|
|
|
TFS(Negate, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Object */ \
|
2018-02-28 08:58:10 +00:00
|
|
|
/* ES #sec-object-constructor */ \
|
2017-09-07 13:21:19 +00:00
|
|
|
TFJ(ObjectConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
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) \
|
2018-02-07 03:43:37 +00:00
|
|
|
TFJ(ObjectEntries, 1, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectFreeze) \
|
2017-09-25 08:21:07 +00:00
|
|
|
TFJ(ObjectGetOwnPropertyDescriptor, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectGetOwnPropertyDescriptors) \
|
|
|
|
CPP(ObjectGetOwnPropertyNames) \
|
|
|
|
CPP(ObjectGetOwnPropertySymbols) \
|
|
|
|
CPP(ObjectGetPrototypeOf) \
|
|
|
|
CPP(ObjectSetPrototypeOf) \
|
[es2015] Optimize Object.is baseline and interesting cases.
The Object.is builtin provides an entry point to the abstract operation
SameValue, which properly distinguishes -0 and 0, and also identifies
NaNs. Most of the time you don't need these, but rather just regular
strict equality, but when you do, Object.is(o, -0) is the most readable
way to check for minus zero.
This is for example used in Node.js by formatNumber to properly print -0
for negative zero. However since the builtin thus far implemented as C++
builtin and TurboFan didn't know anything about it, Node.js considering
to go with a more performant, less readable version (which also makes
assumptions about the input value) in
https://github.com/nodejs/node/pull/15726
until the performance of Object.is will be on par (so hopefully we can
go back to Object.is in Node 9).
This CL ports the baseline implementation of Object.is to CSA, which
is pretty straight-forward since SameValue is already available in
CodeStubAssembler, and inlines a few interesting cases into TurboFan,
i.e. comparing same SSA node, and checking for -0 and NaN explicitly.
On the micro-benchmarks we go from
testNumberIsMinusZero: 1000 ms.
testObjectIsMinusZero: 929 ms.
testObjectIsNaN: 954 ms.
testObjectIsSame: 793 ms.
testStrictEqualSame: 104 ms.
to
testNumberIsMinusZero: 89 ms.
testObjectIsMinusZero: 88 ms.
testObjectIsNaN: 88 ms.
testObjectIsSame: 86 ms.
testStrictEqualSame: 105 ms.
which is a nice 10x to 11x improvement and brings Object.is on par with
strict equality for most cases.
Drive-by-fix: Also refactor and optimize the SameValue check in the
CodeStubAssembler to avoid code bloat (by not inlining StrictEqual
into every user of SameValue, and also avoiding useless checks).
Bug: v8:6882
Change-Id: Ibffd8c36511f219fcce0d89ed4e1073f5d6c6344
Reviewed-on: https://chromium-review.googlesource.com/700254
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48275}
2017-10-04 06:25:26 +00:00
|
|
|
TFJ(ObjectIs, 2, kLeft, kRight) \
|
2017-03-29 09:56:08 +00:00
|
|
|
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 */ \
|
[builtins] Speed-up Object.prototype.toString.
The @@toStringTag lookup in Object.prototype.toString causes quite a
lot of overhead and oftentimes dominates the builtin performance. These
lookups are almost always negative, especially for primitive values,
and Object.prototype.toString is often used to implement predicates
(like in Node core or in AngularJS), so having a way to skip the
negative lookup yields big performance gains.
This CL introduces a "MayHaveInterestingSymbols" bit on every map,
which says whether instances with this map may have an interesting
symbol. Currently only @@toStringTag is considered an interesting
symbol, but we can extend that in the future.
In the Object.prototype.toString we can use the interesting symbols
bit to do a quick check on the prototype chain to see if there are
any maps that might have the @@toStringTag, and if not, we can just
immediately return the result, which is very fast because it's derived
from the instance type. This also avoids the ToObject conversions for
primitive values, which is important, since this causes unnecessary
GC traffic and in for example AngularJS, strings are also often probed
via the Object.prototype.toString based predicates.
This boosts Speedometer/AngularJS by over 3% and Speedometer overall
by up to 1%. On the microbenchmark from the similar SpiderMonkey bug
(https://bugzilla.mozilla.org/show_bug.cgi?id=1369042), we go from
roughly 450ms to 70ms, which corresponds to a 6.5x improvement.
```
function f() {
var res = "";
var a = [1, 2, 3];
var toString = Object.prototype.toString;
var t = new Date;
for (var i = 0; i < 5000000; i++)
res = toString.call(a);
print(new Date - t);
return res;
}
f();
```
The design document at https://goo.gl/e8CruQ has some additional
data points.
TBR=ulan@chromium.org
Bug: v8:6654
Change-Id: I31932cf41ecddad079d294e2c322a852af0ed244
Reviewed-on: https://chromium-review.googlesource.com/593620
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47034}
2017-08-01 08:11:14 +00:00
|
|
|
TFJ(ObjectPrototypeToString, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-object.prototype.valueof */ \
|
|
|
|
TFJ(ObjectPrototypeValueOf, 0) \
|
2017-08-28 05:26:15 +00:00
|
|
|
/* ES6 #sec-object.prototype.hasownproperty */ \
|
|
|
|
TFJ(ObjectPrototypeHasOwnProperty, 1, kKey) \
|
[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) \
|
2017-12-19 19:42:59 +00:00
|
|
|
/* ES #sec-object.prototype.tolocalestring */ \
|
|
|
|
TFJ(ObjectPrototypeToLocaleString, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectSeal) \
|
2018-02-07 03:43:37 +00:00
|
|
|
TFJ(ObjectValues, 1, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* 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-09-01 10:49:06 +00:00
|
|
|
TFS(ForInEnumerate, kReceiver) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(ForInFilter, kKey, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Promise */ \
|
[builtins] Refactor the promise resolution and rejection logic.
This introduces dedicated builtins
- FulfillPromise,
- RejectPromise, and
- ResolvePromise,
which perform the corresponding operations from the language
specification, and removes the redundant entry points and the
excessive inlining of these operations into other builtins. We
also add the same logic on the C++ side, so that we don't need
to go into JavaScript land when resolving/rejecting from the
API.
The C++ side has a complete implementation, including full support
for the debugger and the current PromiseHook machinery. This is to
avoid constantly crossing the boundary for those cases, and to also
simplify the CSA side (and soon the TurboFan side), where we only
do the fast-path and bail out to the runtime for the general handling.
On top of this we introduce %_RejectPromise and %_ResolvePromise,
which are entry points used by the bytecode and parser desugarings
for async functions, and also used by the V8 Extras API. Thanks to
this we can uniformly optimize these in TurboFan, where we have
corresponding operators JSRejectPromise and JSResolvePromise, which
currently just call into the builtins, but middle-term can be further
optimized, i.e. to skip the "then" lookup for JSResolvePromise when
we know something about the resolution.
In TurboFan we can also already inline the default PromiseCapability
[[Reject]] and [[Resolve]] functions, although this is not as effective
as it can be right now, until we have inlining support for the Promise
constructor (being worked on by petermarshall@ right now) and/or SFI
based CALL_IC feedback.
Overall this change is meant as a refactoring without significant
performance impact anywhere; it seems to improve performance of
simple async functions a bit, but otherwise is neutral.
Bug: v8:7253
Change-Id: Id0b979f9b2843560e38cd8df4b02627dad4b6d8c
Reviewed-on: https://chromium-review.googlesource.com/911632
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51260}
2018-02-12 19:10:29 +00:00
|
|
|
/* ES #sec-fulfillpromise */ \
|
|
|
|
TFS(FulfillPromise, kPromise, kValue) \
|
|
|
|
/* ES #sec-rejectpromise */ \
|
|
|
|
TFS(RejectPromise, kPromise, kReason, kDebugEvent) \
|
|
|
|
/* ES #sec-promise-resolve-functions */ \
|
|
|
|
/* Starting at step 6 of "Promise Resolve Functions" */ \
|
|
|
|
TFS(ResolvePromise, kPromise, kResolution) \
|
|
|
|
/* ES #sec-promise-reject-functions */ \
|
|
|
|
TFJ(PromiseCapabilityDefaultReject, 1, kReason) \
|
|
|
|
/* ES #sec-promise-resolve-functions */ \
|
|
|
|
TFJ(PromiseCapabilityDefaultResolve, 1, kResolution) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-getcapabilitiesexecutor-functions */ \
|
|
|
|
TFJ(PromiseGetCapabilitiesExecutor, 2, kResolve, kReject) \
|
|
|
|
/* ES6 #sec-newpromisecapability */ \
|
2018-02-08 16:36:52 +00:00
|
|
|
TFS(NewPromiseCapability, kConstructor, kDebugEvent) \
|
2018-02-21 09:07:57 +00:00
|
|
|
TFJ(PromiseConstructorLazyDeoptContinuation, 2, kPromise, kResult) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-promise-executor */ \
|
|
|
|
TFJ(PromiseConstructor, 1, kExecutor) \
|
2017-07-17 19:14:20 +00:00
|
|
|
CPP(IsPromise) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-promise.prototype.then */ \
|
2018-02-08 16:36:52 +00:00
|
|
|
TFJ(PromisePrototypeThen, 2, kOnFulfilled, kOnRejected) \
|
|
|
|
/* ES #sec-performpromisethen */ \
|
|
|
|
TFS(PerformPromiseThen, kPromise, kOnFulfilled, kOnRejected, kResultPromise) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-promise.prototype.catch */ \
|
2018-01-04 18:21:38 +00:00
|
|
|
TFJ(PromisePrototypeCatch, 1, kOnRejected) \
|
2018-02-08 16:36:52 +00:00
|
|
|
/* ES #sec-promisereactionjob */ \
|
[async-await] Eliminate throwaway promise in async functions.
The ES2017 specification contains a so-called "throwaway" promise that
is used to specify the behavior of await in terms of PerformPromiseThen,
but it's actually not necessary and never exposed to user code. In
addition to that, hooking up the promise in await required a context (to
refer to the generator object) and two closures for the reject/fulfill
handling, which would resume the generator corresponding to the async
function. That meant, we had to allocate 4 additional objects for every
await.
Instead of using a JSPromise plus the callbacks, this CL adds logic to
allow PromiseReaction and PromiseReactionJobTask to carry arbitrary
payloads and Code handlers. We use this for await to avoid the
additional 4 objects mentioned above, and instead just have simple Code
handlers that resume the generator (for the async function), either by
throwing (in case of a rejection) or by resuming normally (in case of
fulfillment).
For this to work properly the JSGeneratorObject has to have a link to
the outer promise returned by the async function, so that the catch
prediction can still figure out what to do in case of promise rejection.
This is done by adding a new generator_outer_promise_symbol when the
debugger is active, which refers from the generator to the outer
promise.
With this change the doxbee-async-es2017-native test goes from around
100.54ms to around 82.45ms, which corresponds to a ~18% reduction in
execution time.
Bug: v8:7253
Change-Id: Iae25b3300bac351c3417be5ae687eff469b0e61f
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924069
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51334}
2018-02-16 13:20:15 +00:00
|
|
|
TFS(PromiseRejectReactionJob, kReason, kHandler, kPayload) \
|
|
|
|
TFS(PromiseFulfillReactionJob, kValue, kHandler, kPayload) \
|
2018-02-08 16:36:52 +00:00
|
|
|
/* ES #sec-promiseresolvethenablejob */ \
|
|
|
|
TFS(PromiseResolveThenableJob, kPromiseToResolve, kThenable, kThen) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-promise.resolve */ \
|
2018-02-20 07:31:02 +00:00
|
|
|
TFJ(PromiseResolveTrampoline, 1, kValue) \
|
|
|
|
/* ES #sec-promise-resolve */ \
|
2017-09-07 17:00:23 +00:00
|
|
|
TFS(PromiseResolve, kConstructor, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-promise.reject */ \
|
|
|
|
TFJ(PromiseReject, 1, kReason) \
|
2018-01-04 18:21:38 +00:00
|
|
|
TFJ(PromisePrototypeFinally, 1, kOnFinally) \
|
2017-03-29 09:56:08 +00:00
|
|
|
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) \
|
[builtins] Refactor the promise resolution and rejection logic.
This introduces dedicated builtins
- FulfillPromise,
- RejectPromise, and
- ResolvePromise,
which perform the corresponding operations from the language
specification, and removes the redundant entry points and the
excessive inlining of these operations into other builtins. We
also add the same logic on the C++ side, so that we don't need
to go into JavaScript land when resolving/rejecting from the
API.
The C++ side has a complete implementation, including full support
for the debugger and the current PromiseHook machinery. This is to
avoid constantly crossing the boundary for those cases, and to also
simplify the CSA side (and soon the TurboFan side), where we only
do the fast-path and bail out to the runtime for the general handling.
On top of this we introduce %_RejectPromise and %_ResolvePromise,
which are entry points used by the bytecode and parser desugarings
for async functions, and also used by the V8 Extras API. Thanks to
this we can uniformly optimize these in TurboFan, where we have
corresponding operators JSRejectPromise and JSResolvePromise, which
currently just call into the builtins, but middle-term can be further
optimized, i.e. to skip the "then" lookup for JSResolvePromise when
we know something about the resolution.
In TurboFan we can also already inline the default PromiseCapability
[[Reject]] and [[Resolve]] functions, although this is not as effective
as it can be right now, until we have inlining support for the Promise
constructor (being worked on by petermarshall@ right now) and/or SFI
based CALL_IC feedback.
Overall this change is meant as a refactoring without significant
performance impact anywhere; it seems to improve performance of
simple async functions a bit, but otherwise is neutral.
Bug: v8:7253
Change-Id: Id0b979f9b2843560e38cd8df4b02627dad4b6d8c
Reviewed-on: https://chromium-review.googlesource.com/911632
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51260}
2018-02-12 19:10:29 +00:00
|
|
|
TFJ(PromiseAllResolveElementClosure, 1, kValue) \
|
2017-07-08 00:43:24 +00:00
|
|
|
/* ES #sec-promise.race */ \
|
|
|
|
TFJ(PromiseRace, 1, kIterable) \
|
2018-02-16 19:10:09 +00:00
|
|
|
/* V8 Extras: v8.createPromise(parent) */ \
|
|
|
|
TFJ(PromiseInternalConstructor, 1, kParent) \
|
|
|
|
/* V8 Extras: v8.rejectPromise(promise, reason) */ \
|
|
|
|
TFJ(PromiseInternalReject, 2, kPromise, kReason) \
|
|
|
|
/* V8 Extras: v8.resolvePromise(promise, resolution) */ \
|
|
|
|
TFJ(PromiseInternalResolve, 2, kPromise, kResolution) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Proxy */ \
|
2018-03-02 19:15:10 +00:00
|
|
|
TFJ(ProxyConstructor, 2, kTarget, kHandler) \
|
2018-01-05 14:40:40 +00:00
|
|
|
TFJ(ProxyRevocable, 2, kTarget, kHandler) \
|
|
|
|
TFJ(ProxyRevoke, 0) \
|
2017-08-10 07:09:05 +00:00
|
|
|
TFS(ProxyGetProperty, kProxy, kName, kReceiverValue) \
|
2017-08-16 12:33:07 +00:00
|
|
|
TFS(ProxyHasProperty, kProxy, kName) \
|
2017-09-01 13:05:17 +00:00
|
|
|
TFS(ProxySetProperty, kProxy, kName, kValue, kReceiverValue, kLanguageMode) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Reflect */ \
|
|
|
|
ASM(ReflectApply) \
|
|
|
|
ASM(ReflectConstruct) \
|
|
|
|
CPP(ReflectDefineProperty) \
|
|
|
|
CPP(ReflectDeleteProperty) \
|
|
|
|
CPP(ReflectGet) \
|
|
|
|
CPP(ReflectGetOwnPropertyDescriptor) \
|
|
|
|
CPP(ReflectGetPrototypeOf) \
|
2017-10-16 16:48:11 +00:00
|
|
|
TFJ(ReflectHas, 2, kTarget, kKey) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ReflectIsExtensible) \
|
|
|
|
CPP(ReflectOwnKeys) \
|
|
|
|
CPP(ReflectPreventExtensions) \
|
|
|
|
CPP(ReflectSet) \
|
|
|
|
CPP(ReflectSetPrototypeOf) \
|
|
|
|
\
|
|
|
|
/* RegExp */ \
|
|
|
|
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) \
|
|
|
|
\
|
|
|
|
/* 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
|
|
|
/* ES #sec-regexp.prototype-@@split */ \
|
2017-05-10 06:51:56 +00:00
|
|
|
TFJ(RegExpPrototypeSplit, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-08-01 13:11:36 +00:00
|
|
|
/* RegExp helpers */ \
|
|
|
|
TFS(RegExpExecAtom, kRegExp, kString, kLastIndex, kMatchInfo) \
|
2017-10-10 15:38:35 +00:00
|
|
|
TFS(RegExpMatchFast, kReceiver, kPattern) \
|
2017-08-01 13:11:36 +00:00
|
|
|
TFS(RegExpPrototypeExecSlow, kReceiver, kString) \
|
|
|
|
TFS(RegExpReplace, kRegExp, kString, kReplaceValue) \
|
2017-10-10 15:38:35 +00:00
|
|
|
TFS(RegExpSearchFast, kReceiver, kPattern) \
|
2017-08-01 13:11:36 +00:00
|
|
|
TFS(RegExpSplit, kRegExp, kString, kLimit) \
|
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-10-09 18:15:51 +00:00
|
|
|
TFJ(SetPrototypeHas, 1, kKey) \
|
|
|
|
TFJ(SetPrototypeAdd, 1, kKey) \
|
|
|
|
TFJ(SetPrototypeDelete, 1, kKey) \
|
|
|
|
CPP(SetPrototypeClear) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-set.prototype.entries */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(SetPrototypeEntries, 0) \
|
2017-07-11 12:41:29 +00:00
|
|
|
/* ES #sec-get-set.prototype.size */ \
|
|
|
|
TFJ(SetPrototypeGetSize, 0) \
|
2017-07-11 07:36:15 +00:00
|
|
|
/* ES #sec-set.prototype.foreach */ \
|
|
|
|
TFJ(SetPrototypeForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-set.prototype.values */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(SetPrototypeValues, 0) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-%setiteratorprototype%.next */ \
|
2017-07-10 06:46:56 +00:00
|
|
|
TFJ(SetIteratorPrototypeNext, 0) \
|
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 */ \
|
2018-03-01 12:35:12 +00:00
|
|
|
/* ES #sec-string-constructor */ \
|
2017-09-11 13:25:54 +00:00
|
|
|
TFJ(StringConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-03-01 12:35:12 +00:00
|
|
|
/* ES #sec-string.fromcodepoint */ \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(StringFromCodePoint) \
|
|
|
|
/* ES6 #sec-string.fromcharcode */ \
|
|
|
|
TFJ(StringFromCharCode, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.anchor */ \
|
|
|
|
TFJ(StringPrototypeAnchor, 1, kValue) \
|
|
|
|
/* ES6 #sec-string.prototype.big */ \
|
|
|
|
TFJ(StringPrototypeBig, 0) \
|
|
|
|
/* ES6 #sec-string.prototype.blink */ \
|
|
|
|
TFJ(StringPrototypeBlink, 0) \
|
|
|
|
/* ES6 #sec-string.prototype.bold */ \
|
|
|
|
TFJ(StringPrototypeBold, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.charat */ \
|
|
|
|
TFJ(StringPrototypeCharAt, 1, kPosition) \
|
|
|
|
/* ES6 #sec-string.prototype.charcodeat */ \
|
|
|
|
TFJ(StringPrototypeCharCodeAt, 1, kPosition) \
|
2017-07-19 17:56:58 +00:00
|
|
|
/* ES6 #sec-string.prototype.codepointat */ \
|
|
|
|
TFJ(StringPrototypeCodePointAt, 1, kPosition) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.concat */ \
|
|
|
|
TFJ(StringPrototypeConcat, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-string.prototype.endswith */ \
|
|
|
|
CPP(StringPrototypeEndsWith) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.fontcolor */ \
|
|
|
|
TFJ(StringPrototypeFontcolor, 1, kValue) \
|
|
|
|
/* ES6 #sec-string.prototype.fontsize */ \
|
|
|
|
TFJ(StringPrototypeFontsize, 1, kValue) \
|
|
|
|
/* ES6 #sec-string.prototype.fixed */ \
|
|
|
|
TFJ(StringPrototypeFixed, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.includes */ \
|
2017-08-22 23:39:31 +00:00
|
|
|
TFJ(StringPrototypeIncludes, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.indexof */ \
|
|
|
|
TFJ(StringPrototypeIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.italics */ \
|
|
|
|
TFJ(StringPrototypeItalics, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.lastindexof */ \
|
|
|
|
CPP(StringPrototypeLastIndexOf) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.link */ \
|
|
|
|
TFJ(StringPrototypeLink, 1, kValue) \
|
2017-10-10 15:38:35 +00:00
|
|
|
/* ES6 #sec-string.prototype.match */ \
|
|
|
|
TFJ(StringPrototypeMatch, 1, kRegexp) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.localecompare */ \
|
|
|
|
CPP(StringPrototypeLocaleCompare) \
|
2017-10-16 13:23:28 +00:00
|
|
|
/* ES6 #sec-string.prototype.padEnd */ \
|
|
|
|
TFJ(StringPrototypePadEnd, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-string.prototype.padStart */ \
|
|
|
|
TFJ(StringPrototypePadStart, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-09-14 12:43:49 +00:00
|
|
|
/* ES6 #sec-string.prototype.repeat */ \
|
|
|
|
TFJ(StringPrototypeRepeat, 1, kCount) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.replace */ \
|
|
|
|
TFJ(StringPrototypeReplace, 2, kSearch, kReplace) \
|
2017-10-10 15:38:35 +00:00
|
|
|
/* ES6 #sec-string.prototype.search */ \
|
|
|
|
TFJ(StringPrototypeSearch, 1, kRegexp) \
|
2017-05-12 11:35:32 +00:00
|
|
|
/* ES6 #sec-string.prototype.slice */ \
|
|
|
|
TFJ(StringPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.small */ \
|
|
|
|
TFJ(StringPrototypeSmall, 0) \
|
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) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.strike */ \
|
|
|
|
TFJ(StringPrototypeStrike, 0) \
|
|
|
|
/* ES6 #sec-string.prototype.sub */ \
|
|
|
|
TFJ(StringPrototypeSub, 0) \
|
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) \
|
[builtins] Convert String HTML functions (ex. anchor, big, bold) to CSA
- Added TFJ builtins for S.p.{anchor, big, blink, bold, fontcolor,
fontsize, fixed, italics, link, small, strike, sub, sup}
- Removed functionality from string.js
Bug: v8:5049
Change-Id: I3a91b52eaceef5c47bb55ed62780d72ef1e802e9
Reviewed-on: https://chromium-review.googlesource.com/666487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48056}
2017-09-15 19:24:24 +00:00
|
|
|
/* ES6 #sec-string.prototype.sup */ \
|
|
|
|
TFJ(StringPrototypeSup, 0) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.startswith */ \
|
|
|
|
CPP(StringPrototypeStartsWith) \
|
|
|
|
/* ES6 #sec-string.prototype.tostring */ \
|
|
|
|
TFJ(StringPrototypeToString, 0) \
|
2017-09-05 02:19:29 +00:00
|
|
|
TFJ(StringPrototypeTrim, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-01-19 13:05:01 +00:00
|
|
|
TFJ(StringPrototypeTrimEnd, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
TFJ(StringPrototypeTrimStart, \
|
2017-09-05 02:19:29 +00:00
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.valueof */ \
|
|
|
|
TFJ(StringPrototypeValueOf, 0) \
|
2017-10-19 12:55:32 +00:00
|
|
|
/* ES6 #sec-string.raw */ \
|
|
|
|
CPP(StringRaw) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype-@@iterator */ \
|
|
|
|
TFJ(StringPrototypeIterator, 0) \
|
|
|
|
\
|
|
|
|
/* StringIterator */ \
|
|
|
|
/* ES6 #sec-%stringiteratorprototype%.next */ \
|
|
|
|
TFJ(StringIteratorPrototypeNext, 0) \
|
|
|
|
\
|
|
|
|
/* Symbol */ \
|
2018-02-28 11:27:27 +00:00
|
|
|
/* ES #sec-symbol-constructor */ \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(SymbolConstructor) \
|
|
|
|
/* 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 */ \
|
2018-02-19 12:32:56 +00:00
|
|
|
TFS(IterableToList, kIterable, kIteratorFn) \
|
2017-04-25 12:11:44 +00:00
|
|
|
TFS(TypedArrayInitialize, kHolder, kLength, kElementSize, kInitialize) \
|
|
|
|
TFS(TypedArrayInitializeWithBuffer, kHolder, kLength, kBuffer, kElementSize, \
|
|
|
|
kByteOffset) \
|
2018-01-19 13:47:33 +00:00
|
|
|
TFJ(TypedArrayConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
TFJ(TypedArrayConstructor_ConstructStub, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
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) \
|
2018-02-13 14:51:28 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.filter */ \
|
|
|
|
TFJ(TypedArrayPrototypeFilter, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-11-28 05:24:33 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.find */ \
|
|
|
|
TFJ(TypedArrayPrototypeFind, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-11-29 13:57:20 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.findIndex */ \
|
|
|
|
TFJ(TypedArrayPrototypeFindIndex, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* 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-08-31 19:32:14 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.set */ \
|
2017-11-23 13:59:04 +00:00
|
|
|
TFJ(TypedArrayPrototypeSet, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-04-01 16:46:10 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.slice */ \
|
2018-01-30 10:42:49 +00:00
|
|
|
TFJ(TypedArrayPrototypeSlice, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-01-24 03:54:00 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.subarray */ \
|
|
|
|
TFJ(TypedArrayPrototypeSubArray, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-10-02 05:28:41 +00:00
|
|
|
/* ES6 #sec-get-%typedarray%.prototype-@@tostringtag */ \
|
|
|
|
TFJ(TypedArrayPrototypeToStringTag, 0) \
|
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) \
|
2018-02-07 11:49:24 +00:00
|
|
|
/* ES6 %TypedArray%.of */ \
|
|
|
|
TFJ(TypedArrayOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-02-19 12:32:56 +00:00
|
|
|
/* ES6 %TypedArray%.from */ \
|
|
|
|
TFJ(TypedArrayFrom, 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
|
|
|
\
|
2017-07-17 06:44:47 +00:00
|
|
|
/* WeakMap */ \
|
2017-11-12 14:50:59 +00:00
|
|
|
TFJ(WeakMapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-07-17 06:44:47 +00:00
|
|
|
TFS(WeakMapLookupHashIndex, kTable, kKey) \
|
|
|
|
TFJ(WeakMapGet, 1, kKey) \
|
|
|
|
TFJ(WeakMapHas, 1, kKey) \
|
2017-10-30 13:00:18 +00:00
|
|
|
TFJ(WeakMapPrototypeSet, 2, kKey, kValue) \
|
2017-10-30 14:08:30 +00:00
|
|
|
TFJ(WeakMapPrototypeDelete, 1, kKey) \
|
2017-07-17 06:44:47 +00:00
|
|
|
\
|
2017-07-17 08:18:14 +00:00
|
|
|
/* WeakSet */ \
|
2017-11-12 14:50:59 +00:00
|
|
|
TFJ(WeakSetConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-07-17 08:18:14 +00:00
|
|
|
TFJ(WeakSetHas, 1, kKey) \
|
2017-10-30 13:00:18 +00:00
|
|
|
TFJ(WeakSetPrototypeAdd, 1, kValue) \
|
2017-10-30 14:08:30 +00:00
|
|
|
TFJ(WeakSetPrototypeDelete, 1, kValue) \
|
2017-10-30 13:00:18 +00:00
|
|
|
\
|
|
|
|
/* WeakSet / WeakMap Helpers */ \
|
2017-10-30 14:08:30 +00:00
|
|
|
TFS(WeakCollectionDelete, kCollection, kKey) \
|
2017-10-30 13:00:18 +00:00
|
|
|
TFS(WeakCollectionSet, kCollection, kKey, kValue) \
|
2017-07-17 08:18:14 +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 */ \
|
|
|
|
\
|
2018-02-19 12:11:44 +00:00
|
|
|
/* Await (proposal-async-iteration/#await), with resume behaviour */ \
|
|
|
|
/* specific to Async Generators. Internal / Not exposed to JS code. */ \
|
2018-02-19 11:34:06 +00:00
|
|
|
TFS(AsyncGeneratorAwaitCaught, kGenerator, kValue) \
|
|
|
|
TFS(AsyncGeneratorAwaitUncaught, kGenerator, kValue) \
|
2018-02-19 12:11:44 +00:00
|
|
|
TFC(AsyncGeneratorAwaitFulfill, PromiseReactionHandler, 1) \
|
|
|
|
TFC(AsyncGeneratorAwaitReject, PromiseReactionHandler, 1) \
|
|
|
|
TFC(AsyncGeneratorYieldFulfill, PromiseReactionHandler, 1) \
|
|
|
|
TFC(AsyncGeneratorReturnClosedFulfill, PromiseReactionHandler, 1) \
|
|
|
|
TFC(AsyncGeneratorReturnClosedReject, PromiseReactionHandler, 1) \
|
|
|
|
TFC(AsyncGeneratorReturnFulfill, PromiseReactionHandler, 1) \
|
|
|
|
\
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(AsyncGeneratorResolve, kGenerator, kValue, kDone) \
|
|
|
|
TFS(AsyncGeneratorReject, kGenerator, kValue) \
|
2017-08-07 14:13:18 +00:00
|
|
|
TFS(AsyncGeneratorYield, kGenerator, kValue, kIsCaught) \
|
2017-08-09 13:43:29 +00:00
|
|
|
TFS(AsyncGeneratorReturn, kGenerator, kValue, kIsCaught) \
|
2017-04-07 15:42:11 +00:00
|
|
|
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
|
|
|
\
|
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-08-16 05:41:03 +00:00
|
|
|
#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
|
|
|
BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
2017-06-29 22:28:00 +00:00
|
|
|
\
|
|
|
|
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-08-16 05:41:03 +00:00
|
|
|
#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
|
|
|
BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
|
|
|
\
|
|
|
|
/* no-op fallback version */ \
|
|
|
|
CPP(StringPrototypeNormalize) \
|
|
|
|
/* same as toLowercase; fallback version */ \
|
|
|
|
CPP(StringPrototypeToLocaleLowerCase) \
|
|
|
|
/* same as toUppercase; fallback version */ \
|
|
|
|
CPP(StringPrototypeToLocaleUpperCase) \
|
|
|
|
/* (obsolete) Unibrow version */ \
|
|
|
|
CPP(StringPrototypeToLowerCase) \
|
|
|
|
/* (obsolete) Unibrow version */ \
|
2017-06-29 03:01:13 +00:00
|
|
|
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) \
|
[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) \
|
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) \
|
2018-02-08 16:36:52 +00:00
|
|
|
V(PromiseFulfillReactionJob) \
|
2017-07-08 00:43:24 +00:00
|
|
|
V(PromiseRace) \
|
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
|
2018-02-08 16:36:52 +00:00
|
|
|
#define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseRejectReactionJob)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
|
|
|
#define IGNORE_BUILTIN(...)
|
|
|
|
|
2017-08-16 05:41:03 +00:00
|
|
|
#define BUILTIN_LIST_ALL(V) BUILTIN_LIST(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-08-16 05:41:03 +00:00
|
|
|
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-08-16 05:41:03 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, V)
|
2017-04-07 15:42:11 +00:00
|
|
|
|
|
|
|
#define BUILTIN_LIST_TFS(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
2017-08-16 05:41:03 +00:00
|
|
|
V, 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, \
|
2017-08-16 05:41:03 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-06-07 13:23:33 +00:00
|
|
|
|
|
|
|
#define BUILTIN_LIST_TFC(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V, \
|
2017-08-16 05:41:03 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-06-07 13:23:33 +00:00
|
|
|
|
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_
|