[Ignition] Rename New and NewWithSpread bytecodes.

Rename to Construct and ConstructWithSpread, to match the names of
the JSOperators used.

Unfortunately, I can't find a way for auto-formatting to stay happy unless we
change the indentation for the whole BYTECODE_LIST macro.

Review-Url: https://codereview.chromium.org/2663963003
Cr-Commit-Position: refs/heads/master@{#42840}
This commit is contained in:
petermarshall 2017-02-01 01:04:04 -08:00 committed by Commit bot
parent 44cac16f48
commit a7ba61fdb5
16 changed files with 343 additions and 341 deletions

View File

@ -1352,7 +1352,7 @@ void BytecodeGraphBuilder::VisitCallRuntimeForPair() {
Environment::kAttachFrameState);
}
Node* BytecodeGraphBuilder::ProcessCallNewWithSpreadArguments(
Node* BytecodeGraphBuilder::ProcessConstructWithSpreadArguments(
const Operator* op, Node* callee, Node* new_target,
interpreter::Register first_arg, size_t arity) {
Node** all = local_zone()->NewArray<Node*>(arity);
@ -1367,7 +1367,7 @@ Node* BytecodeGraphBuilder::ProcessCallNewWithSpreadArguments(
return value;
}
void BytecodeGraphBuilder::VisitNewWithSpread() {
void BytecodeGraphBuilder::VisitConstructWithSpread() {
PrepareEagerCheckpoint();
interpreter::Register callee_reg = bytecode_iterator().GetRegisterOperand(0);
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
@ -1378,8 +1378,8 @@ void BytecodeGraphBuilder::VisitNewWithSpread() {
const Operator* op =
javascript()->ConstructWithSpread(static_cast<int>(arg_count) + 2);
Node* value = ProcessCallNewWithSpreadArguments(op, callee, new_target,
first_arg, arg_count + 2);
Node* value = ProcessConstructWithSpreadArguments(op, callee, new_target,
first_arg, arg_count + 2);
environment()->BindAccumulator(value, Environment::kAttachFrameState);
}
@ -1396,7 +1396,7 @@ void BytecodeGraphBuilder::VisitInvokeIntrinsic() {
environment()->BindAccumulator(value, Environment::kAttachFrameState);
}
Node* BytecodeGraphBuilder::ProcessCallNewArguments(
Node* BytecodeGraphBuilder::ProcessConstructArguments(
const Operator* call_new_op, Node* callee, Node* new_target,
interpreter::Register first_arg, size_t arity) {
Node** all = local_zone()->NewArray<Node*>(arity);
@ -1411,7 +1411,7 @@ Node* BytecodeGraphBuilder::ProcessCallNewArguments(
return value;
}
void BytecodeGraphBuilder::VisitNew() {
void BytecodeGraphBuilder::VisitConstruct() {
PrepareEagerCheckpoint();
interpreter::Register callee_reg = bytecode_iterator().GetRegisterOperand(0);
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
@ -1428,8 +1428,8 @@ void BytecodeGraphBuilder::VisitNew() {
float const frequency = ComputeCallFrequency(slot_id);
const Operator* call = javascript()->Construct(
static_cast<int>(arg_count) + 2, frequency, feedback);
Node* value = ProcessCallNewArguments(call, callee, new_target, first_arg,
arg_count + 2);
Node* value = ProcessConstructArguments(call, callee, new_target, first_arg,
arg_count + 2);
environment()->BindAccumulator(value, Environment::kAttachFrameState);
}

View File

@ -111,13 +111,14 @@ class BytecodeGraphBuilder {
Node* ProcessCallArguments(const Operator* call_op, Node* callee,
interpreter::Register receiver, size_t arity);
Node* ProcessCallNewArguments(const Operator* call_new_op, Node* callee,
Node* new_target,
interpreter::Register first_arg, size_t arity);
Node* ProcessCallNewWithSpreadArguments(const Operator* op, Node* callee,
Node* new_target,
interpreter::Register first_arg,
size_t arity);
Node* ProcessConstructArguments(const Operator* call_new_op, Node* callee,
Node* new_target,
interpreter::Register first_arg,
size_t arity);
Node* ProcessConstructWithSpreadArguments(const Operator* op, Node* callee,
Node* new_target,
interpreter::Register first_arg,
size_t arity);
Node* ProcessCallRuntimeArguments(const Operator* call_runtime_op,
interpreter::Register first_arg,
size_t arity);

View File

@ -306,7 +306,7 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
typedef interpreter::Bytecode Bytecode;
typedef interpreter::Bytecodes Bytecodes;
if (Bytecodes::IsWithoutExternalSideEffects(bytecode)) return true;
if (Bytecodes::IsCallOrNew(bytecode)) return true;
if (Bytecodes::IsCallOrConstruct(bytecode)) return true;
if (Bytecodes::WritesBooleanToAccumulator(bytecode)) return true;
if (Bytecodes::IsJumpIfToBoolean(bytecode)) return true;
if (Bytecodes::IsPrefixScalingBytecode(bytecode)) return true;

View File

@ -328,7 +328,7 @@ DebugBreakType BytecodeArrayBreakIterator::GetDebugBreakType() {
return isolate()->is_tail_call_elimination_enabled()
? DEBUG_BREAK_SLOT_AT_TAIL_CALL
: DEBUG_BREAK_SLOT_AT_CALL;
} else if (interpreter::Bytecodes::IsCallOrNew(bytecode)) {
} else if (interpreter::Bytecodes::IsCallOrConstruct(bytecode)) {
return DEBUG_BREAK_SLOT_AT_CALL;
} else if (source_position_iterator_.is_statement()) {
return DEBUG_BREAK_SLOT;

View File

@ -905,10 +905,16 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallWithSpread(Register callable,
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
RegisterList args,
int feedback_slot_id) {
OutputNew(constructor, args, args.register_count(), feedback_slot_id);
BytecodeArrayBuilder& BytecodeArrayBuilder::Construct(Register constructor,
RegisterList args,
int feedback_slot_id) {
OutputConstruct(constructor, args, args.register_count(), feedback_slot_id);
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::ConstructWithSpread(
Register constructor, RegisterList args) {
OutputConstructWithSpread(constructor, args, args.register_count());
return *this;
}
@ -961,12 +967,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index,
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::NewWithSpread(Register constructor,
RegisterList args) {
OutputNewWithSpread(constructor, args, args.register_count());
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::Delete(Register object,
LanguageMode language_mode) {
if (language_mode == SLOPPY) {

View File

@ -218,15 +218,16 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final
// onwards. The final argument must be a spread.
BytecodeArrayBuilder& CallWithSpread(Register callable, RegisterList args);
// Call the new operator. The accumulator holds the |new_target|.
// Call the Construct operator. The accumulator holds the |new_target|.
// The |constructor| is in a register and arguments are in |args|.
BytecodeArrayBuilder& New(Register constructor, RegisterList args,
int feedback_slot);
BytecodeArrayBuilder& Construct(Register constructor, RegisterList args,
int feedback_slot);
// Call the new operator for use with a spread. The accumulator holds the
// |new_target|. The |constructor| is in a register and arguments are in
// Call the Construct operator for use with a spread. The accumulator holds
// the |new_target|. The |constructor| is in a register and arguments are in
// |args|. The final argument must be a spread.
BytecodeArrayBuilder& NewWithSpread(Register constructor, RegisterList args);
BytecodeArrayBuilder& ConstructWithSpread(Register constructor,
RegisterList args);
// Call the runtime function with |function_id| and arguments |args|.
BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id,

View File

@ -2606,7 +2606,7 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
// if there is exactly one spread, and it is the last argument.
if (expr->only_last_arg_is_spread()) {
// TODO(petermarshall): Collect type on the feedback slot.
builder()->NewWithSpread(constructor, args_regs);
builder()->ConstructWithSpread(constructor, args_regs);
} else {
// Call construct.
// TODO(turbofan): For now we do gather feedback on super constructor
@ -2616,7 +2616,7 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
// the job done for now. In the long run we might want to revisit this
// and come up with a better way.
int const feedback_slot_index = feedback_index(expr->CallFeedbackICSlot());
builder()->New(constructor, args_regs, feedback_slot_index);
builder()->Construct(constructor, args_regs, feedback_slot_index);
}
}
@ -2632,10 +2632,10 @@ void BytecodeGenerator::VisitCallNew(CallNew* expr) {
if (expr->only_last_arg_is_spread()) {
// TODO(petermarshall): Collect type on the feedback slot.
builder()->NewWithSpread(constructor, args);
builder()->ConstructWithSpread(constructor, args);
} else {
builder()->New(constructor, args,
feedback_index(expr->CallNewFeedbackSlot()));
builder()->Construct(constructor, args,
feedback_index(expr->CallNewFeedbackSlot()));
}
}

View File

@ -227,7 +227,8 @@ bool Bytecodes::IsStarLookahead(Bytecode bytecode, OperandScale operand_scale) {
case Bytecode::kTypeOf:
case Bytecode::kCall:
case Bytecode::kCallProperty:
case Bytecode::kNew:
case Bytecode::kConstruct:
case Bytecode::kConstructWithSpread:
return true;
default:
return false;

View File

@ -22,288 +22,288 @@ namespace interpreter {
// The list of bytecodes which are interpreted by the interpreter.
// Format is V(<bytecode>, <accumulator_use>, <operands>).
#define BYTECODE_LIST(V) \
/* Extended width operands */ \
V(Wide, AccumulatorUse::kNone) \
V(ExtraWide, AccumulatorUse::kNone) \
\
/* Loading the accumulator */ \
V(LdaZero, AccumulatorUse::kWrite) \
V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \
V(LdaUndefined, AccumulatorUse::kWrite) \
V(LdaNull, AccumulatorUse::kWrite) \
V(LdaTheHole, AccumulatorUse::kWrite) \
V(LdaTrue, AccumulatorUse::kWrite) \
V(LdaFalse, AccumulatorUse::kWrite) \
V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \
\
/* Globals */ \
V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \
V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx) \
V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \
OperandType::kIdx) \
V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \
OperandType::kIdx) \
\
/* Context operations */ \
V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \
V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \
V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kUImm) \
V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kUImm) \
V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \
\
/* Load-Store lookup slots */ \
V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
V(LdaLookupContextSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupGlobalSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \
V(LdaLookupContextSlotInsideTypeof, AccumulatorUse::kWrite, \
OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupGlobalSlotInsideTypeof, AccumulatorUse::kWrite, \
OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \
\
/* Register-accumulator transfers */ \
V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \
V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \
\
/* Register-register transfers */ \
V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \
\
/* Property loads (LoadIC) operations */ \
V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* Operations on module variables */ \
V(LdaModuleVariable, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kUImm) \
V(StaModuleVariable, AccumulatorUse::kRead, OperandType::kImm, \
OperandType::kUImm) \
\
/* Propery stores (StoreIC) operations */ \
V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kIdx) \
V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kIdx) \
V(StaDataPropertyInLiteral, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kFlag8, OperandType::kIdx) \
\
/* Binary Operators */ \
V(Add, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Div, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* Binary operators with immediate operands */ \
V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
OperandType::kIdx) \
V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
OperandType::kIdx) \
V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
\
/* Unary Operators */ \
V(Inc, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(Dec, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \
V(LogicalNot, AccumulatorUse::kReadWrite) \
V(TypeOf, AccumulatorUse::kReadWrite) \
V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \
\
/* GetSuperConstructor operator */ \
V(GetSuperConstructor, AccumulatorUse::kRead, OperandType::kRegOut) \
\
/* Call operations */ \
V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \
OperandType::kRegCount, OperandType::kIdx) \
V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \
V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \
OperandType::kRegList, OperandType::kRegCount) \
V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \
V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kRegList, OperandType::kRegCount) \
\
/* Intrinsics */ \
V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
OperandType::kRegList, OperandType::kRegCount) \
\
/* New operators */ \
V(New, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kRegList, \
OperandType::kRegCount, OperandType::kIdx) \
V(NewWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \
\
/* Test Operators */ \
V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \
\
/* TestEqual with Null or Undefined */ \
V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \
V(TestNull, AccumulatorUse::kWrite, OperandType::kReg) \
V(TestUndefined, AccumulatorUse::kWrite, OperandType::kReg) \
\
/* Cast operators */ \
V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \
V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \
V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \
\
/* Literals */ \
V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8) \
V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8) \
V(CreateObjectLiteral, AccumulatorUse::kNone, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \
\
/* Closure allocation */ \
V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8) \
\
/* Context allocation */ \
V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \
V(CreateEvalContext, AccumulatorUse::kWrite, OperandType::kUImm) \
V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* Arguments allocation */ \
V(CreateMappedArguments, AccumulatorUse::kWrite) \
V(CreateUnmappedArguments, AccumulatorUse::kWrite) \
V(CreateRestParameter, AccumulatorUse::kWrite) \
\
/* Control Flow -- carefully ordered for efficient checks */ \
/* - [Unconditional jumps] */ \
V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \
/* - [Forward jumps] */ \
V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \
/* - [Start constant jumps] */ \
V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \
/* - [Conditional jumps] */ \
/* - [Conditional constant jumps] */ \
V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [Start ToBoolean jumps] */ \
V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [End constant jumps] */ \
/* - [Conditional immediate jumps] */ \
V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \
/* - [End ToBoolean jumps] */ \
V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \
\
/* Complex flow control For..in */ \
V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \
OperandType::kRegOutTriple) \
V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kReg) \
V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
OperandType::kRegPair, OperandType::kIdx) \
V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \
\
/* Perform a stack guard check */ \
V(StackCheck, AccumulatorUse::kNone) \
\
/* Update the pending message */ \
V(SetPendingMessage, AccumulatorUse::kReadWrite) \
\
/* Non-local flow control */ \
V(Throw, AccumulatorUse::kRead) \
V(ReThrow, AccumulatorUse::kRead) \
V(Return, AccumulatorUse::kRead) \
\
/* Generators */ \
V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \
V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \
\
/* Debugger */ \
V(Debugger, AccumulatorUse::kNone) \
\
/* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \
/* and one for each operand widening prefix bytecode */ \
V(DebugBreak0, AccumulatorUse::kRead) \
V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \
V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \
V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
OperandType::kReg) \
V(DebugBreak4, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
OperandType::kReg, OperandType::kReg) \
V(DebugBreak5, AccumulatorUse::kRead, OperandType::kRuntimeId, \
OperandType::kReg, OperandType::kReg) \
V(DebugBreak6, AccumulatorUse::kRead, OperandType::kRuntimeId, \
OperandType::kReg, OperandType::kReg, OperandType::kReg) \
V(DebugBreakWide, AccumulatorUse::kRead) \
V(DebugBreakExtraWide, AccumulatorUse::kRead) \
\
/* Illegal bytecode (terminates execution) */ \
V(Illegal, AccumulatorUse::kNone) \
\
/* No operation (used to maintain source positions for peephole */ \
/* eliminated bytecodes). */ \
#define BYTECODE_LIST(V) \
/* Extended width operands */ \
V(Wide, AccumulatorUse::kNone) \
V(ExtraWide, AccumulatorUse::kNone) \
\
/* Loading the accumulator */ \
V(LdaZero, AccumulatorUse::kWrite) \
V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \
V(LdaUndefined, AccumulatorUse::kWrite) \
V(LdaNull, AccumulatorUse::kWrite) \
V(LdaTheHole, AccumulatorUse::kWrite) \
V(LdaTrue, AccumulatorUse::kWrite) \
V(LdaFalse, AccumulatorUse::kWrite) \
V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \
\
/* Globals */ \
V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \
V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx) \
V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \
OperandType::kIdx) \
V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \
OperandType::kIdx) \
\
/* Context operations */ \
V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \
V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \
V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kUImm) \
V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kUImm) \
V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \
\
/* Load-Store lookup slots */ \
V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
V(LdaLookupContextSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupGlobalSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \
V(LdaLookupContextSlotInsideTypeof, AccumulatorUse::kWrite, \
OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupGlobalSlotInsideTypeof, AccumulatorUse::kWrite, \
OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \
\
/* Register-accumulator transfers */ \
V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \
V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \
\
/* Register-register transfers */ \
V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \
\
/* Property loads (LoadIC) operations */ \
V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* Operations on module variables */ \
V(LdaModuleVariable, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kUImm) \
V(StaModuleVariable, AccumulatorUse::kRead, OperandType::kImm, \
OperandType::kUImm) \
\
/* Propery stores (StoreIC) operations */ \
V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kIdx) \
V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kIdx) \
V(StaDataPropertyInLiteral, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kFlag8, OperandType::kIdx) \
\
/* Binary Operators */ \
V(Add, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Div, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* Binary operators with immediate operands */ \
V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
OperandType::kIdx) \
V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
OperandType::kIdx) \
V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \
OperandType::kReg, OperandType::kIdx) \
\
/* Unary Operators */ \
V(Inc, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(Dec, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \
V(LogicalNot, AccumulatorUse::kReadWrite) \
V(TypeOf, AccumulatorUse::kReadWrite) \
V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \
\
/* GetSuperConstructor operator */ \
V(GetSuperConstructor, AccumulatorUse::kRead, OperandType::kRegOut) \
\
/* Call operations */ \
V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \
OperandType::kRegCount, OperandType::kIdx) \
V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \
V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \
OperandType::kRegList, OperandType::kRegCount) \
V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \
V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kRegList, OperandType::kRegCount) \
\
/* Intrinsics */ \
V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
OperandType::kRegList, OperandType::kRegCount) \
\
/* Construct operators */ \
V(Construct, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(ConstructWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \
\
/* Test Operators */ \
V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \
\
/* TestEqual with Null or Undefined */ \
V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \
V(TestNull, AccumulatorUse::kWrite, OperandType::kReg) \
V(TestUndefined, AccumulatorUse::kWrite, OperandType::kReg) \
\
/* Cast operators */ \
V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \
V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \
V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \
\
/* Literals */ \
V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8) \
V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8) \
V(CreateObjectLiteral, AccumulatorUse::kNone, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \
\
/* Closure allocation */ \
V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx, OperandType::kFlag8) \
\
/* Context allocation */ \
V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \
V(CreateEvalContext, AccumulatorUse::kWrite, OperandType::kUImm) \
V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* Arguments allocation */ \
V(CreateMappedArguments, AccumulatorUse::kWrite) \
V(CreateUnmappedArguments, AccumulatorUse::kWrite) \
V(CreateRestParameter, AccumulatorUse::kWrite) \
\
/* Control Flow -- carefully ordered for efficient checks */ \
/* - [Unconditional jumps] */ \
V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \
/* - [Forward jumps] */ \
V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \
/* - [Start constant jumps] */ \
V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \
/* - [Conditional jumps] */ \
/* - [Conditional constant jumps] */ \
V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [Start ToBoolean jumps] */ \
V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [End constant jumps] */ \
/* - [Conditional immediate jumps] */ \
V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \
/* - [End ToBoolean jumps] */ \
V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \
\
/* Complex flow control For..in */ \
V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \
OperandType::kRegOutTriple) \
V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kReg) \
V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
OperandType::kRegPair, OperandType::kIdx) \
V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \
\
/* Perform a stack guard check */ \
V(StackCheck, AccumulatorUse::kNone) \
\
/* Update the pending message */ \
V(SetPendingMessage, AccumulatorUse::kReadWrite) \
\
/* Non-local flow control */ \
V(Throw, AccumulatorUse::kRead) \
V(ReThrow, AccumulatorUse::kRead) \
V(Return, AccumulatorUse::kRead) \
\
/* Generators */ \
V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \
V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \
\
/* Debugger */ \
V(Debugger, AccumulatorUse::kNone) \
\
/* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \
/* and one for each operand widening prefix bytecode */ \
V(DebugBreak0, AccumulatorUse::kRead) \
V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \
V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \
V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
OperandType::kReg) \
V(DebugBreak4, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
OperandType::kReg, OperandType::kReg) \
V(DebugBreak5, AccumulatorUse::kRead, OperandType::kRuntimeId, \
OperandType::kReg, OperandType::kReg) \
V(DebugBreak6, AccumulatorUse::kRead, OperandType::kRuntimeId, \
OperandType::kReg, OperandType::kReg, OperandType::kReg) \
V(DebugBreakWide, AccumulatorUse::kRead) \
V(DebugBreakExtraWide, AccumulatorUse::kRead) \
\
/* Illegal bytecode (terminates execution) */ \
V(Illegal, AccumulatorUse::kNone) \
\
/* No operation (used to maintain source positions for peephole */ \
/* eliminated bytecodes). */ \
V(Nop, AccumulatorUse::kNone)
// List of debug break bytecodes.
@ -612,9 +612,9 @@ class V8_EXPORT_PRIVATE Bytecodes final {
}
// Returns true if the bytecode is a call or a constructor call.
static constexpr bool IsCallOrNew(Bytecode bytecode) {
static constexpr bool IsCallOrConstruct(Bytecode bytecode) {
return bytecode == Bytecode::kCall || bytecode == Bytecode::kCallProperty ||
bytecode == Bytecode::kTailCall || bytecode == Bytecode::kNew;
bytecode == Bytecode::kTailCall || bytecode == Bytecode::kConstruct;
}
// Returns true if the bytecode is a call to the runtime.

View File

@ -2199,13 +2199,13 @@ void Interpreter::DoCallWithSpread(InterpreterAssembler* assembler) {
__ Dispatch();
}
// NewWithSpread <first_arg> <arg_count>
// ConstructWithSpread <first_arg> <arg_count>
//
// Call the constructor in |constructor| with the first argument in register
// |first_arg| and |arg_count| arguments in subsequent registers. The final
// argument is always a spread. The new.target is in the accumulator.
//
void Interpreter::DoNewWithSpread(InterpreterAssembler* assembler) {
void Interpreter::DoConstructWithSpread(InterpreterAssembler* assembler) {
Node* new_target = __ GetAccumulator();
Node* constructor_reg = __ BytecodeOperandReg(0);
Node* constructor = __ LoadRegister(constructor_reg);
@ -2219,13 +2219,13 @@ void Interpreter::DoNewWithSpread(InterpreterAssembler* assembler) {
__ Dispatch();
}
// New <constructor> <first_arg> <arg_count>
// Construct <constructor> <first_arg> <arg_count>
//
// Call operator new with |constructor| and the first argument in
// Call operator construct with |constructor| and the first argument in
// register |first_arg| and |arg_count| arguments in subsequent
// registers. The new.target is in the accumulator.
//
void Interpreter::DoNew(InterpreterAssembler* assembler) {
void Interpreter::DoConstruct(InterpreterAssembler* assembler) {
Node* new_target = __ GetAccumulator();
Node* constructor_reg = __ BytecodeOperandReg(0);
Node* constructor = __ LoadRegister(constructor_reg);

View File

@ -19,7 +19,7 @@ bytecodes: [
/* 45 E> */ B(StackCheck),
/* 50 S> */ B(LdaGlobal), U8(0), U8(4),
B(Star), R(0),
/* 57 E> */ B(New), R(0), R(0), U8(0), U8(2),
/* 57 E> */ B(Construct), R(0), R(0), U8(0), U8(2),
/* 68 S> */ B(Return),
]
constant pool: [
@ -44,7 +44,7 @@ bytecodes: [
B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
/* 70 E> */ B(New), R(0), R(1), U8(1), U8(2),
/* 70 E> */ B(Construct), R(0), R(1), U8(1), U8(2),
/* 82 S> */ B(Return),
]
constant pool: [
@ -78,7 +78,7 @@ bytecodes: [
B(LdaSmi), I8(5),
B(Star), R(3),
B(Ldar), R(0),
/* 112 E> */ B(New), R(0), R(1), U8(3), U8(2),
/* 112 E> */ B(Construct), R(0), R(1), U8(3), U8(2),
/* 130 S> */ B(Return),
]
constant pool: [

View File

@ -118,7 +118,7 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star), R(3),
B(Ldar), R(0),
/* 118 E> */ B(New), R(2), R(3), U8(1), U8(2),
/* 118 E> */ B(Construct), R(2), R(3), U8(1), U8(2),
B(Star), R(2),
B(Ldar), R(this),
B(JumpIfNotHole), U8(4),
@ -171,7 +171,7 @@ bytecodes: [
/* 117 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(2),
B(Ldar), R(0),
/* 117 E> */ B(New), R(2), R(0), U8(0), U8(2),
/* 117 E> */ B(Construct), R(2), R(0), U8(0), U8(2),
B(Star), R(2),
B(Ldar), R(this),
B(JumpIfNotHole), U8(4),

View File

@ -215,7 +215,7 @@ bytecodes: [
B(Star), R(1),
B(Star), R(2),
/* 87 S> */ B(Nop),
/* 94 E> */ B(New), R(2), R(0), U8(0), U8(3),
/* 94 E> */ B(Construct), R(2), R(0), U8(0), U8(3),
/* 103 S> */ B(Return),
]
constant pool: [

View File

@ -38,7 +38,7 @@ bytecodes: [
/* 89 S> */ B(CreateArrayLiteral), U8(1), U8(5), U8(9),
B(Star), R(4),
B(Ldar), R(2),
/* 89 E> */ B(NewWithSpread), R(2), R(4), U8(1),
/* 89 E> */ B(ConstructWithSpread), R(2), R(4), U8(1),
B(LdaUndefined),
/* 110 S> */ B(Return),
]
@ -84,7 +84,7 @@ bytecodes: [
B(CreateArrayLiteral), U8(1), U8(5), U8(9),
B(Star), R(5),
B(Ldar), R(2),
/* 89 E> */ B(NewWithSpread), R(2), R(4), U8(2),
/* 89 E> */ B(ConstructWithSpread), R(2), R(4), U8(2),
B(LdaUndefined),
/* 113 S> */ B(Return),
]

View File

@ -30,7 +30,7 @@ bytecodes: [
/* 93 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(3),
B(Ldar), R(0),
/* 93 E> */ B(NewWithSpread), R(3), R(2), U8(1),
/* 93 E> */ B(ConstructWithSpread), R(3), R(2), U8(1),
/* 93 S> */ B(Return),
]
constant pool: [
@ -67,7 +67,7 @@ bytecodes: [
B(Star), R(4),
B(Ldar), R(0),
B(Mov), R(2), R(5),
/* 140 E> */ B(NewWithSpread), R(3), R(4), U8(2),
/* 140 E> */ B(ConstructWithSpread), R(3), R(4), U8(2),
B(Star), R(3),
B(Ldar), R(this),
B(JumpIfNotHole), U8(4),

View File

@ -138,7 +138,6 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.CallRuntime(Runtime::kIsArray, reg)
.CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair)
.CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list)
.NewWithSpread(reg, reg_list)
.CallWithSpread(reg, reg_list);
// Emit binary operator invocations.
@ -185,8 +184,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
// Emit delete
builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT);
// Emit new.
builder.New(reg, reg_list, 1);
// Emit construct.
builder.Construct(reg, reg_list, 1).ConstructWithSpread(reg, reg_list);
// Emit test operator invocations.
builder.CompareOperation(Token::Value::EQ, reg, 1)