Commit a7ba61fd authored by petermarshall's avatar petermarshall Committed by Commit bot

[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}
parent 44cac16f
...@@ -1352,7 +1352,7 @@ void BytecodeGraphBuilder::VisitCallRuntimeForPair() { ...@@ -1352,7 +1352,7 @@ void BytecodeGraphBuilder::VisitCallRuntimeForPair() {
Environment::kAttachFrameState); Environment::kAttachFrameState);
} }
Node* BytecodeGraphBuilder::ProcessCallNewWithSpreadArguments( Node* BytecodeGraphBuilder::ProcessConstructWithSpreadArguments(
const Operator* op, Node* callee, Node* new_target, const Operator* op, Node* callee, Node* new_target,
interpreter::Register first_arg, size_t arity) { interpreter::Register first_arg, size_t arity) {
Node** all = local_zone()->NewArray<Node*>(arity); Node** all = local_zone()->NewArray<Node*>(arity);
...@@ -1367,7 +1367,7 @@ Node* BytecodeGraphBuilder::ProcessCallNewWithSpreadArguments( ...@@ -1367,7 +1367,7 @@ Node* BytecodeGraphBuilder::ProcessCallNewWithSpreadArguments(
return value; return value;
} }
void BytecodeGraphBuilder::VisitNewWithSpread() { void BytecodeGraphBuilder::VisitConstructWithSpread() {
PrepareEagerCheckpoint(); PrepareEagerCheckpoint();
interpreter::Register callee_reg = bytecode_iterator().GetRegisterOperand(0); interpreter::Register callee_reg = bytecode_iterator().GetRegisterOperand(0);
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1); interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
...@@ -1378,7 +1378,7 @@ void BytecodeGraphBuilder::VisitNewWithSpread() { ...@@ -1378,7 +1378,7 @@ void BytecodeGraphBuilder::VisitNewWithSpread() {
const Operator* op = const Operator* op =
javascript()->ConstructWithSpread(static_cast<int>(arg_count) + 2); javascript()->ConstructWithSpread(static_cast<int>(arg_count) + 2);
Node* value = ProcessCallNewWithSpreadArguments(op, callee, new_target, Node* value = ProcessConstructWithSpreadArguments(op, callee, new_target,
first_arg, arg_count + 2); first_arg, arg_count + 2);
environment()->BindAccumulator(value, Environment::kAttachFrameState); environment()->BindAccumulator(value, Environment::kAttachFrameState);
} }
...@@ -1396,7 +1396,7 @@ void BytecodeGraphBuilder::VisitInvokeIntrinsic() { ...@@ -1396,7 +1396,7 @@ void BytecodeGraphBuilder::VisitInvokeIntrinsic() {
environment()->BindAccumulator(value, Environment::kAttachFrameState); environment()->BindAccumulator(value, Environment::kAttachFrameState);
} }
Node* BytecodeGraphBuilder::ProcessCallNewArguments( Node* BytecodeGraphBuilder::ProcessConstructArguments(
const Operator* call_new_op, Node* callee, Node* new_target, const Operator* call_new_op, Node* callee, Node* new_target,
interpreter::Register first_arg, size_t arity) { interpreter::Register first_arg, size_t arity) {
Node** all = local_zone()->NewArray<Node*>(arity); Node** all = local_zone()->NewArray<Node*>(arity);
...@@ -1411,7 +1411,7 @@ Node* BytecodeGraphBuilder::ProcessCallNewArguments( ...@@ -1411,7 +1411,7 @@ Node* BytecodeGraphBuilder::ProcessCallNewArguments(
return value; return value;
} }
void BytecodeGraphBuilder::VisitNew() { void BytecodeGraphBuilder::VisitConstruct() {
PrepareEagerCheckpoint(); PrepareEagerCheckpoint();
interpreter::Register callee_reg = bytecode_iterator().GetRegisterOperand(0); interpreter::Register callee_reg = bytecode_iterator().GetRegisterOperand(0);
interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1); interpreter::Register first_arg = bytecode_iterator().GetRegisterOperand(1);
...@@ -1428,7 +1428,7 @@ void BytecodeGraphBuilder::VisitNew() { ...@@ -1428,7 +1428,7 @@ void BytecodeGraphBuilder::VisitNew() {
float const frequency = ComputeCallFrequency(slot_id); float const frequency = ComputeCallFrequency(slot_id);
const Operator* call = javascript()->Construct( const Operator* call = javascript()->Construct(
static_cast<int>(arg_count) + 2, frequency, feedback); static_cast<int>(arg_count) + 2, frequency, feedback);
Node* value = ProcessCallNewArguments(call, callee, new_target, first_arg, Node* value = ProcessConstructArguments(call, callee, new_target, first_arg,
arg_count + 2); arg_count + 2);
environment()->BindAccumulator(value, Environment::kAttachFrameState); environment()->BindAccumulator(value, Environment::kAttachFrameState);
} }
......
...@@ -111,10 +111,11 @@ class BytecodeGraphBuilder { ...@@ -111,10 +111,11 @@ class BytecodeGraphBuilder {
Node* ProcessCallArguments(const Operator* call_op, Node* callee, Node* ProcessCallArguments(const Operator* call_op, Node* callee,
interpreter::Register receiver, size_t arity); interpreter::Register receiver, size_t arity);
Node* ProcessCallNewArguments(const Operator* call_new_op, Node* callee, Node* ProcessConstructArguments(const Operator* call_new_op, Node* callee,
Node* new_target, Node* new_target,
interpreter::Register first_arg, size_t arity); interpreter::Register first_arg,
Node* ProcessCallNewWithSpreadArguments(const Operator* op, Node* callee, size_t arity);
Node* ProcessConstructWithSpreadArguments(const Operator* op, Node* callee,
Node* new_target, Node* new_target,
interpreter::Register first_arg, interpreter::Register first_arg,
size_t arity); size_t arity);
......
...@@ -306,7 +306,7 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) { ...@@ -306,7 +306,7 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
typedef interpreter::Bytecode Bytecode; typedef interpreter::Bytecode Bytecode;
typedef interpreter::Bytecodes Bytecodes; typedef interpreter::Bytecodes Bytecodes;
if (Bytecodes::IsWithoutExternalSideEffects(bytecode)) return true; 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::WritesBooleanToAccumulator(bytecode)) return true;
if (Bytecodes::IsJumpIfToBoolean(bytecode)) return true; if (Bytecodes::IsJumpIfToBoolean(bytecode)) return true;
if (Bytecodes::IsPrefixScalingBytecode(bytecode)) return true; if (Bytecodes::IsPrefixScalingBytecode(bytecode)) return true;
......
...@@ -328,7 +328,7 @@ DebugBreakType BytecodeArrayBreakIterator::GetDebugBreakType() { ...@@ -328,7 +328,7 @@ DebugBreakType BytecodeArrayBreakIterator::GetDebugBreakType() {
return isolate()->is_tail_call_elimination_enabled() return isolate()->is_tail_call_elimination_enabled()
? DEBUG_BREAK_SLOT_AT_TAIL_CALL ? DEBUG_BREAK_SLOT_AT_TAIL_CALL
: DEBUG_BREAK_SLOT_AT_CALL; : DEBUG_BREAK_SLOT_AT_CALL;
} else if (interpreter::Bytecodes::IsCallOrNew(bytecode)) { } else if (interpreter::Bytecodes::IsCallOrConstruct(bytecode)) {
return DEBUG_BREAK_SLOT_AT_CALL; return DEBUG_BREAK_SLOT_AT_CALL;
} else if (source_position_iterator_.is_statement()) { } else if (source_position_iterator_.is_statement()) {
return DEBUG_BREAK_SLOT; return DEBUG_BREAK_SLOT;
......
...@@ -905,10 +905,16 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallWithSpread(Register callable, ...@@ -905,10 +905,16 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallWithSpread(Register callable,
return *this; return *this;
} }
BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, BytecodeArrayBuilder& BytecodeArrayBuilder::Construct(Register constructor,
RegisterList args, RegisterList args,
int feedback_slot_id) { int feedback_slot_id) {
OutputNew(constructor, args, args.register_count(), 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; return *this;
} }
...@@ -961,12 +967,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index, ...@@ -961,12 +967,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index,
return *this; return *this;
} }
BytecodeArrayBuilder& BytecodeArrayBuilder::NewWithSpread(Register constructor,
RegisterList args) {
OutputNewWithSpread(constructor, args, args.register_count());
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::Delete(Register object, BytecodeArrayBuilder& BytecodeArrayBuilder::Delete(Register object,
LanguageMode language_mode) { LanguageMode language_mode) {
if (language_mode == SLOPPY) { if (language_mode == SLOPPY) {
......
...@@ -218,15 +218,16 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final ...@@ -218,15 +218,16 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final
// onwards. The final argument must be a spread. // onwards. The final argument must be a spread.
BytecodeArrayBuilder& CallWithSpread(Register callable, RegisterList args); 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|. // The |constructor| is in a register and arguments are in |args|.
BytecodeArrayBuilder& New(Register constructor, RegisterList args, BytecodeArrayBuilder& Construct(Register constructor, RegisterList args,
int feedback_slot); int feedback_slot);
// Call the new operator for use with a spread. The accumulator holds the // Call the Construct operator for use with a spread. The accumulator holds
// |new_target|. The |constructor| is in a register and arguments are in // the |new_target|. The |constructor| is in a register and arguments are in
// |args|. The final argument must be a spread. // |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|. // Call the runtime function with |function_id| and arguments |args|.
BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id,
......
...@@ -2606,7 +2606,7 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) { ...@@ -2606,7 +2606,7 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
// if there is exactly one spread, and it is the last argument. // if there is exactly one spread, and it is the last argument.
if (expr->only_last_arg_is_spread()) { if (expr->only_last_arg_is_spread()) {
// TODO(petermarshall): Collect type on the feedback slot. // TODO(petermarshall): Collect type on the feedback slot.
builder()->NewWithSpread(constructor, args_regs); builder()->ConstructWithSpread(constructor, args_regs);
} else { } else {
// Call construct. // Call construct.
// TODO(turbofan): For now we do gather feedback on super constructor // TODO(turbofan): For now we do gather feedback on super constructor
...@@ -2616,7 +2616,7 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) { ...@@ -2616,7 +2616,7 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
// the job done for now. In the long run we might want to revisit this // the job done for now. In the long run we might want to revisit this
// and come up with a better way. // and come up with a better way.
int const feedback_slot_index = feedback_index(expr->CallFeedbackICSlot()); 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,9 +2632,9 @@ void BytecodeGenerator::VisitCallNew(CallNew* expr) { ...@@ -2632,9 +2632,9 @@ void BytecodeGenerator::VisitCallNew(CallNew* expr) {
if (expr->only_last_arg_is_spread()) { if (expr->only_last_arg_is_spread()) {
// TODO(petermarshall): Collect type on the feedback slot. // TODO(petermarshall): Collect type on the feedback slot.
builder()->NewWithSpread(constructor, args); builder()->ConstructWithSpread(constructor, args);
} else { } else {
builder()->New(constructor, args, builder()->Construct(constructor, args,
feedback_index(expr->CallNewFeedbackSlot())); feedback_index(expr->CallNewFeedbackSlot()));
} }
} }
......
...@@ -227,7 +227,8 @@ bool Bytecodes::IsStarLookahead(Bytecode bytecode, OperandScale operand_scale) { ...@@ -227,7 +227,8 @@ bool Bytecodes::IsStarLookahead(Bytecode bytecode, OperandScale operand_scale) {
case Bytecode::kTypeOf: case Bytecode::kTypeOf:
case Bytecode::kCall: case Bytecode::kCall:
case Bytecode::kCallProperty: case Bytecode::kCallProperty:
case Bytecode::kNew: case Bytecode::kConstruct:
case Bytecode::kConstructWithSpread:
return true; return true;
default: default:
return false; return false;
......
...@@ -166,10 +166,10 @@ namespace interpreter { ...@@ -166,10 +166,10 @@ namespace interpreter {
V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \ V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
OperandType::kRegList, OperandType::kRegCount) \ OperandType::kRegList, OperandType::kRegCount) \
\ \
/* New operators */ \ /* Construct operators */ \
V(New, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kRegList, \ V(Construct, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kRegCount, OperandType::kIdx) \ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(NewWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \ V(ConstructWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \ OperandType::kRegList, OperandType::kRegCount) \
\ \
/* Test Operators */ \ /* Test Operators */ \
...@@ -612,9 +612,9 @@ class V8_EXPORT_PRIVATE Bytecodes final { ...@@ -612,9 +612,9 @@ class V8_EXPORT_PRIVATE Bytecodes final {
} }
// Returns true if the bytecode is a call or a constructor call. // 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 || 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. // Returns true if the bytecode is a call to the runtime.
......
...@@ -2199,13 +2199,13 @@ void Interpreter::DoCallWithSpread(InterpreterAssembler* assembler) { ...@@ -2199,13 +2199,13 @@ void Interpreter::DoCallWithSpread(InterpreterAssembler* assembler) {
__ Dispatch(); __ Dispatch();
} }
// NewWithSpread <first_arg> <arg_count> // ConstructWithSpread <first_arg> <arg_count>
// //
// Call the constructor in |constructor| with the first argument in register // Call the constructor in |constructor| with the first argument in register
// |first_arg| and |arg_count| arguments in subsequent registers. The final // |first_arg| and |arg_count| arguments in subsequent registers. The final
// argument is always a spread. The new.target is in the accumulator. // 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* new_target = __ GetAccumulator();
Node* constructor_reg = __ BytecodeOperandReg(0); Node* constructor_reg = __ BytecodeOperandReg(0);
Node* constructor = __ LoadRegister(constructor_reg); Node* constructor = __ LoadRegister(constructor_reg);
...@@ -2219,13 +2219,13 @@ void Interpreter::DoNewWithSpread(InterpreterAssembler* assembler) { ...@@ -2219,13 +2219,13 @@ void Interpreter::DoNewWithSpread(InterpreterAssembler* assembler) {
__ Dispatch(); __ 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 // register |first_arg| and |arg_count| arguments in subsequent
// registers. The new.target is in the accumulator. // registers. The new.target is in the accumulator.
// //
void Interpreter::DoNew(InterpreterAssembler* assembler) { void Interpreter::DoConstruct(InterpreterAssembler* assembler) {
Node* new_target = __ GetAccumulator(); Node* new_target = __ GetAccumulator();
Node* constructor_reg = __ BytecodeOperandReg(0); Node* constructor_reg = __ BytecodeOperandReg(0);
Node* constructor = __ LoadRegister(constructor_reg); Node* constructor = __ LoadRegister(constructor_reg);
......
...@@ -19,7 +19,7 @@ bytecodes: [ ...@@ -19,7 +19,7 @@ bytecodes: [
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 50 S> */ B(LdaGlobal), U8(0), U8(4), /* 50 S> */ B(LdaGlobal), U8(0), U8(4),
B(Star), R(0), 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), /* 68 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -44,7 +44,7 @@ bytecodes: [ ...@@ -44,7 +44,7 @@ bytecodes: [
B(LdaSmi), I8(3), B(LdaSmi), I8(3),
B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), 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), /* 82 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -78,7 +78,7 @@ bytecodes: [ ...@@ -78,7 +78,7 @@ bytecodes: [
B(LdaSmi), I8(5), B(LdaSmi), I8(5),
B(Star), R(3), B(Star), R(3),
B(Ldar), R(0), 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), /* 130 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -118,7 +118,7 @@ bytecodes: [ ...@@ -118,7 +118,7 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(3), B(Star), R(3),
B(Ldar), R(0), 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(Star), R(2),
B(Ldar), R(this), B(Ldar), R(this),
B(JumpIfNotHole), U8(4), B(JumpIfNotHole), U8(4),
...@@ -171,7 +171,7 @@ bytecodes: [ ...@@ -171,7 +171,7 @@ bytecodes: [
/* 117 S> */ B(Ldar), R(1), /* 117 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(2), B(GetSuperConstructor), R(2),
B(Ldar), R(0), 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(Star), R(2),
B(Ldar), R(this), B(Ldar), R(this),
B(JumpIfNotHole), U8(4), B(JumpIfNotHole), U8(4),
......
...@@ -215,7 +215,7 @@ bytecodes: [ ...@@ -215,7 +215,7 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
B(Star), R(2), B(Star), R(2),
/* 87 S> */ B(Nop), /* 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), /* 103 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -38,7 +38,7 @@ bytecodes: [ ...@@ -38,7 +38,7 @@ bytecodes: [
/* 89 S> */ B(CreateArrayLiteral), U8(1), U8(5), U8(9), /* 89 S> */ B(CreateArrayLiteral), U8(1), U8(5), U8(9),
B(Star), R(4), B(Star), R(4),
B(Ldar), R(2), 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), B(LdaUndefined),
/* 110 S> */ B(Return), /* 110 S> */ B(Return),
] ]
...@@ -84,7 +84,7 @@ bytecodes: [ ...@@ -84,7 +84,7 @@ bytecodes: [
B(CreateArrayLiteral), U8(1), U8(5), U8(9), B(CreateArrayLiteral), U8(1), U8(5), U8(9),
B(Star), R(5), B(Star), R(5),
B(Ldar), R(2), 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), B(LdaUndefined),
/* 113 S> */ B(Return), /* 113 S> */ B(Return),
] ]
......
...@@ -30,7 +30,7 @@ bytecodes: [ ...@@ -30,7 +30,7 @@ bytecodes: [
/* 93 S> */ B(Ldar), R(1), /* 93 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(3), B(GetSuperConstructor), R(3),
B(Ldar), R(0), 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), /* 93 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -67,7 +67,7 @@ bytecodes: [ ...@@ -67,7 +67,7 @@ bytecodes: [
B(Star), R(4), B(Star), R(4),
B(Ldar), R(0), B(Ldar), R(0),
B(Mov), R(2), R(5), 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(Star), R(3),
B(Ldar), R(this), B(Ldar), R(this),
B(JumpIfNotHole), U8(4), B(JumpIfNotHole), U8(4),
......
...@@ -138,7 +138,6 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -138,7 +138,6 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.CallRuntime(Runtime::kIsArray, reg) .CallRuntime(Runtime::kIsArray, reg)
.CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair) .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair)
.CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list) .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list)
.NewWithSpread(reg, reg_list)
.CallWithSpread(reg, reg_list); .CallWithSpread(reg, reg_list);
// Emit binary operator invocations. // Emit binary operator invocations.
...@@ -185,8 +184,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -185,8 +184,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
// Emit delete // Emit delete
builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT);
// Emit new. // Emit construct.
builder.New(reg, reg_list, 1); builder.Construct(reg, reg_list, 1).ConstructWithSpread(reg, reg_list);
// Emit test operator invocations. // Emit test operator invocations.
builder.CompareOperation(Token::Value::EQ, reg, 1) builder.CompareOperation(Token::Value::EQ, reg, 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment