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_
|
|
|
|
|
2018-09-10 12:55:45 +00:00
|
|
|
#include "builtins-generated/bytecodes-builtins-list.h"
|
2018-08-20 18:58:38 +00:00
|
|
|
|
2018-04-16 09:24:22 +00:00
|
|
|
// include generated header
|
2019-05-14 13:52:00 +00:00
|
|
|
#include "torque-generated/builtin-definitions-tq.h"
|
2018-04-16 09:24:22 +00:00
|
|
|
|
2017-03-29 09:56:08 +00:00
|
|
|
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.
|
2019-02-28 19:32:51 +00:00
|
|
|
// Args: name, interface descriptor
|
2017-03-29 09:56:08 +00:00
|
|
|
// TFH: Handlers in Turbofan, with CodeStub linkage.
|
2017-09-29 08:06:44 +00:00
|
|
|
// Args: name, interface descriptor
|
2018-08-20 18:58:38 +00:00
|
|
|
// BCH: Bytecode Handlers, with bytecode dispatch linkage.
|
2018-09-18 10:37:26 +00:00
|
|
|
// Args: name, OperandScale, Bytecode
|
2017-03-29 09:56:08 +00:00
|
|
|
// ASM: Builtin in platform-dependent assembly.
|
2018-12-13 10:50:31 +00:00
|
|
|
// Args: name, interface descriptor
|
|
|
|
|
|
|
|
// TODO(jgruber): Remove DummyDescriptor once all ASM builtins have been
|
|
|
|
// properly associated with their descriptor.
|
2017-03-29 09:56:08 +00:00
|
|
|
|
2018-10-26 16:03:17 +00:00
|
|
|
#define BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
2017-08-03 11:17:17 +00:00
|
|
|
/* GC write barrirer */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(RecordWrite, RecordWrite) \
|
2019-03-28 08:41:09 +00:00
|
|
|
TFC(EphemeronKeyBarrier, EphemeronKeyBarrier) \
|
2017-08-03 11:17:17 +00:00
|
|
|
\
|
2017-08-24 17:37:03 +00:00
|
|
|
/* Adaptors for CPP/API builtin */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(AdaptorWithExitFrame, CppBuiltinAdaptor) \
|
|
|
|
TFC(AdaptorWithBuiltinExitFrame, CppBuiltinAdaptor) \
|
2017-08-24 17:37:03 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Calls */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(ArgumentsAdaptorTrampoline, ArgumentsAdaptor) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(CallFunction_ReceiverIsNullOrUndefined, CallTrampoline) \
|
|
|
|
ASM(CallFunction_ReceiverIsNotNullOrUndefined, CallTrampoline) \
|
|
|
|
ASM(CallFunction_ReceiverIsAny, CallTrampoline) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 section 9.4.1.1 [[Call]] ( thisArgument, argumentsList) */ \
|
2019-02-08 17:28:21 +00:00
|
|
|
ASM(CallBoundFunction, CallTrampoline) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 section 7.3.12 Call(F, V, [argumentsList]) */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(Call_ReceiverIsNullOrUndefined, CallTrampoline) \
|
|
|
|
ASM(Call_ReceiverIsNotNullOrUndefined, CallTrampoline) \
|
|
|
|
ASM(Call_ReceiverIsAny, CallTrampoline) \
|
2017-07-14 09:51:52 +00:00
|
|
|
\
|
|
|
|
/* ES6 section 9.5.12[[Call]] ( thisArgument, argumentsList ) */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(CallProxy, CallTrampoline) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(CallVarargs, CallVarargs) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(CallWithSpread, CallWithSpread) \
|
|
|
|
TFC(CallWithArrayLike, CallWithArrayLike) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(CallForwardVarargs, CallForwardVarargs) \
|
|
|
|
ASM(CallFunctionForwardVarargs, CallForwardVarargs) \
|
2019-02-14 12:03:32 +00:00
|
|
|
/* Call an API callback via a {FunctionTemplateInfo}, doing appropriate */ \
|
|
|
|
/* access and compatible receiver checks. */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(CallFunctionTemplate_CheckAccess, CallFunctionTemplate) \
|
|
|
|
TFC(CallFunctionTemplate_CheckCompatibleReceiver, CallFunctionTemplate) \
|
2019-02-14 12:03:32 +00:00
|
|
|
TFC(CallFunctionTemplate_CheckAccessAndCompatibleReceiver, \
|
2019-02-28 19:32:51 +00:00
|
|
|
CallFunctionTemplate) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Construct */ \
|
|
|
|
/* ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(ConstructFunction, JSTrampoline) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 section 9.4.1.2 [[Construct]] (argumentsList, newTarget) */ \
|
2019-02-08 17:28:21 +00:00
|
|
|
ASM(ConstructBoundFunction, JSTrampoline) \
|
|
|
|
ASM(ConstructedNonConstructable, JSTrampoline) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(Construct, JSTrampoline) \
|
|
|
|
ASM(ConstructVarargs, ConstructVarargs) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(ConstructWithSpread, ConstructWithSpread) \
|
|
|
|
TFC(ConstructWithArrayLike, ConstructWithArrayLike) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(ConstructForwardVarargs, ConstructForwardVarargs) \
|
|
|
|
ASM(ConstructFunctionForwardVarargs, ConstructForwardVarargs) \
|
|
|
|
ASM(JSConstructStubGeneric, Dummy) \
|
|
|
|
ASM(JSBuiltinsConstructStub, Dummy) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(FastNewObject, FastNewObject) \
|
2018-02-22 12:04:01 +00:00
|
|
|
TFS(FastNewClosure, kSharedFunctionInfo, kFeedbackCell) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(FastNewFunctionContextEval, FastNewFunctionContext) \
|
|
|
|
TFC(FastNewFunctionContextFunction, FastNewFunctionContext) \
|
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, \
|
2018-07-05 18:34:09 +00:00
|
|
|
kObjectBoilerplateDescription, kFlags) \
|
2017-07-18 14:24:26 +00:00
|
|
|
/* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(ConstructProxy, JSTrampoline) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Apply and entries */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(JSEntry, Dummy) \
|
|
|
|
ASM(JSConstructEntry, Dummy) \
|
2019-01-17 11:05:38 +00:00
|
|
|
ASM(JSRunMicrotasksEntry, RunMicrotasksEntry) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(JSEntryTrampoline, Dummy) \
|
|
|
|
ASM(JSConstructEntryTrampoline, Dummy) \
|
|
|
|
ASM(ResumeGeneratorTrampoline, ResumeGenerator) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* String helpers */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(StringCharAt, StringAt) \
|
|
|
|
TFC(StringCodePointAtUTF16, StringAt) \
|
|
|
|
TFC(StringCodePointAtUTF32, StringAt) \
|
|
|
|
TFC(StringEqual, Compare) \
|
|
|
|
TFC(StringGreaterThan, Compare) \
|
|
|
|
TFC(StringGreaterThanOrEqual, Compare) \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(StringIndexOf, kReceiver, kSearchString, kPosition) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(StringLessThan, Compare) \
|
|
|
|
TFC(StringLessThanOrEqual, Compare) \
|
|
|
|
TFC(StringSubstring, StringSubstring) \
|
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 */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(InterpreterEntryTrampoline, Dummy) \
|
|
|
|
ASM(InterpreterPushArgsThenCall, InterpreterPushArgsThenCall) \
|
|
|
|
ASM(InterpreterPushUndefinedAndArgsThenCall, InterpreterPushArgsThenCall) \
|
|
|
|
ASM(InterpreterPushArgsThenCallWithFinalSpread, InterpreterPushArgsThenCall) \
|
|
|
|
ASM(InterpreterPushArgsThenConstruct, InterpreterPushArgsThenConstruct) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructArrayFunction, \
|
|
|
|
InterpreterPushArgsThenConstruct) \
|
|
|
|
ASM(InterpreterPushArgsThenConstructWithFinalSpread, \
|
|
|
|
InterpreterPushArgsThenConstruct) \
|
|
|
|
ASM(InterpreterEnterBytecodeAdvance, Dummy) \
|
|
|
|
ASM(InterpreterEnterBytecodeDispatch, Dummy) \
|
|
|
|
ASM(InterpreterOnStackReplacement, ContextOnly) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Code life-cycle */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(CompileLazy, JSTrampoline) \
|
|
|
|
TFC(CompileLazyDeoptimizedCode, JSTrampoline) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(InstantiateAsmJs, Dummy) \
|
|
|
|
ASM(NotifyDeoptimized, Dummy) \
|
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. */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(ContinueToCodeStubBuiltin, Dummy) \
|
|
|
|
ASM(ContinueToCodeStubBuiltinWithResult, Dummy) \
|
|
|
|
ASM(ContinueToJavaScriptBuiltin, Dummy) \
|
|
|
|
ASM(ContinueToJavaScriptBuiltinWithResult, Dummy) \
|
2017-06-07 13:23:33 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* API callback handling */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(CallApiCallback, ApiCallback) \
|
|
|
|
ASM(CallApiGetter, ApiGetter) \
|
2017-03-29 09:56:08 +00:00
|
|
|
API(HandleApiCall) \
|
|
|
|
API(HandleApiCallAsFunction) \
|
|
|
|
API(HandleApiCallAsConstructor) \
|
|
|
|
\
|
|
|
|
/* Adapters for Turbofan into runtime */ \
|
2019-03-07 11:47:55 +00:00
|
|
|
TFC(AllocateInYoungGeneration, Allocate) \
|
|
|
|
TFC(AllocateInOldGeneration, Allocate) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* TurboFan support builtins */ \
|
2017-04-07 15:42:11 +00:00
|
|
|
TFS(CopyFastSmiOrObjectElements, kObject) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(GrowFastDoubleElements, GrowArrayElements) \
|
|
|
|
TFC(GrowFastSmiOrObjectElements, GrowArrayElements) \
|
|
|
|
TFC(NewArgumentsElements, NewArgumentsElements) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Debugger */ \
|
2018-03-08 14:07:39 +00:00
|
|
|
TFJ(DebugBreakTrampoline, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(FrameDropperTrampoline, FrameDropperTrampoline) \
|
|
|
|
ASM(HandleDebuggerStatement, ContextOnly) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Type conversions */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(ToObject, TypeConversion) \
|
|
|
|
TFC(ToBoolean, TypeConversion) \
|
|
|
|
TFC(OrdinaryToPrimitive_Number, TypeConversion) \
|
|
|
|
TFC(OrdinaryToPrimitive_String, TypeConversion) \
|
|
|
|
TFC(NonPrimitiveToPrimitive_Default, TypeConversion) \
|
|
|
|
TFC(NonPrimitiveToPrimitive_Number, TypeConversion) \
|
|
|
|
TFC(NonPrimitiveToPrimitive_String, TypeConversion) \
|
|
|
|
TFC(StringToNumber, TypeConversion) \
|
|
|
|
TFC(ToName, TypeConversion) \
|
|
|
|
TFC(NonNumberToNumber, TypeConversion) \
|
|
|
|
TFC(NonNumberToNumeric, TypeConversion) \
|
|
|
|
TFC(ToNumber, TypeConversion) \
|
|
|
|
TFC(ToNumberConvertBigInt, TypeConversion) \
|
|
|
|
TFC(ToNumeric, TypeConversion) \
|
|
|
|
TFC(NumberToString, TypeConversion) \
|
|
|
|
TFC(ToInteger, TypeConversion) \
|
|
|
|
TFC(ToInteger_TruncateMinusZero, TypeConversion) \
|
|
|
|
TFC(ToLength, TypeConversion) \
|
|
|
|
TFC(Typeof, Typeof) \
|
|
|
|
TFC(GetSuperConstructor, Typeof) \
|
|
|
|
TFC(BigIntToI64, BigIntToI64) \
|
2019-03-20 10:53:44 +00:00
|
|
|
TFC(I64ToBigInt, I64ToBigInt) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2017-06-22 15:43:35 +00:00
|
|
|
/* Type conversions continuations */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(ToBooleanLazyDeoptContinuation, TypeConversionStackParameter) \
|
2017-06-22 15:43:35 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Handlers */ \
|
[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) \
|
2019-02-11 10:59:57 +00:00
|
|
|
TFH(KeyedStoreIC_Megamorphic, Store) \
|
2017-09-29 08:06:44 +00:00
|
|
|
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(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) \
|
2018-11-16 09:22:36 +00:00
|
|
|
TFH(KeyedLoadIC_SloppyArguments, LoadWithVector) \
|
|
|
|
TFH(LoadIndexedInterceptorIC, LoadWithVector) \
|
|
|
|
TFH(StoreInterceptorIC, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_SloppyArguments_Standard, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_SloppyArguments_GrowNoTransitionHandleCOW, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_SloppyArguments_NoTransitionIgnoreOOB, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_SloppyArguments_NoTransitionHandleCOW, StoreWithVector) \
|
|
|
|
TFH(StoreInArrayLiteralIC_Slow_Standard, StoreWithVector) \
|
2018-11-21 12:30:24 +00:00
|
|
|
TFH(StoreFastElementIC_Standard, StoreWithVector) \
|
|
|
|
TFH(StoreFastElementIC_GrowNoTransitionHandleCOW, StoreWithVector) \
|
|
|
|
TFH(StoreFastElementIC_NoTransitionIgnoreOOB, StoreWithVector) \
|
|
|
|
TFH(StoreFastElementIC_NoTransitionHandleCOW, StoreWithVector) \
|
2018-11-16 09:22:36 +00:00
|
|
|
TFH(StoreInArrayLiteralIC_Slow_GrowNoTransitionHandleCOW, StoreWithVector) \
|
|
|
|
TFH(StoreInArrayLiteralIC_Slow_NoTransitionIgnoreOOB, StoreWithVector) \
|
|
|
|
TFH(StoreInArrayLiteralIC_Slow_NoTransitionHandleCOW, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Slow_Standard, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Slow_GrowNoTransitionHandleCOW, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Slow_NoTransitionIgnoreOOB, StoreWithVector) \
|
|
|
|
TFH(KeyedStoreIC_Slow_NoTransitionHandleCOW, StoreWithVector) \
|
2018-11-21 12:30:24 +00:00
|
|
|
TFH(ElementsTransitionAndStore_Standard, StoreTransition) \
|
|
|
|
TFH(ElementsTransitionAndStore_GrowNoTransitionHandleCOW, StoreTransition) \
|
|
|
|
TFH(ElementsTransitionAndStore_NoTransitionIgnoreOOB, StoreTransition) \
|
|
|
|
TFH(ElementsTransitionAndStore_NoTransitionHandleCOW, StoreTransition) \
|
2019-02-27 22:52:30 +00:00
|
|
|
TFH(KeyedHasIC_PolymorphicName, LoadWithVector) \
|
|
|
|
TFH(KeyedHasIC_SloppyArguments, LoadWithVector) \
|
|
|
|
TFH(HasIndexedInterceptorIC, LoadWithVector) \
|
|
|
|
TFH(HasIC_Slow, LoadWithVector) \
|
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) \
|
2019-01-17 11:05:38 +00:00
|
|
|
ASM(RunMicrotasksTrampoline, RunMicrotasksEntry) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(RunMicrotasks, RunMicrotasks) \
|
2017-04-06 16:03:26 +00:00
|
|
|
\
|
2017-08-01 13:11:36 +00:00
|
|
|
/* Object property helpers */ \
|
2018-08-09 11:44:32 +00:00
|
|
|
TFS(HasProperty, kObject, kKey) \
|
2017-08-01 13:11:36 +00:00
|
|
|
TFS(DeleteProperty, kObject, kKey, kLanguageMode) \
|
2019-04-28 12:44:51 +00:00
|
|
|
/* ES #sec-copydataproperties */ \
|
|
|
|
TFS(CopyDataProperties, kTarget, kSource) \
|
|
|
|
TFS(SetDataProperties, kTarget, kSource) \
|
2017-08-01 13:11:36 +00:00
|
|
|
\
|
|
|
|
/* Abort */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(Abort, Abort) \
|
|
|
|
TFC(AbortJS, Abort) \
|
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) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ReturnReceiver, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Array */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(ArrayConstructor, JSTrampoline) \
|
|
|
|
TFC(ArrayConstructorImpl, ArrayConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_PackedSmi_DontOverride, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_HoleySmi_DontOverride, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_PackedSmi_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_HoleySmi_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_Packed_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_Holey_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_PackedDouble_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArrayNoArgumentConstructor_HoleyDouble_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArrayNoArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_PackedSmi_DontOverride, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_HoleySmi_DontOverride, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_PackedSmi_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_HoleySmi_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_Packed_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_Holey_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_PackedDouble_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
2018-05-29 09:10:15 +00:00
|
|
|
TFC(ArraySingleArgumentConstructor_HoleyDouble_DisableAllocationSites, \
|
2019-02-28 19:32:51 +00:00
|
|
|
ArraySingleArgumentConstructor) \
|
|
|
|
TFC(ArrayNArgumentsConstructor, ArrayNArgumentsConstructor) \
|
2019-02-08 17:28:21 +00:00
|
|
|
ASM(InternalArrayConstructor, JSTrampoline) \
|
|
|
|
ASM(InternalArrayConstructorImpl, JSTrampoline) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(InternalArrayNoArgumentConstructor_Packed, ArrayNoArgumentConstructor) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ArrayConcat) \
|
|
|
|
/* ES6 #sec-array.isarray */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ArrayIsArray, 1, kReceiver, kArg) \
|
2018-07-18 13:21:06 +00:00
|
|
|
/* ES6 #sec-array.prototype.fill */ \
|
|
|
|
CPP(ArrayPrototypeFill) \
|
2018-02-08 17:27:59 +00:00
|
|
|
/* ES6 #sec-array.from */ \
|
|
|
|
TFJ(ArrayFrom, 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) \
|
|
|
|
/* 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) \
|
2018-09-25 12:55:17 +00:00
|
|
|
TFS(CloneFastJSArrayFillingHoles, kSource) \
|
2017-10-23 18:41:42 +00:00
|
|
|
TFS(ExtractFastJSArray, kSource, kBegin, kCount) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.entries */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ArrayPrototypeEntries, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.keys */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ArrayPrototypeKeys, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-array.prototype.values */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ArrayPrototypeValues, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-%arrayiteratorprototype%.next */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ArrayIteratorPrototypeNext, 0, kReceiver) \
|
2018-03-15 16:51:01 +00:00
|
|
|
/* https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray */ \
|
|
|
|
TFS(FlattenIntoArray, kTarget, kSource, kSourceLength, kStart, kDepth) \
|
|
|
|
TFS(FlatMapIntoArray, kTarget, kSource, kSourceLength, kStart, kDepth, \
|
|
|
|
kMapperFunction, kThisArg) \
|
2018-05-23 01:25:41 +00:00
|
|
|
/* https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat */ \
|
|
|
|
TFJ(ArrayPrototypeFlat, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-03-15 16:51:01 +00:00
|
|
|
/* https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap */ \
|
|
|
|
TFJ(ArrayPrototypeFlatMap, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* 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] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
TFS(AsyncFunctionEnter, kClosure, kReceiver) \
|
2018-10-11 08:35:56 +00:00
|
|
|
TFS(AsyncFunctionReject, kAsyncFunctionObject, kReason, kCanSuspend) \
|
|
|
|
TFS(AsyncFunctionResolve, kAsyncFunctionObject, kValue, kCanSuspend) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(AsyncFunctionLazyDeoptContinuation, AsyncFunctionStackParameter) \
|
2018-10-11 08:35:56 +00:00
|
|
|
TFS(AsyncFunctionAwaitCaught, kAsyncFunctionObject, kValue) \
|
|
|
|
TFS(AsyncFunctionAwaitUncaught, kAsyncFunctionObject, kValue) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AsyncFunctionAwaitRejectClosure, 1, kReceiver, kSentError) \
|
|
|
|
TFJ(AsyncFunctionAwaitResolveClosure, 1, kReceiver, kSentValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
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 */ \
|
|
|
|
/* ES6 #sec-boolean.prototype.tostring */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(BooleanPrototypeToString, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-boolean.prototype.valueof */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(BooleanPrototypeValueOf, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* CallSite */ \
|
|
|
|
CPP(CallSitePrototypeGetColumnNumber) \
|
|
|
|
CPP(CallSitePrototypeGetEvalOrigin) \
|
|
|
|
CPP(CallSitePrototypeGetFileName) \
|
|
|
|
CPP(CallSitePrototypeGetFunction) \
|
|
|
|
CPP(CallSitePrototypeGetFunctionName) \
|
|
|
|
CPP(CallSitePrototypeGetLineNumber) \
|
|
|
|
CPP(CallSitePrototypeGetMethodName) \
|
|
|
|
CPP(CallSitePrototypeGetPosition) \
|
2018-10-29 08:07:28 +00:00
|
|
|
CPP(CallSitePrototypeGetPromiseIndex) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(CallSitePrototypeGetScriptNameOrSourceURL) \
|
|
|
|
CPP(CallSitePrototypeGetThis) \
|
|
|
|
CPP(CallSitePrototypeGetTypeName) \
|
2018-10-04 07:19:45 +00:00
|
|
|
CPP(CallSitePrototypeIsAsync) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(CallSitePrototypeIsConstructor) \
|
|
|
|
CPP(CallSitePrototypeIsEval) \
|
|
|
|
CPP(CallSitePrototypeIsNative) \
|
2018-10-25 20:01:58 +00:00
|
|
|
CPP(CallSitePrototypeIsPromiseAll) \
|
2017-03-29 09:56:08 +00:00
|
|
|
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) \
|
2018-05-05 16:23:38 +00:00
|
|
|
CPP(ConsoleCountReset) \
|
2017-04-18 20:50:30 +00:00
|
|
|
CPP(ConsoleAssert) \
|
2017-04-20 17:17:18 +00:00
|
|
|
TFJ(FastConsoleAssert, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-04-18 20:50:30 +00:00
|
|
|
CPP(ConsoleProfile) \
|
|
|
|
CPP(ConsoleProfileEnd) \
|
|
|
|
CPP(ConsoleTime) \
|
2018-09-28 15:18:34 +00:00
|
|
|
CPP(ConsoleTimeLog) \
|
2017-04-18 20:50:30 +00:00
|
|
|
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) \
|
|
|
|
\
|
|
|
|
/* 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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetDate, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getday */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetDay, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getfullyear */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetFullYear, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.gethours */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetHours, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getmilliseconds */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetMilliseconds, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getminutes */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetMinutes, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getmonth */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetMonth, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getseconds */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetSeconds, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.gettime */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetTime, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.gettimezoneoffset */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetTimezoneOffset, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcdate */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCDate, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcday */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCDay, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcfullyear */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCFullYear, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutchours */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCHours, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcmilliseconds */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCMilliseconds, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcminutes */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCMinutes, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcmonth */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCMonth, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.getutcseconds */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeGetUTCSeconds, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype.valueof */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeValueOf, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-date.prototype-@@toprimitive */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(DatePrototypeToPrimitive, 1, kReceiver, kHint) \
|
2017-03-29 09:56:08 +00:00
|
|
|
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) \
|
|
|
|
\
|
2019-01-07 05:08:08 +00:00
|
|
|
/* ExtrasUtils */ \
|
|
|
|
CPP(ExtrasUtilsUncurryThis) \
|
|
|
|
CPP(ExtrasUtilsCallReflectApply) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Function */ \
|
|
|
|
CPP(FunctionConstructor) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(FunctionPrototypeApply, Dummy) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(FunctionPrototypeBind) \
|
|
|
|
/* ES6 #sec-function.prototype.bind */ \
|
|
|
|
TFJ(FastFunctionPrototypeBind, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(FunctionPrototypeCall, Dummy) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-function.prototype-@@hasinstance */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(FunctionPrototypeHasInstance, 1, kReceiver, kV) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* 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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(GlobalIsFinite, 1, kReceiver, kNumber) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-isnan-number */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(GlobalIsNaN, 1, kReceiver, kNumber) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* JSON */ \
|
|
|
|
CPP(JsonParse) \
|
|
|
|
CPP(JsonStringify) \
|
|
|
|
\
|
|
|
|
/* ICs */ \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(LoadIC, LoadWithVector) \
|
2018-09-10 08:44:50 +00:00
|
|
|
TFH(LoadIC_Megamorphic, LoadWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(LoadIC_Noninlined, LoadWithVector) \
|
|
|
|
TFH(LoadICTrampoline, Load) \
|
2018-09-10 08:44:50 +00:00
|
|
|
TFH(LoadICTrampoline_Megamorphic, Load) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(KeyedLoadIC, LoadWithVector) \
|
2018-09-10 08:44:50 +00:00
|
|
|
TFH(KeyedLoadIC_Megamorphic, LoadWithVector) \
|
2017-09-29 08:06:44 +00:00
|
|
|
TFH(KeyedLoadICTrampoline, Load) \
|
2018-09-10 08:44:50 +00:00
|
|
|
TFH(KeyedLoadICTrampoline_Megamorphic, 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) \
|
[runtime] use new CloneObject bytecode for some ObjectLiteralSpread cases
As discussed in
https://docs.google.com/document/d/1sBdGe8RHgeYP850cKSSgGABTyfMdvaEWLy-vertuTCo/edit?ts=5b3ba5cc#,
this CL introduces a new bytecode (CloneObject), and a new IC type.
In this prototype implementation, the type feedback looks like the
following:
Uninitialized case:
{ uninitialized_sentinel, uninitialized_sentinel }
Monomorphic case:
{ weak 'source' map, strong 'result' map }
Polymorphic case:
{ WeakFixedArray with { weak 'source' map, strong 'result' map }, cleared value }
Megamorphic case:
{ megamorphic_sentinel, cleared_Value }
In the fast case, Object cloning is done by allocating an object with
the saved result map, and a shallow clone of the fast properties from
the source object, as well as cloned fast elements from the source object.
If at any point the fast case can't be taken, the IC transitions to the
slow case and remains there.
This prototype CL does not include any TurboFan optimization, and the
CloneObject operation is merely reduced to a stub call.
It may still be possible to get some further improvements by somehow
incorporating compile-time boilerplate elements into the cloned object,
or simplifying how the boilerplate elements are inserted into the
object.
In terms of performance, we improve the ObjectSpread score in JSTests/ObjectLiteralSpread/
by about 8x, with substantial improvements over the Babel and ObjectAssign scores.
R=gsathya@chromium.org, mvstanton@chromium.org, rmcilroy@chromium.org, neis@chromium.org, bmeurer@chromium.org
BUG=v8:7611
Change-Id: I79e1796eb77016fb4feba0e1d3bb9abb348c183e
Reviewed-on: https://chromium-review.googlesource.com/1127472
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54595}
2018-07-20 15:24:04 +00:00
|
|
|
TFH(CloneObjectIC, CloneObjectWithVector) \
|
2018-09-11 19:38:20 +00:00
|
|
|
TFH(CloneObjectIC_Slow, CloneObjectWithVector) \
|
2019-02-27 22:52:30 +00:00
|
|
|
TFH(KeyedHasIC, LoadWithVector) \
|
|
|
|
TFH(KeyedHasIC_Megamorphic, LoadWithVector) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2018-09-05 07:50:48 +00:00
|
|
|
/* IterableToList */ \
|
|
|
|
/* ES #sec-iterabletolist */ \
|
2018-09-05 09:18:27 +00:00
|
|
|
TFS(IterableToList, kIterable, kIteratorFn) \
|
2018-09-05 07:50:48 +00:00
|
|
|
TFS(IterableToListWithSymbolLookup, kIterable) \
|
|
|
|
TFS(IterableToListMayPreserveHoles, kIterable, kIteratorFn) \
|
|
|
|
\
|
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) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MapPrototypeSet, 2, kReceiver, kKey, kValue) \
|
|
|
|
TFJ(MapPrototypeDelete, 1, kReceiver, kKey) \
|
|
|
|
TFJ(MapPrototypeGet, 1, kReceiver, kKey) \
|
|
|
|
TFJ(MapPrototypeHas, 1, kReceiver, kKey) \
|
2017-10-09 18:15:51 +00:00
|
|
|
CPP(MapPrototypeClear) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-map.prototype.entries */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MapPrototypeEntries, 0, kReceiver) \
|
2017-07-11 12:41:29 +00:00
|
|
|
/* ES #sec-get-map.prototype.size */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MapPrototypeGetSize, 0, kReceiver) \
|
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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MapPrototypeKeys, 0, kReceiver) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-map.prototype.values */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MapPrototypeValues, 0, kReceiver) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-%mapiteratorprototype%.next */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MapIteratorPrototypeNext, 0, kReceiver) \
|
2018-10-16 13:05:29 +00:00
|
|
|
TFS(MapIteratorToList, kSource) \
|
2017-05-23 09:06:51 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Math */ \
|
|
|
|
/* ES6 #sec-math.abs */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathAbs, 1, kReceiver, kX) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.ceil */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathCeil, 1, kReceiver, kX) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.floor */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathFloor, 1, kReceiver, kX) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.hypot */ \
|
|
|
|
CPP(MathHypot) \
|
|
|
|
/* ES6 #sec-math.imul */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathImul, 2, kReceiver, kX, kY) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.max */ \
|
|
|
|
TFJ(MathMax, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-math.min */ \
|
|
|
|
TFJ(MathMin, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ES6 #sec-math.pow */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathPow, 2, kReceiver, kBase, kExponent) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.random */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathRandom, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.round */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathRound, 1, kReceiver, kX) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-math.trunc */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(MathTrunc, 1, kReceiver, kX) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* Number */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(AllocateHeapNumber, AllocateHeapNumber) \
|
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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberIsFinite, 1, kReceiver, kNumber) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-number.isinteger */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberIsInteger, 1, kReceiver, kNumber) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-number.isnan */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberIsNaN, 1, kReceiver, kNumber) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-number.issafeinteger */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberIsSafeInteger, 1, kReceiver, kNumber) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-number.parsefloat */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberParseFloat, 1, kReceiver, kString) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-number.parseint */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberParseInt, 2, kReceiver, kString, kRadix) \
|
2018-04-26 06:59:15 +00:00
|
|
|
TFS(ParseInt, kString, kRadix) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(NumberPrototypeToExponential) \
|
|
|
|
CPP(NumberPrototypeToFixed) \
|
|
|
|
CPP(NumberPrototypeToLocaleString) \
|
|
|
|
CPP(NumberPrototypeToPrecision) \
|
|
|
|
CPP(NumberPrototypeToString) \
|
|
|
|
/* ES6 #sec-number.prototype.valueof */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(NumberPrototypeValueOf, 0, kReceiver) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(Add, BinaryOp) \
|
|
|
|
TFC(Subtract, BinaryOp) \
|
|
|
|
TFC(Multiply, BinaryOp) \
|
|
|
|
TFC(Divide, BinaryOp) \
|
|
|
|
TFC(Modulus, BinaryOp) \
|
|
|
|
TFC(Exponentiate, BinaryOp) \
|
|
|
|
TFC(BitwiseAnd, BinaryOp) \
|
|
|
|
TFC(BitwiseOr, BinaryOp) \
|
|
|
|
TFC(BitwiseXor, BinaryOp) \
|
|
|
|
TFC(ShiftLeft, BinaryOp) \
|
|
|
|
TFC(ShiftRight, BinaryOp) \
|
|
|
|
TFC(ShiftRightLogical, BinaryOp) \
|
|
|
|
TFC(LessThan, Compare) \
|
|
|
|
TFC(LessThanOrEqual, Compare) \
|
|
|
|
TFC(GreaterThan, Compare) \
|
|
|
|
TFC(GreaterThanOrEqual, Compare) \
|
|
|
|
TFC(Equal, Compare) \
|
|
|
|
TFC(SameValue, Compare) \
|
2019-04-18 09:56:16 +00:00
|
|
|
TFC(SameValueNumbersOnly, Compare) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(StrictEqual, Compare) \
|
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) \
|
2018-04-12 13:23:33 +00:00
|
|
|
TFJ(ObjectAssign, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-object.create */ \
|
2017-06-23 06:13:25 +00:00
|
|
|
TFJ(ObjectCreate, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-04-18 16:18:12 +00:00
|
|
|
TFS(CreateObjectWithoutProperties, kPrototypeArg) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectDefineGetter) \
|
|
|
|
CPP(ObjectDefineProperties) \
|
|
|
|
CPP(ObjectDefineProperty) \
|
|
|
|
CPP(ObjectDefineSetter) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectEntries, 1, kReceiver, 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) \
|
2018-06-25 01:19:41 +00:00
|
|
|
TFJ(ObjectGetOwnPropertyNames, 1, kReceiver, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectGetOwnPropertySymbols) \
|
|
|
|
CPP(ObjectGetPrototypeOf) \
|
|
|
|
CPP(ObjectSetPrototypeOf) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectIs, 2, kReceiver, kLeft, kRight) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectIsExtensible) \
|
|
|
|
CPP(ObjectIsFrozen) \
|
|
|
|
CPP(ObjectIsSealed) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectKeys, 1, kReceiver, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectLookupGetter) \
|
|
|
|
CPP(ObjectLookupSetter) \
|
|
|
|
CPP(ObjectPreventExtensions) \
|
|
|
|
/* ES6 #sec-object.prototype.tostring */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectPrototypeToString, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-object.prototype.valueof */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectPrototypeValueOf, 0, kReceiver) \
|
2017-08-28 05:26:15 +00:00
|
|
|
/* ES6 #sec-object.prototype.hasownproperty */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectPrototypeHasOwnProperty, 1, kReceiver, kKey) \
|
|
|
|
TFJ(ObjectPrototypeIsPrototypeOf, 1, kReceiver, 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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectPrototypeToLocaleString, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ObjectSeal) \
|
2018-10-16 12:52:25 +00:00
|
|
|
TFS(ObjectToString, kReceiver) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ObjectValues, 1, kReceiver, kObject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* instanceof */ \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(OrdinaryHasInstance, Compare) \
|
|
|
|
TFC(InstanceOf, Compare) \
|
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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseCapabilityDefaultReject, 1, kReceiver, kReason) \
|
[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-promise-resolve-functions */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseCapabilityDefaultResolve, 1, kReceiver, kResolution) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-getcapabilitiesexecutor-functions */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseGetCapabilitiesExecutor, 2, kReceiver, kResolve, kReject) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-newpromisecapability */ \
|
2018-02-08 16:36:52 +00:00
|
|
|
TFS(NewPromiseCapability, kConstructor, kDebugEvent) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseConstructorLazyDeoptContinuation, 4, kReceiver, kPromise, \
|
|
|
|
kReject, kException, kResult) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-promise-executor */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseConstructor, 1, kReceiver, 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-06-18 16:35:56 +00:00
|
|
|
TFJ(PromisePrototypeThen, 2, kReceiver, kOnFulfilled, kOnRejected) \
|
2018-02-08 16:36:52 +00:00
|
|
|
/* ES #sec-performpromisethen */ \
|
|
|
|
TFS(PerformPromiseThen, kPromise, kOnFulfilled, kOnRejected, kResultPromise) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-promise.prototype.catch */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromisePrototypeCatch, 1, kReceiver, kOnRejected) \
|
2018-02-08 16:36:52 +00:00
|
|
|
/* ES #sec-promisereactionjob */ \
|
2018-05-14 08:55:07 +00:00
|
|
|
TFS(PromiseRejectReactionJob, kReason, kHandler, kPromiseOrCapability) \
|
|
|
|
TFS(PromiseFulfillReactionJob, kValue, kHandler, kPromiseOrCapability) \
|
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-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseResolveTrampoline, 1, kReceiver, kValue) \
|
2018-02-20 07:31:02 +00:00
|
|
|
/* 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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseReject, 1, kReceiver, kReason) \
|
|
|
|
TFJ(PromisePrototypeFinally, 1, kReceiver, kOnFinally) \
|
|
|
|
TFJ(PromiseThenFinally, 1, kReceiver, kValue) \
|
|
|
|
TFJ(PromiseCatchFinally, 1, kReceiver, kReason) \
|
|
|
|
TFJ(PromiseValueThunkFinally, 0, kReceiver) \
|
|
|
|
TFJ(PromiseThrowerFinally, 0, kReceiver) \
|
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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseAll, 1, kReceiver, kIterable) \
|
|
|
|
TFJ(PromiseAllResolveElementClosure, 1, kReceiver, kValue) \
|
2017-07-08 00:43:24 +00:00
|
|
|
/* ES #sec-promise.race */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseRace, 1, kReceiver, kIterable) \
|
2019-04-12 17:14:18 +00:00
|
|
|
/* ES #sec-promise.allsettled */ \
|
|
|
|
TFJ(PromiseAllSettled, 1, kReceiver, kIterable) \
|
|
|
|
TFJ(PromiseAllSettledResolveElementClosure, 1, kReceiver, kValue) \
|
|
|
|
TFJ(PromiseAllSettledRejectElementClosure, 1, kReceiver, kValue) \
|
2018-02-16 19:10:09 +00:00
|
|
|
/* V8 Extras: v8.createPromise(parent) */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseInternalConstructor, 1, kReceiver, kParent) \
|
2018-02-16 19:10:09 +00:00
|
|
|
/* V8 Extras: v8.rejectPromise(promise, reason) */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseInternalReject, 2, kReceiver, kPromise, kReason) \
|
2018-02-16 19:10:09 +00:00
|
|
|
/* V8 Extras: v8.resolvePromise(promise, resolution) */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(PromiseInternalResolve, 2, kReceiver, kPromise, kResolution) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
2019-05-10 14:11:18 +00:00
|
|
|
/* Proxy */ \
|
|
|
|
TFS(ProxyHasProperty, kProxy, kName) \
|
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* Reflect */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(ReflectApply, Dummy) \
|
|
|
|
ASM(ReflectConstruct, Dummy) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(ReflectDefineProperty) \
|
|
|
|
CPP(ReflectDeleteProperty) \
|
|
|
|
CPP(ReflectGet) \
|
|
|
|
CPP(ReflectGetOwnPropertyDescriptor) \
|
|
|
|
CPP(ReflectGetPrototypeOf) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(ReflectHas, 2, kReceiver, 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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpConstructor, 2, kReceiver, kPattern, kFlags) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(RegExpInputGetter) \
|
|
|
|
CPP(RegExpInputSetter) \
|
|
|
|
CPP(RegExpLastMatchGetter) \
|
|
|
|
CPP(RegExpLastParenGetter) \
|
|
|
|
CPP(RegExpLeftContextGetter) \
|
|
|
|
/* ES #sec-regexp.prototype.compile */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeCompile, 2, kReceiver, kPattern, kFlags) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-regexp.prototype.exec */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeExec, 1, kReceiver, kString) \
|
2017-03-31 09:20:13 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.dotAll */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeDotAllGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.flags */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeFlagsGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.global */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeGlobalGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.ignorecase */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeIgnoreCaseGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-regexp.prototype-@@match */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeMatch, 1, kReceiver, kString) \
|
2018-04-05 14:41:26 +00:00
|
|
|
/* https://tc39.github.io/proposal-string-matchall/ */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeMatchAll, 1, kReceiver, kString) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.multiline */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeMultilineGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-regexp.prototype-@@search */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeSearch, 1, kReceiver, kString) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.source */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeSourceGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-get-regexp.prototype.sticky */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeStickyGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES #sec-regexp.prototype.test */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeTest, 1, kReceiver, kString) \
|
2018-06-11 10:44:15 +00:00
|
|
|
TFS(RegExpPrototypeTestFast, kReceiver, kString) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(RegExpPrototypeToString) \
|
|
|
|
/* ES #sec-get-regexp.prototype.unicode */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpPrototypeUnicodeGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(RegExpRightContextGetter) \
|
|
|
|
\
|
|
|
|
/* 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) \
|
[builtins] Reduce inlining in RegExp builtins
RegExp builtins were the first to be ported to CSA roughly two years
ago. Back then, we weren't really aware of issues surrounding code
size and CSA inlining, and thus some of these builtins were bigger
than they should be.
This CL adds a few new helper builtins and removes inlined calls to
SubString, RegExpExecInternal, and StringAdd. It significantly
reduces the size of affected builtins. Minor performance regressions
due to call overhead are expected.
Before:
TFS Builtin, RegExpReplace, 20008
TFS Builtin, RegExpSplit, 17340
TFS Builtin, RegExpMatchFast, 17064
TFJ Builtin, RegExpStringIteratorPrototypeNext, 12862
After:
TFS Builtin, RegExpReplace, 5067
TFS Builtin, RegExpSplit, 6329
TFS Builtin, RegExpMatchFast, 8164
TFJ Builtin, RegExpStringIteratorPrototypeNext, 6652
Bug: v8:5737
Change-Id: I1c077a084da85bb73c0c5adb7118b941f488e0ec
Reviewed-on: https://chromium-review.googlesource.com/1127796
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54293}
2018-07-06 11:01:25 +00:00
|
|
|
TFS(RegExpExecInternal, 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) \
|
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
|
|
|
\
|
2018-04-05 14:41:26 +00:00
|
|
|
/* RegExp String Iterator */ \
|
|
|
|
/* https://tc39.github.io/proposal-string-matchall/ */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(RegExpStringIteratorPrototypeNext, 0, kReceiver) \
|
2018-04-05 14:41:26 +00:00
|
|
|
\
|
2017-06-02 12:29:59 +00:00
|
|
|
/* Set */ \
|
2017-06-07 19:36:36 +00:00
|
|
|
TFJ(SetConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SetPrototypeHas, 1, kReceiver, kKey) \
|
|
|
|
TFJ(SetPrototypeAdd, 1, kReceiver, kKey) \
|
|
|
|
TFJ(SetPrototypeDelete, 1, kReceiver, kKey) \
|
2017-10-09 18:15:51 +00:00
|
|
|
CPP(SetPrototypeClear) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-set.prototype.entries */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SetPrototypeEntries, 0, kReceiver) \
|
2017-07-11 12:41:29 +00:00
|
|
|
/* ES #sec-get-set.prototype.size */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SetPrototypeGetSize, 0, kReceiver) \
|
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 */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SetPrototypeValues, 0, kReceiver) \
|
2017-07-06 10:39:28 +00:00
|
|
|
/* ES #sec-%setiteratorprototype%.next */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SetIteratorPrototypeNext, 0, kReceiver) \
|
2018-10-16 13:05:29 +00:00
|
|
|
TFS(SetOrSetIteratorToList, kSource) \
|
2017-06-02 12:29:59 +00:00
|
|
|
\
|
2017-03-29 09:56:08 +00:00
|
|
|
/* SharedArrayBuffer */ \
|
|
|
|
CPP(SharedArrayBufferPrototypeGetByteLength) \
|
|
|
|
CPP(SharedArrayBufferPrototypeSlice) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AtomicsLoad, 2, kReceiver, kArray, kIndex) \
|
|
|
|
TFJ(AtomicsStore, 3, kReceiver, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsExchange, 3, kReceiver, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsCompareExchange, 4, kReceiver, kArray, kIndex, kOldValue, \
|
|
|
|
kNewValue) \
|
|
|
|
TFJ(AtomicsAdd, 3, kReceiver, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsSub, 3, kReceiver, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsAnd, 3, kReceiver, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsOr, 3, kReceiver, kArray, kIndex, kValue) \
|
|
|
|
TFJ(AtomicsXor, 3, kReceiver, kArray, kIndex, kValue) \
|
2018-09-19 19:23:29 +00:00
|
|
|
CPP(AtomicsNotify) \
|
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) \
|
|
|
|
/* ES6 #sec-string.prototype.charat */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeCharAt, 1, kReceiver, kPosition) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.charcodeat */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeCharCodeAt, 1, kReceiver, kPosition) \
|
2017-07-19 17:56:58 +00:00
|
|
|
/* ES6 #sec-string.prototype.codepointat */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeCodePointAt, 1, kReceiver, kPosition) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.concat */ \
|
|
|
|
TFJ(StringPrototypeConcat, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* 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) \
|
|
|
|
/* ES6 #sec-string.prototype.lastindexof */ \
|
|
|
|
CPP(StringPrototypeLastIndexOf) \
|
2017-10-10 15:38:35 +00:00
|
|
|
/* ES6 #sec-string.prototype.match */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeMatch, 1, kReceiver, kRegexp) \
|
2018-04-05 14:41:26 +00:00
|
|
|
/* ES #sec-string.prototype.matchAll */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeMatchAll, 1, kReceiver, 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-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.replace */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeReplace, 2, kReceiver, kSearch, kReplace) \
|
2017-10-10 15:38:35 +00:00
|
|
|
/* ES6 #sec-string.prototype.search */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(StringPrototypeSearch, 1, kReceiver, kRegexp) \
|
2017-05-12 11:35:32 +00:00
|
|
|
/* ES6 #sec-string.prototype.slice */ \
|
|
|
|
TFJ(StringPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.split */ \
|
2017-06-08 14:29:09 +00:00
|
|
|
TFJ(StringPrototypeSplit, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-string.prototype.substr */ \
|
2017-06-08 14:29:09 +00:00
|
|
|
TFJ(StringPrototypeSubstr, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-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-10-19 12:55:32 +00:00
|
|
|
/* ES6 #sec-string.raw */ \
|
|
|
|
CPP(StringRaw) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* 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) \
|
2018-06-07 17:25:36 +00:00
|
|
|
/* ES #sec-symbol.prototype.description */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SymbolPrototypeDescriptionGetter, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-symbol.prototype-@@toprimitive */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SymbolPrototypeToPrimitive, 1, kReceiver, kHint) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-symbol.prototype.tostring */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SymbolPrototypeToString, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-symbol.prototype.valueof */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(SymbolPrototypeValueOf, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
\
|
|
|
|
/* TypedArray */ \
|
2018-03-15 19:30:51 +00:00
|
|
|
/* ES #sec-typedarray-constructors */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayBaseConstructor, 0, kReceiver) \
|
2018-07-23 09:31:33 +00:00
|
|
|
TFJ(GenericConstructorLazyDeoptContinuation, 1, kReceiver, kResult) \
|
2018-01-19 13:47:33 +00:00
|
|
|
TFJ(TypedArrayConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-03-29 09:56:08 +00:00
|
|
|
CPP(TypedArrayPrototypeBuffer) \
|
|
|
|
/* ES6 #sec-get-%typedarray%.prototype.bytelength */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeByteLength, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-get-%typedarray%.prototype.byteoffset */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeByteOffset, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-get-%typedarray%.prototype.length */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeLength, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.entries */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeEntries, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.keys */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeKeys, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.values */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeValues, 0, kReceiver) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* ES6 #sec-%typedarray%.prototype.copywithin */ \
|
|
|
|
CPP(TypedArrayPrototypeCopyWithin) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.fill */ \
|
|
|
|
CPP(TypedArrayPrototypeFill) \
|
|
|
|
/* ES7 #sec-%typedarray%.prototype.includes */ \
|
|
|
|
CPP(TypedArrayPrototypeIncludes) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.indexof */ \
|
|
|
|
CPP(TypedArrayPrototypeIndexOf) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.lastindexof */ \
|
|
|
|
CPP(TypedArrayPrototypeLastIndexOf) \
|
|
|
|
/* ES6 #sec-%typedarray%.prototype.reverse */ \
|
|
|
|
CPP(TypedArrayPrototypeReverse) \
|
2017-08-31 19:32:14 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.set */ \
|
2017-11-23 13:59:04 +00:00
|
|
|
TFJ(TypedArrayPrototypeSet, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2017-10-02 05:28:41 +00:00
|
|
|
/* ES6 #sec-get-%typedarray%.prototype-@@tostringtag */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(TypedArrayPrototypeToStringTag, 0, kReceiver) \
|
2017-05-17 15:27:37 +00:00
|
|
|
/* ES6 %TypedArray%.prototype.map */ \
|
|
|
|
TFJ(TypedArrayPrototypeMap, 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 */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(WasmCompileLazy, Dummy) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(WasmAllocateHeapNumber, AllocateHeapNumber) \
|
2019-03-09 00:50:42 +00:00
|
|
|
TFC(WasmAtomicNotify, WasmAtomicNotify) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(WasmI32AtomicWait, WasmI32AtomicWait) \
|
|
|
|
TFC(WasmI64AtomicWait, WasmI64AtomicWait) \
|
|
|
|
TFC(WasmCallJavaScript, CallTrampoline) \
|
|
|
|
TFC(WasmMemoryGrow, WasmMemoryGrow) \
|
2019-03-18 10:26:12 +00:00
|
|
|
TFC(WasmTableGet, WasmTableGet) \
|
|
|
|
TFC(WasmTableSet, WasmTableSet) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(WasmRecordWrite, RecordWrite) \
|
|
|
|
TFC(WasmStackGuard, NoContext) \
|
|
|
|
TFC(WasmStackOverflow, NoContext) \
|
|
|
|
TFC(WasmToNumber, TypeConversion) \
|
|
|
|
TFC(WasmThrow, WasmThrow) \
|
2019-05-08 11:29:40 +00:00
|
|
|
TFC(WasmRethrow, WasmThrow) \
|
2018-06-13 12:14:54 +00:00
|
|
|
TFS(ThrowWasmTrapUnreachable) \
|
|
|
|
TFS(ThrowWasmTrapMemOutOfBounds) \
|
2018-09-05 21:55:41 +00:00
|
|
|
TFS(ThrowWasmTrapUnalignedAccess) \
|
2018-06-13 12:14:54 +00:00
|
|
|
TFS(ThrowWasmTrapDivByZero) \
|
|
|
|
TFS(ThrowWasmTrapDivUnrepresentable) \
|
|
|
|
TFS(ThrowWasmTrapRemByZero) \
|
|
|
|
TFS(ThrowWasmTrapFloatUnrepresentable) \
|
|
|
|
TFS(ThrowWasmTrapFuncInvalid) \
|
|
|
|
TFS(ThrowWasmTrapFuncSigMismatch) \
|
2018-12-12 02:18:54 +00:00
|
|
|
TFS(ThrowWasmTrapDataSegmentDropped) \
|
2019-01-14 16:49:07 +00:00
|
|
|
TFS(ThrowWasmTrapElemSegmentDropped) \
|
2019-01-16 15:52:15 +00:00
|
|
|
TFS(ThrowWasmTrapTableOutOfBounds) \
|
2019-03-20 10:53:44 +00:00
|
|
|
TFC(WasmI64ToBigInt, I64ToBigInt) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(WasmBigIntToI64, BigIntToI64) \
|
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) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(WeakMapGet, 1, kReceiver, kKey) \
|
2019-03-07 00:27:04 +00:00
|
|
|
TFJ(WeakMapPrototypeHas, 1, kReceiver, kKey) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(WeakMapPrototypeSet, 2, kReceiver, kKey, kValue) \
|
|
|
|
TFJ(WeakMapPrototypeDelete, 1, kReceiver, 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) \
|
2019-03-07 00:27:04 +00:00
|
|
|
TFJ(WeakSetPrototypeHas, 1, kReceiver, kKey) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(WeakSetPrototypeAdd, 1, kReceiver, kValue) \
|
|
|
|
TFJ(WeakSetPrototypeDelete, 1, kReceiver, 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 */ \
|
|
|
|
\
|
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
|
|
|
\
|
2018-05-14 08:55:07 +00:00
|
|
|
/* Await (proposal-async-iteration/#await), with resume behaviour */ \
|
|
|
|
/* specific to Async Generators. Internal / Not exposed to JS code. */ \
|
2018-10-11 08:35:56 +00:00
|
|
|
TFS(AsyncGeneratorAwaitCaught, kAsyncGeneratorObject, kValue) \
|
|
|
|
TFS(AsyncGeneratorAwaitUncaught, kAsyncGeneratorObject, kValue) \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AsyncGeneratorAwaitResolveClosure, 1, kReceiver, kValue) \
|
|
|
|
TFJ(AsyncGeneratorAwaitRejectClosure, 1, kReceiver, kValue) \
|
|
|
|
TFJ(AsyncGeneratorYieldResolveClosure, 1, kReceiver, kValue) \
|
|
|
|
TFJ(AsyncGeneratorReturnClosedResolveClosure, 1, kReceiver, kValue) \
|
|
|
|
TFJ(AsyncGeneratorReturnClosedRejectClosure, 1, kReceiver, kValue) \
|
|
|
|
TFJ(AsyncGeneratorReturnResolveClosure, 1, kReceiver, kValue) \
|
2018-05-14 08:55:07 +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) */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kReceiver, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* #sec-%asyncfromsynciteratorprototype%.throw */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReceiver, kReason) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* #sec-%asyncfromsynciteratorprototype%.return */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kReceiver, kValue) \
|
2017-03-29 09:56:08 +00:00
|
|
|
/* #sec-async-iterator-value-unwrap-functions */ \
|
2018-06-18 16:35:56 +00:00
|
|
|
TFJ(AsyncIteratorValueUnwrap, 1, kReceiver, kValue) \
|
2018-04-13 11:21:09 +00:00
|
|
|
\
|
2018-05-07 14:09:04 +00:00
|
|
|
/* CEntry */ \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return1_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return1_SaveFPRegs_ArgvOnStack_NoBuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return1_SaveFPRegs_ArgvOnStack_BuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return2_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return2_DontSaveFPRegs_ArgvOnStack_BuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return2_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return2_SaveFPRegs_ArgvOnStack_NoBuiltinExit, Dummy) \
|
|
|
|
ASM(CEntry_Return2_SaveFPRegs_ArgvOnStack_BuiltinExit, Dummy) \
|
|
|
|
ASM(DirectCEntry, Dummy) \
|
2018-05-07 14:09:04 +00:00
|
|
|
\
|
[builtins] Reduce inlining in RegExp builtins
RegExp builtins were the first to be ported to CSA roughly two years
ago. Back then, we weren't really aware of issues surrounding code
size and CSA inlining, and thus some of these builtins were bigger
than they should be.
This CL adds a few new helper builtins and removes inlined calls to
SubString, RegExpExecInternal, and StringAdd. It significantly
reduces the size of affected builtins. Minor performance regressions
due to call overhead are expected.
Before:
TFS Builtin, RegExpReplace, 20008
TFS Builtin, RegExpSplit, 17340
TFS Builtin, RegExpMatchFast, 17064
TFJ Builtin, RegExpStringIteratorPrototypeNext, 12862
After:
TFS Builtin, RegExpReplace, 5067
TFS Builtin, RegExpSplit, 6329
TFS Builtin, RegExpMatchFast, 8164
TFJ Builtin, RegExpStringIteratorPrototypeNext, 6652
Bug: v8:5737
Change-Id: I1c077a084da85bb73c0c5adb7118b941f488e0ec
Reviewed-on: https://chromium-review.googlesource.com/1127796
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54293}
2018-07-06 11:01:25 +00:00
|
|
|
/* String helpers */ \
|
2018-09-12 18:00:13 +00:00
|
|
|
TFS(StringAdd_CheckNone, kLeft, kRight) \
|
|
|
|
TFS(StringAdd_ConvertLeft, kLeft, kRight) \
|
|
|
|
TFS(StringAdd_ConvertRight, kLeft, kRight) \
|
[builtins] Reduce inlining in RegExp builtins
RegExp builtins were the first to be ported to CSA roughly two years
ago. Back then, we weren't really aware of issues surrounding code
size and CSA inlining, and thus some of these builtins were bigger
than they should be.
This CL adds a few new helper builtins and removes inlined calls to
SubString, RegExpExecInternal, and StringAdd. It significantly
reduces the size of affected builtins. Minor performance regressions
due to call overhead are expected.
Before:
TFS Builtin, RegExpReplace, 20008
TFS Builtin, RegExpSplit, 17340
TFS Builtin, RegExpMatchFast, 17064
TFJ Builtin, RegExpStringIteratorPrototypeNext, 12862
After:
TFS Builtin, RegExpReplace, 5067
TFS Builtin, RegExpSplit, 6329
TFS Builtin, RegExpMatchFast, 8164
TFJ Builtin, RegExpStringIteratorPrototypeNext, 6652
Bug: v8:5737
Change-Id: I1c077a084da85bb73c0c5adb7118b941f488e0ec
Reviewed-on: https://chromium-review.googlesource.com/1127796
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54293}
2018-07-06 11:01:25 +00:00
|
|
|
TFS(SubString, kString, kFrom, kTo) \
|
2018-04-13 11:21:09 +00:00
|
|
|
\
|
2018-05-07 14:09:04 +00:00
|
|
|
/* Miscellaneous */ \
|
2019-02-06 11:21:49 +00:00
|
|
|
ASM(StackCheck, Dummy) \
|
2018-12-13 10:50:31 +00:00
|
|
|
ASM(DoubleToI, Dummy) \
|
2019-02-28 19:32:51 +00:00
|
|
|
TFC(GetProperty, GetProperty) \
|
2018-08-06 12:36:45 +00:00
|
|
|
TFS(SetProperty, kReceiver, kKey, kValue) \
|
[builtins] put SetPropertyInLiteral in a code-stub
There are several core changes in this stub:
1) add a version of KeyedStoreGenericGenerator::SetPropertyInLiteral()
which supports indexed properties directly, witthout KeyedStore
2) add a code stub for SetPropertyInLiteral which uses the version
supporting indexed properties
3) Use the code stub in CloneObjectIC, rather than using the smaller
special-cased version which does not handle Names.
Item 1) involves a refactoring which adds a nice way to reuse code in
KeyedStoreGenericAssembler, which allows deleting a bunch of copy/pasted
code. This makes it easy to reuse the index handling in
KeyedStoreGeneric() without adding adding a bunch more duplicated
handling. Because of this, I consider this to be somewhat of a cleanup,
though if the copied code is preferred, I'm happy to revert to that.
Item 2) is needed for Object.fromEntries(), as it's better to not
require falling back to the slow path if a key happens to be an Smi ---
but this is also optional.
Item 3) benefits the codebase by allowing Object.fromEntries() to use
this fast path without calling into the runtime, and without duplicating
code which is also used by CloneObjectIC.
I am skeptical that this should affect performance significantly. I've
run ObjectLiteralSpread tests, and the mean of scores over 100 runs is
somewhat surprising: CloneObjectIC --- the only user of this code,
has an increased average score, while the polyfill cases score slightly
worse --- However, the overall changes are small and likely flukes.
The complete processed test output is below:
```
// Mean of 100 runs of each benchmark
Babel-ObjectLiteralSpread:
-----+---------------------------+---------------------------+-------
| With patch | Without patch | diff
Mean | 11530.87 | 12142.92 | -5.04%
-----+---------------------------+---------------------------+-------
BabelAndOverwrite-ObjectLiteralSpread:
-----+---------------------------+---------------------------+-------
| With patch | Without patch | diff
Mean | 10881.41 | 11260.81 | -3.37%
-----+---------------------------+---------------------------+-------
ObjectAssign-ObjectLiteralSpread:
-----+---------------------------+---------------------------+-------
| With patch | Without patch | diff
Mean | 6188.92 | 6358.55 | -2.67%
-----+---------------------------+---------------------------+-------
ObjectAssignAndOverwrite-ObjectLiteralSpread:
-----+---------------------------+---------------------------+-------
| With patch | Without patch | diff
Mean | 6112.80 | 6275.54 | -1.61%
-----+---------------------------+---------------------------+-------
ObjectSpread-ObjectLiteralSpread:
-----+---------------------------+---------------------------+-------
| With patch | Without patch | diff
Mean | 51942.93 | 50713.17 | +3.46%
-----+---------------------------+---------------------------+-------
ObjectSpreadAndOverwrite-ObjectLiteralSpread:
-----+---------------------------+---------------------------+-------
| With patch | Without patch | diff
Mean | 51375.23 | 50833.29 | +2.09%
-----+---------------------------+---------------------------+-------
```
BUG=v8:8238, v8:8021
R=ishell@chromium.org, jkummerow@chromium.org
Change-Id: I43e102fc461ffd389b5d6810a73f86e5012d7dee
Reviewed-on: https://chromium-review.googlesource.com/c/1277751
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56957}
2018-10-24 15:00:01 +00:00
|
|
|
TFS(SetPropertyInLiteral, kReceiver, kKey, kValue) \
|
2019-01-14 15:00:02 +00:00
|
|
|
ASM(MemCopyUint8Uint8, CCall) \
|
|
|
|
ASM(MemCopyUint16Uint8, CCall) \
|
|
|
|
ASM(MemMove, CCall) \
|
2018-07-18 18:08:21 +00:00
|
|
|
\
|
|
|
|
/* Trace */ \
|
|
|
|
CPP(IsTraceCategoryEnabled) \
|
2018-10-09 12:08:23 +00:00
|
|
|
CPP(Trace) \
|
|
|
|
\
|
|
|
|
/* Weak refs */ \
|
2019-01-30 12:06:32 +00:00
|
|
|
CPP(FinalizationGroupCleanupIteratorNext) \
|
|
|
|
CPP(FinalizationGroupCleanupSome) \
|
|
|
|
CPP(FinalizationGroupConstructor) \
|
|
|
|
CPP(FinalizationGroupRegister) \
|
|
|
|
CPP(FinalizationGroupUnregister) \
|
2018-12-17 08:15:02 +00:00
|
|
|
CPP(WeakRefConstructor) \
|
2018-11-05 14:21:02 +00:00
|
|
|
CPP(WeakRefDeref)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
2017-04-21 08:35:12 +00:00
|
|
|
#ifdef V8_INTL_SUPPORT
|
2018-08-20 10:41:54 +00:00
|
|
|
#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
|
2018-08-08 09:23:07 +00:00
|
|
|
/* ecma402 #sec-intl.collator */ \
|
|
|
|
CPP(CollatorConstructor) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma 402 #sec-collator-compare-functions*/ \
|
|
|
|
CPP(CollatorInternalCompare) \
|
|
|
|
/* ecma402 #sec-intl.collator.prototype.compare */ \
|
|
|
|
CPP(CollatorPrototypeCompare) \
|
2018-08-27 16:52:31 +00:00
|
|
|
/* ecma402 #sec-intl.collator.supportedlocalesof */ \
|
|
|
|
CPP(CollatorSupportedLocalesOf) \
|
2018-09-10 21:20:14 +00:00
|
|
|
CPP(CollatorPrototypeResolvedOptions) \
|
2018-08-30 20:23:15 +00:00
|
|
|
/* ecma402 #sup-date.prototype.tolocaledatestring */ \
|
|
|
|
CPP(DatePrototypeToLocaleDateString) \
|
|
|
|
/* ecma402 #sup-date.prototype.tolocalestring */ \
|
|
|
|
CPP(DatePrototypeToLocaleString) \
|
|
|
|
/* ecma402 #sup-date.prototype.tolocaletimestring */ \
|
|
|
|
CPP(DatePrototypeToLocaleTimeString) \
|
2018-09-11 09:57:14 +00:00
|
|
|
/* ecma402 #sec-intl.datetimeformat */ \
|
|
|
|
CPP(DateTimeFormatConstructor) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-datetime-format-functions */ \
|
|
|
|
CPP(DateTimeFormatInternalFormat) \
|
|
|
|
/* ecma402 #sec-intl.datetimeformat.prototype.format */ \
|
|
|
|
CPP(DateTimeFormatPrototypeFormat) \
|
2019-03-22 01:20:33 +00:00
|
|
|
/* ecma402 #sec-intl.datetimeformat.prototype.formatrange */ \
|
|
|
|
CPP(DateTimeFormatPrototypeFormatRange) \
|
|
|
|
/* ecma402 #sec-intl.datetimeformat.prototype.formatrangetoparts */ \
|
|
|
|
CPP(DateTimeFormatPrototypeFormatRangeToParts) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-intl.datetimeformat.prototype.formattoparts */ \
|
|
|
|
CPP(DateTimeFormatPrototypeFormatToParts) \
|
2018-09-24 17:50:39 +00:00
|
|
|
/* ecma402 #sec-intl.datetimeformat.prototype.resolvedoptions */ \
|
|
|
|
CPP(DateTimeFormatPrototypeResolvedOptions) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-intl.datetimeformat.supportedlocalesof */ \
|
|
|
|
CPP(DateTimeFormatSupportedLocalesOf) \
|
2018-10-18 18:29:51 +00:00
|
|
|
/* ecma402 #sec-intl.getcanonicallocales */ \
|
|
|
|
CPP(IntlGetCanonicalLocales) \
|
2018-07-18 17:43:29 +00:00
|
|
|
/* ecma402 #sec-intl-listformat-constructor */ \
|
2018-07-24 21:07:50 +00:00
|
|
|
CPP(ListFormatConstructor) \
|
2018-08-08 23:04:11 +00:00
|
|
|
/* ecma402 #sec-intl-list-format.prototype.format */ \
|
|
|
|
TFJ(ListFormatPrototypeFormat, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
|
|
|
/* ecma402 #sec-intl-list-format.prototype.formattoparts */ \
|
|
|
|
TFJ(ListFormatPrototypeFormatToParts, \
|
|
|
|
SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-intl.listformat.prototype.resolvedoptions */ \
|
|
|
|
CPP(ListFormatPrototypeResolvedOptions) \
|
2018-08-29 16:30:33 +00:00
|
|
|
/* ecma402 #sec-intl.ListFormat.supportedlocalesof */ \
|
|
|
|
CPP(ListFormatSupportedLocalesOf) \
|
2018-07-10 12:28:44 +00:00
|
|
|
/* ecma402 #sec-intl-locale-constructor */ \
|
|
|
|
CPP(LocaleConstructor) \
|
|
|
|
CPP(LocalePrototypeBaseName) \
|
|
|
|
CPP(LocalePrototypeCalendar) \
|
|
|
|
CPP(LocalePrototypeCaseFirst) \
|
|
|
|
CPP(LocalePrototypeCollation) \
|
|
|
|
CPP(LocalePrototypeHourCycle) \
|
2018-09-05 19:35:15 +00:00
|
|
|
CPP(LocalePrototypeLanguage) \
|
2018-07-17 21:36:37 +00:00
|
|
|
/* ecma402 #sec-Intl.Locale.prototype.maximize */ \
|
|
|
|
CPP(LocalePrototypeMaximize) \
|
|
|
|
/* ecma402 #sec-Intl.Locale.prototype.minimize */ \
|
|
|
|
CPP(LocalePrototypeMinimize) \
|
2018-09-05 19:35:15 +00:00
|
|
|
CPP(LocalePrototypeNumeric) \
|
|
|
|
CPP(LocalePrototypeNumberingSystem) \
|
|
|
|
CPP(LocalePrototypeRegion) \
|
|
|
|
CPP(LocalePrototypeScript) \
|
|
|
|
CPP(LocalePrototypeToString) \
|
|
|
|
/* ecma402 #sec-intl.numberformat */ \
|
|
|
|
CPP(NumberFormatConstructor) \
|
2018-07-10 12:28:44 +00:00
|
|
|
/* ecma402 #sec-number-format-functions */ \
|
|
|
|
CPP(NumberFormatInternalFormatNumber) \
|
|
|
|
/* ecma402 #sec-intl.numberformat.prototype.format */ \
|
|
|
|
CPP(NumberFormatPrototypeFormatNumber) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-intl.numberformat.prototype.formattoparts */ \
|
|
|
|
CPP(NumberFormatPrototypeFormatToParts) \
|
2018-09-11 19:14:49 +00:00
|
|
|
/* ecma402 #sec-intl.numberformat.prototype.resolvedoptions */ \
|
|
|
|
CPP(NumberFormatPrototypeResolvedOptions) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-intl.numberformat.supportedlocalesof */ \
|
|
|
|
CPP(NumberFormatSupportedLocalesOf) \
|
2018-08-06 09:31:26 +00:00
|
|
|
/* ecma402 #sec-intl.pluralrules */ \
|
|
|
|
CPP(PluralRulesConstructor) \
|
2018-09-05 20:05:32 +00:00
|
|
|
CPP(PluralRulesPrototypeResolvedOptions) \
|
2018-09-12 22:55:01 +00:00
|
|
|
/* ecma402 #sec-intl.pluralrules.prototype.select */ \
|
|
|
|
CPP(PluralRulesPrototypeSelect) \
|
2018-08-27 16:52:31 +00:00
|
|
|
/* ecma402 #sec-intl.pluralrules.supportedlocalesof */ \
|
|
|
|
CPP(PluralRulesSupportedLocalesOf) \
|
2018-07-17 20:19:17 +00:00
|
|
|
/* ecma402 #sec-intl.RelativeTimeFormat.constructor */ \
|
2018-07-10 12:28:44 +00:00
|
|
|
CPP(RelativeTimeFormatConstructor) \
|
2018-07-17 20:19:17 +00:00
|
|
|
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.format */ \
|
|
|
|
CPP(RelativeTimeFormatPrototypeFormat) \
|
|
|
|
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.formatToParts */ \
|
2018-07-26 22:08:25 +00:00
|
|
|
CPP(RelativeTimeFormatPrototypeFormatToParts) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.resolvedOptions */ \
|
|
|
|
CPP(RelativeTimeFormatPrototypeResolvedOptions) \
|
|
|
|
/* ecma402 #sec-intl.RelativeTimeFormat.supportedlocalesof */ \
|
|
|
|
CPP(RelativeTimeFormatSupportedLocalesOf) \
|
2018-10-18 07:59:28 +00:00
|
|
|
/* ecma402 #sec-Intl.Segmenter */ \
|
|
|
|
CPP(SegmenterConstructor) \
|
|
|
|
/* ecma402 #sec-Intl.Segmenter.prototype.resolvedOptions */ \
|
|
|
|
CPP(SegmenterPrototypeResolvedOptions) \
|
|
|
|
/* ecma402 #sec-Intl.Segmenter.prototype.segment */ \
|
|
|
|
CPP(SegmenterPrototypeSegment) \
|
|
|
|
/* ecma402 #sec-Intl.Segmenter.supportedLocalesOf */ \
|
|
|
|
CPP(SegmenterSupportedLocalesOf) \
|
|
|
|
/* ecma402 #sec-segment-iterator-prototype-breakType */ \
|
|
|
|
CPP(SegmentIteratorPrototypeBreakType) \
|
|
|
|
/* ecma402 #sec-segment-iterator-prototype-following */ \
|
|
|
|
CPP(SegmentIteratorPrototypeFollowing) \
|
|
|
|
/* ecma402 #sec-segment-iterator-prototype-preceding */ \
|
|
|
|
CPP(SegmentIteratorPrototypePreceding) \
|
2018-12-17 23:09:06 +00:00
|
|
|
/* ecma402 #sec-segment-iterator-prototype-index */ \
|
|
|
|
CPP(SegmentIteratorPrototypeIndex) \
|
2018-10-18 07:59:28 +00:00
|
|
|
/* ecma402 #sec-segment-iterator-prototype-next */ \
|
|
|
|
CPP(SegmentIteratorPrototypeNext) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ES #sec-string.prototype.normalize */ \
|
|
|
|
CPP(StringPrototypeNormalizeIntl) \
|
2018-07-26 22:08:25 +00:00
|
|
|
/* ecma402 #sup-string.prototype.tolocalelowercase */ \
|
|
|
|
CPP(StringPrototypeToLocaleLowerCase) \
|
|
|
|
/* ecma402 #sup-string.prototype.tolocaleuppercase */ \
|
2018-08-14 16:19:36 +00:00
|
|
|
CPP(StringPrototypeToLocaleUpperCase) \
|
2018-09-05 19:35:15 +00:00
|
|
|
/* ES #sec-string.prototype.tolowercase */ \
|
|
|
|
TFJ(StringPrototypeToLowerCaseIntl, 0, kReceiver) \
|
|
|
|
/* ES #sec-string.prototype.touppercase */ \
|
|
|
|
CPP(StringPrototypeToUpperCaseIntl) \
|
|
|
|
TFS(StringToLowerCaseIntl, kString) \
|
|
|
|
CPP(V8BreakIteratorConstructor) \
|
2018-09-05 16:25:38 +00:00
|
|
|
CPP(V8BreakIteratorInternalAdoptText) \
|
2018-09-05 19:35:15 +00:00
|
|
|
CPP(V8BreakIteratorInternalBreakType) \
|
|
|
|
CPP(V8BreakIteratorInternalCurrent) \
|
2018-09-05 16:25:38 +00:00
|
|
|
CPP(V8BreakIteratorInternalFirst) \
|
|
|
|
CPP(V8BreakIteratorInternalNext) \
|
2018-09-05 19:35:15 +00:00
|
|
|
CPP(V8BreakIteratorPrototypeAdoptText) \
|
2018-09-05 16:25:38 +00:00
|
|
|
CPP(V8BreakIteratorPrototypeBreakType) \
|
2018-09-05 19:35:15 +00:00
|
|
|
CPP(V8BreakIteratorPrototypeCurrent) \
|
|
|
|
CPP(V8BreakIteratorPrototypeFirst) \
|
|
|
|
CPP(V8BreakIteratorPrototypeNext) \
|
|
|
|
CPP(V8BreakIteratorPrototypeResolvedOptions) \
|
|
|
|
CPP(V8BreakIteratorSupportedLocalesOf)
|
2017-03-29 09:56:08 +00:00
|
|
|
#else
|
2018-08-20 10:41:54 +00:00
|
|
|
#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
|
|
|
|
/* 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 */ \
|
|
|
|
CPP(StringPrototypeToUpperCase)
|
|
|
|
#endif // V8_INTL_SUPPORT
|
|
|
|
|
2019-05-14 13:52:00 +00:00
|
|
|
#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, BCH, ASM) \
|
|
|
|
BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
|
|
|
BUILTIN_LIST_FROM_TORQUE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
|
|
|
|
BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
|
2018-08-20 18:58:38 +00:00
|
|
|
BUILTIN_LIST_BYTECODE_HANDLERS(BCH)
|
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) \
|
2018-05-14 08:55:07 +00:00
|
|
|
V(AsyncFunctionAwaitCaught) \
|
|
|
|
V(AsyncFunctionAwaitUncaught) \
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
V(AsyncGeneratorResolve) \
|
2018-05-14 08:55:07 +00:00
|
|
|
V(AsyncGeneratorAwaitCaught) \
|
|
|
|
V(AsyncGeneratorAwaitUncaught) \
|
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-04-04 06:31:33 +00:00
|
|
|
V(PromiseConstructorLazyDeoptContinuation) \
|
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)
|
|
|
|
|
2018-08-22 09:14:23 +00:00
|
|
|
// Convenience macro listing all wasm runtime stubs. Note that the first few
|
|
|
|
// elements of the list coincide with {compiler::TrapId}, order matters.
|
|
|
|
#define WASM_RUNTIME_STUB_LIST(V, VTRAP) \
|
|
|
|
FOREACH_WASM_TRAPREASON(VTRAP) \
|
2019-03-20 10:21:09 +00:00
|
|
|
V(WasmCompileLazy) \
|
2018-08-22 09:14:23 +00:00
|
|
|
V(WasmAllocateHeapNumber) \
|
2019-03-09 00:50:42 +00:00
|
|
|
V(WasmAtomicNotify) \
|
2018-11-20 01:08:30 +00:00
|
|
|
V(WasmI32AtomicWait) \
|
2018-11-30 01:03:35 +00:00
|
|
|
V(WasmI64AtomicWait) \
|
2018-08-22 09:14:23 +00:00
|
|
|
V(WasmCallJavaScript) \
|
2018-10-26 17:28:37 +00:00
|
|
|
V(WasmMemoryGrow) \
|
2019-03-18 10:26:12 +00:00
|
|
|
V(WasmTableGet) \
|
|
|
|
V(WasmTableSet) \
|
2018-10-25 14:52:29 +00:00
|
|
|
V(WasmRecordWrite) \
|
2018-08-22 09:14:23 +00:00
|
|
|
V(WasmStackGuard) \
|
2019-02-22 09:25:13 +00:00
|
|
|
V(WasmStackOverflow) \
|
2018-08-22 09:14:23 +00:00
|
|
|
V(WasmToNumber) \
|
2018-09-25 13:44:25 +00:00
|
|
|
V(WasmThrow) \
|
2019-05-08 11:29:40 +00:00
|
|
|
V(WasmRethrow) \
|
2018-12-07 19:50:26 +00:00
|
|
|
V(DoubleToI) \
|
2019-03-20 10:53:44 +00:00
|
|
|
V(WasmI64ToBigInt) \
|
2019-01-10 14:13:13 +00:00
|
|
|
V(WasmBigIntToI64)
|
2018-08-22 09:14:23 +00:00
|
|
|
|
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(...)
|
|
|
|
|
|
|
|
#define BUILTIN_LIST_C(V) \
|
|
|
|
BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
2018-10-26 16:03:17 +00:00
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
|
|
|
#define BUILTIN_LIST_A(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
|
2018-10-26 16:03:17 +00:00
|
|
|
IGNORE_BUILTIN, 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, \
|
2018-10-26 16:03:17 +00:00
|
|
|
V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-03-29 09:56:08 +00:00
|
|
|
|
2018-10-26 16:03:17 +00:00
|
|
|
#define BUILTIN_LIST_TFJ(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, V, IGNORE_BUILTIN, \
|
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-06-07 13:23:33 +00:00
|
|
|
|
2018-10-26 16:03:17 +00:00
|
|
|
#define BUILTIN_LIST_TFC(V) \
|
|
|
|
BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V, \
|
|
|
|
IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
|
2017-06-07 13:23:33 +00:00
|
|
|
|
2017-03-29 09:56:08 +00:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|
|
|
|
|
|
|
|
#endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_
|