Commit 713eb9e7 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[ignition] Change RestoreGeneratorRegisters to ResumeGenerator

This makes RestoreGeneratorRegisters do a fuller resume process: update
the state register to indicate that it is now executing, and update the
accumulator with the input_or_debug_pos of the generator - i.e., perform
the boilerplate generator resuming in one bytecode instead of several.

Change-Id: Ia87b6766ac023064b40d3e9a143e7b32118ea3a0
Reviewed-on: https://chromium-review.googlesource.com/859770
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50499}
parent afd8a818
...@@ -2737,14 +2737,16 @@ void BytecodeGraphBuilder::VisitRestoreGeneratorState() { ...@@ -2737,14 +2737,16 @@ void BytecodeGraphBuilder::VisitRestoreGeneratorState() {
environment()->BindAccumulator(state, Environment::kAttachFrameState); environment()->BindAccumulator(state, Environment::kAttachFrameState);
} }
void BytecodeGraphBuilder::VisitRestoreGeneratorRegisters() { void BytecodeGraphBuilder::VisitResumeGenerator() {
Node* generator = Node* generator =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
interpreter::Register first_reg = bytecode_iterator().GetRegisterOperand(1); interpreter::Register generator_state_reg =
bytecode_iterator().GetRegisterOperand(1);
interpreter::Register first_reg = bytecode_iterator().GetRegisterOperand(2);
// We assume we are restoring registers starting fromm index 0. // We assume we are restoring registers starting fromm index 0.
CHECK_EQ(0, first_reg.index()); CHECK_EQ(0, first_reg.index());
int register_count = int register_count =
static_cast<int>(bytecode_iterator().GetRegisterCountOperand(2)); static_cast<int>(bytecode_iterator().GetRegisterCountOperand(3));
// Bijection between registers and array indices must match that used in // Bijection between registers and array indices must match that used in
// InterpreterAssembler::ExportRegisterFile. // InterpreterAssembler::ExportRegisterFile.
...@@ -2752,6 +2754,16 @@ void BytecodeGraphBuilder::VisitRestoreGeneratorRegisters() { ...@@ -2752,6 +2754,16 @@ void BytecodeGraphBuilder::VisitRestoreGeneratorRegisters() {
Node* value = NewNode(javascript()->GeneratorRestoreRegister(i), generator); Node* value = NewNode(javascript()->GeneratorRestoreRegister(i), generator);
environment()->BindRegister(interpreter::Register(i), value); environment()->BindRegister(interpreter::Register(i), value);
} }
// We're no longer resuming, so update the state register.
environment()->BindRegister(
generator_state_reg,
jsgraph()->SmiConstant(JSGeneratorObject::kGeneratorExecuting));
// Update the accumulator with the generator's input_or_debug_pos.
Node* input_or_debug_pos =
NewNode(javascript()->GeneratorRestoreInputOrDebugPos(), generator);
environment()->BindAccumulator(input_or_debug_pos);
} }
void BytecodeGraphBuilder::VisitWide() { void BytecodeGraphBuilder::VisitWide() {
......
...@@ -693,6 +693,10 @@ void JSGenericLowering::LowerJSGeneratorRestoreContinuation(Node* node) { ...@@ -693,6 +693,10 @@ void JSGenericLowering::LowerJSGeneratorRestoreContinuation(Node* node) {
UNREACHABLE(); // Eliminated in typed lowering. UNREACHABLE(); // Eliminated in typed lowering.
} }
void JSGenericLowering::LowerJSGeneratorRestoreInputOrDebugPos(Node* node) {
UNREACHABLE(); // Eliminated in typed lowering.
}
void JSGenericLowering::LowerJSGeneratorRestoreRegister(Node* node) { void JSGenericLowering::LowerJSGeneratorRestoreRegister(Node* node) {
UNREACHABLE(); // Eliminated in typed lowering. UNREACHABLE(); // Eliminated in typed lowering.
} }
......
...@@ -576,6 +576,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) { ...@@ -576,6 +576,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
V(LoadMessage, Operator::kNoThrow | Operator::kNoWrite, 0, 1) \ V(LoadMessage, Operator::kNoThrow | Operator::kNoWrite, 0, 1) \
V(StoreMessage, Operator::kNoRead | Operator::kNoThrow, 1, 0) \ V(StoreMessage, Operator::kNoRead | Operator::kNoThrow, 1, 0) \
V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \ V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \
V(GeneratorRestoreInputOrDebugPos, Operator::kNoThrow, 1, 1) \
V(StackCheck, Operator::kNoWrite, 0, 0) \ V(StackCheck, Operator::kNoWrite, 0, 0) \
V(Debugger, Operator::kNoProperties, 0, 0) \ V(Debugger, Operator::kNoProperties, 0, 0) \
V(GetSuperConstructor, Operator::kNoWrite, 1, 1) V(GetSuperConstructor, Operator::kNoWrite, 1, 1)
......
...@@ -744,8 +744,9 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final ...@@ -744,8 +744,9 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
// Used to implement Ignition's RestoreGeneratorState bytecode. // Used to implement Ignition's RestoreGeneratorState bytecode.
const Operator* GeneratorRestoreContinuation(); const Operator* GeneratorRestoreContinuation();
// Used to implement Ignition's RestoreGeneratorRegisters bytecode. // Used to implement Ignition's ResumeGenerator bytecode.
const Operator* GeneratorRestoreRegister(int index); const Operator* GeneratorRestoreRegister(int index);
const Operator* GeneratorRestoreInputOrDebugPos();
const Operator* StackCheck(); const Operator* StackCheck();
const Operator* Debugger(); const Operator* Debugger();
......
...@@ -2088,6 +2088,22 @@ Reduction JSTypedLowering::ReduceJSGeneratorRestoreRegister(Node* node) { ...@@ -2088,6 +2088,22 @@ Reduction JSTypedLowering::ReduceJSGeneratorRestoreRegister(Node* node) {
return Changed(element); return Changed(element);
} }
Reduction JSTypedLowering::ReduceJSGeneratorRestoreInputOrDebugPos(Node* node) {
DCHECK_EQ(IrOpcode::kJSGeneratorRestoreInputOrDebugPos, node->opcode());
FieldAccess input_or_debug_pos_field =
AccessBuilder::ForJSGeneratorObjectInputOrDebugPos();
const Operator* new_op = simplified()->LoadField(input_or_debug_pos_field);
// Mutate the node in-place.
DCHECK(OperatorProperties::HasContextInput(node->op()));
DCHECK(!OperatorProperties::HasContextInput(new_op));
node->RemoveInput(NodeProperties::FirstContextIndex(node));
NodeProperties::ChangeOp(node, new_op);
return Changed(node);
}
Reduction JSTypedLowering::Reduce(Node* node) { Reduction JSTypedLowering::Reduce(Node* node) {
switch (node->opcode()) { switch (node->opcode()) {
case IrOpcode::kJSEqual: case IrOpcode::kJSEqual:
...@@ -2173,6 +2189,8 @@ Reduction JSTypedLowering::Reduce(Node* node) { ...@@ -2173,6 +2189,8 @@ Reduction JSTypedLowering::Reduce(Node* node) {
return ReduceJSGeneratorRestoreContinuation(node); return ReduceJSGeneratorRestoreContinuation(node);
case IrOpcode::kJSGeneratorRestoreRegister: case IrOpcode::kJSGeneratorRestoreRegister:
return ReduceJSGeneratorRestoreRegister(node); return ReduceJSGeneratorRestoreRegister(node);
case IrOpcode::kJSGeneratorRestoreInputOrDebugPos:
return ReduceJSGeneratorRestoreInputOrDebugPos(node);
// TODO(mstarzinger): Simplified operations hiding in JS-level reducer not // TODO(mstarzinger): Simplified operations hiding in JS-level reducer not
// fooling anyone. Consider moving this into a separate reducer. // fooling anyone. Consider moving this into a separate reducer.
case IrOpcode::kSpeculativeNumberAdd: case IrOpcode::kSpeculativeNumberAdd:
......
...@@ -73,6 +73,7 @@ class V8_EXPORT_PRIVATE JSTypedLowering final ...@@ -73,6 +73,7 @@ class V8_EXPORT_PRIVATE JSTypedLowering final
Reduction ReduceJSGeneratorStore(Node* node); Reduction ReduceJSGeneratorStore(Node* node);
Reduction ReduceJSGeneratorRestoreContinuation(Node* node); Reduction ReduceJSGeneratorRestoreContinuation(Node* node);
Reduction ReduceJSGeneratorRestoreRegister(Node* node); Reduction ReduceJSGeneratorRestoreRegister(Node* node);
Reduction ReduceJSGeneratorRestoreInputOrDebugPos(Node* node);
Reduction ReduceNumberBinop(Node* node); Reduction ReduceNumberBinop(Node* node);
Reduction ReduceInt32Binop(Node* node); Reduction ReduceInt32Binop(Node* node);
Reduction ReduceUI32Shift(Node* node, Signedness signedness); Reduction ReduceUI32Shift(Node* node, Signedness signedness);
......
...@@ -175,24 +175,25 @@ ...@@ -175,24 +175,25 @@
V(JSConstructWithArrayLike) \ V(JSConstructWithArrayLike) \
V(JSConstructWithSpread) V(JSConstructWithSpread)
#define JS_OTHER_OP_LIST(V) \ #define JS_OTHER_OP_LIST(V) \
JS_CONSTRUCT_OP_LIST(V) \ JS_CONSTRUCT_OP_LIST(V) \
V(JSCallForwardVarargs) \ V(JSCallForwardVarargs) \
V(JSCall) \ V(JSCall) \
V(JSCallWithArrayLike) \ V(JSCallWithArrayLike) \
V(JSCallWithSpread) \ V(JSCallWithSpread) \
V(JSCallRuntime) \ V(JSCallRuntime) \
V(JSForInEnumerate) \ V(JSForInEnumerate) \
V(JSForInNext) \ V(JSForInNext) \
V(JSForInPrepare) \ V(JSForInPrepare) \
V(JSLoadMessage) \ V(JSLoadMessage) \
V(JSStoreMessage) \ V(JSStoreMessage) \
V(JSLoadModule) \ V(JSLoadModule) \
V(JSStoreModule) \ V(JSStoreModule) \
V(JSGeneratorStore) \ V(JSGeneratorStore) \
V(JSGeneratorRestoreContinuation) \ V(JSGeneratorRestoreContinuation) \
V(JSGeneratorRestoreRegister) \ V(JSGeneratorRestoreRegister) \
V(JSStackCheck) \ V(JSGeneratorRestoreInputOrDebugPos) \
V(JSStackCheck) \
V(JSDebugger) V(JSDebugger)
#define JS_OP_LIST(V) \ #define JS_OP_LIST(V) \
......
...@@ -1826,6 +1826,10 @@ Type* Typer::Visitor::TypeJSGeneratorRestoreRegister(Node* node) { ...@@ -1826,6 +1826,10 @@ Type* Typer::Visitor::TypeJSGeneratorRestoreRegister(Node* node) {
return Type::Any(); return Type::Any();
} }
Type* Typer::Visitor::TypeJSGeneratorRestoreInputOrDebugPos(Node* node) {
return Type::Any();
}
Type* Typer::Visitor::TypeJSStackCheck(Node* node) { return Type::Any(); } Type* Typer::Visitor::TypeJSStackCheck(Node* node) { return Type::Any(); }
Type* Typer::Visitor::TypeJSDebugger(Node* node) { return Type::Any(); } Type* Typer::Visitor::TypeJSDebugger(Node* node) { return Type::Any(); }
......
...@@ -835,6 +835,10 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) { ...@@ -835,6 +835,10 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
CheckTypeIs(node, Type::Any()); CheckTypeIs(node, Type::Any());
break; break;
case IrOpcode::kJSGeneratorRestoreInputOrDebugPos:
CheckTypeIs(node, Type::Any());
break;
case IrOpcode::kJSStackCheck: case IrOpcode::kJSStackCheck:
case IrOpcode::kJSDebugger: case IrOpcode::kJSDebugger:
// Type is empty. // Type is empty.
......
...@@ -1277,10 +1277,10 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::RestoreGeneratorState( ...@@ -1277,10 +1277,10 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::RestoreGeneratorState(
return *this; return *this;
} }
BytecodeArrayBuilder& BytecodeArrayBuilder::RestoreGeneratorRegisters( BytecodeArrayBuilder& BytecodeArrayBuilder::ResumeGenerator(
Register generator, RegisterList registers) { Register generator, Register generator_state, RegisterList registers) {
OutputRestoreGeneratorRegisters(generator, registers, OutputResumeGenerator(generator, generator_state, registers,
registers.register_count()); registers.register_count());
return *this; return *this;
} }
......
...@@ -431,8 +431,9 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final { ...@@ -431,8 +431,9 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
RegisterList registers, RegisterList registers,
int suspend_id); int suspend_id);
BytecodeArrayBuilder& RestoreGeneratorState(Register generator); BytecodeArrayBuilder& RestoreGeneratorState(Register generator);
BytecodeArrayBuilder& RestoreGeneratorRegisters(Register generator, BytecodeArrayBuilder& ResumeGenerator(Register generator,
RegisterList registers); Register generator_state,
RegisterList registers);
// Exception handling. // Exception handling.
BytecodeArrayBuilder& MarkHandler(int handler_id, BytecodeArrayBuilder& MarkHandler(int handler_id,
......
...@@ -2885,19 +2885,10 @@ void BytecodeGenerator::BuildSuspendPoint(int suspend_id) { ...@@ -2885,19 +2885,10 @@ void BytecodeGenerator::BuildSuspendPoint(int suspend_id) {
// Upon resume, we continue here. // Upon resume, we continue here.
builder()->Bind(generator_jump_table_, suspend_id); builder()->Bind(generator_jump_table_, suspend_id);
// Clobbers all registers. // Clobbers all registers, updating the state to indicate that we have
builder()->RestoreGeneratorRegisters(generator_object(), registers); // finished resuming and setting the accumulator to the [[input_or_debug_pos]]
// slot of the generator object.
// Update state to indicate that we have finished resuming. Loop headers builder()->ResumeGenerator(generator_object(), generator_state_, registers);
// rely on this.
builder()
->LoadLiteral(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting))
.StoreAccumulatorInRegister(generator_state_);
// When resuming execution of a generator, module or async function, the sent
// value is in the [[input_or_debug_pos]] slot.
builder()->CallRuntime(Runtime::kInlineGeneratorGetInputOrDebugPos,
generator_object());
} }
void BytecodeGenerator::VisitYield(Yield* expr) { void BytecodeGenerator::VisitYield(Yield* expr) {
......
...@@ -67,7 +67,7 @@ class V8_EXPORT_PRIVATE BytecodeRegisterOptimizer final ...@@ -67,7 +67,7 @@ class V8_EXPORT_PRIVATE BytecodeRegisterOptimizer final
if (Bytecodes::IsJump(bytecode) || Bytecodes::IsSwitch(bytecode) || if (Bytecodes::IsJump(bytecode) || Bytecodes::IsSwitch(bytecode) ||
bytecode == Bytecode::kDebugger || bytecode == Bytecode::kDebugger ||
bytecode == Bytecode::kSuspendGenerator || bytecode == Bytecode::kSuspendGenerator ||
bytecode == Bytecode::kRestoreGeneratorRegisters) { bytecode == Bytecode::kResumeGenerator) {
// All state must be flushed before emitting // All state must be flushed before emitting
// - a jump bytecode (as the register equivalents at the jump target // - a jump bytecode (as the register equivalents at the jump target
// aren't known) // aren't known)
......
...@@ -317,8 +317,8 @@ namespace interpreter { ...@@ -317,8 +317,8 @@ namespace interpreter {
V(RestoreGeneratorState, AccumulatorUse::kWrite, OperandType::kReg) \ V(RestoreGeneratorState, AccumulatorUse::kWrite, OperandType::kReg) \
V(SuspendGenerator, AccumulatorUse::kNone, OperandType::kReg, \ V(SuspendGenerator, AccumulatorUse::kNone, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kUImm) \ OperandType::kRegList, OperandType::kRegCount, OperandType::kUImm) \
V(RestoreGeneratorRegisters, AccumulatorUse::kNone, OperandType::kReg, \ V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegOutList, OperandType::kRegCount) \ OperandType::kRegOut, OperandType::kRegOutList, OperandType::kRegCount) \
\ \
/* Debugger */ \ /* Debugger */ \
V(Debugger, AccumulatorUse::kNone) \ V(Debugger, AccumulatorUse::kNone) \
......
...@@ -3143,18 +3143,20 @@ IGNITION_HANDLER(RestoreGeneratorState, InterpreterAssembler) { ...@@ -3143,18 +3143,20 @@ IGNITION_HANDLER(RestoreGeneratorState, InterpreterAssembler) {
Dispatch(); Dispatch();
} }
// RestoreGeneratorRegisters <generator> <first output register> <register // ResumeGenerator <generator> <generator_state> <first output
// count> // register> <register count>
// //
// Imports the register file stored in the generator. // Imports the register file stored in the generator and marks the generator
IGNITION_HANDLER(RestoreGeneratorRegisters, InterpreterAssembler) { // state as executing.
IGNITION_HANDLER(ResumeGenerator, InterpreterAssembler) {
Node* generator_reg = BytecodeOperandReg(0); Node* generator_reg = BytecodeOperandReg(0);
// Bytecode operand 1 is the start register. It should always be 0, so let's Node* generator_state_reg = BytecodeOperandReg(1);
// Bytecode operand 2 is the start register. It should always be 0, so let's
// ignore it. // ignore it.
CSA_ASSERT(this, WordEqual(BytecodeOperandReg(1), CSA_ASSERT(this, WordEqual(BytecodeOperandReg(2),
IntPtrConstant(Register(0).ToOperand()))); IntPtrConstant(Register(0).ToOperand())));
// Bytecode operand 2 is the number of registers to store to the generator. // Bytecode operand 3 is the number of registers to store to the generator.
Node* register_count = ChangeUint32ToWord(BytecodeOperandCount(2)); Node* register_count = ChangeUint32ToWord(BytecodeOperandCount(3));
Node* generator = LoadRegister(generator_reg); Node* generator = LoadRegister(generator_reg);
...@@ -3162,6 +3164,15 @@ IGNITION_HANDLER(RestoreGeneratorRegisters, InterpreterAssembler) { ...@@ -3162,6 +3164,15 @@ IGNITION_HANDLER(RestoreGeneratorRegisters, InterpreterAssembler) {
LoadObjectField(generator, JSGeneratorObject::kRegisterFileOffset), LoadObjectField(generator, JSGeneratorObject::kRegisterFileOffset),
register_count); register_count);
// Since we're resuming, update the generator state to indicate that the
// generator is now executing.
StoreRegister(SmiConstant(JSGeneratorObject::kGeneratorExecuting),
generator_state_reg);
// Return the generator's input_or_debug_pos in the accumulator.
SetAccumulator(
LoadObjectField(generator, JSGeneratorObject::kInputOrDebugPosOffset));
Dispatch(); Dispatch();
} }
......
...@@ -619,7 +619,7 @@ snippet: " ...@@ -619,7 +619,7 @@ snippet: "
" "
frame size: 19 frame size: 19
parameter count: 2 parameter count: 2
bytecode array length: 327 bytecode array length: 320
bytecodes: [ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -642,10 +642,7 @@ bytecodes: [ ...@@ -642,10 +642,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(3), R(0), U8(13), U8(0), /* 11 E> */ B(SuspendGenerator), R(3), R(0), U8(13), U8(0),
/* 55 S> */ B(Return), /* 55 S> */ B(Return),
B(RestoreGeneratorRegisters), R(3), R(0), U8(13), B(ResumeGenerator), R(3), R(11), R(0), U8(13),
B(LdaSmi), I8(-2),
B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(13), B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
...@@ -773,9 +770,9 @@ constant pool: [ ...@@ -773,9 +770,9 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE [""], ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
] ]
handlers: [ handlers: [
[85, 203, 211], [78, 196, 204],
[88, 167, 169], [81, 160, 162],
[271, 281, 283], [264, 274, 276],
] ]
--- ---
...@@ -787,7 +784,7 @@ snippet: " ...@@ -787,7 +784,7 @@ snippet: "
" "
frame size: 18 frame size: 18
parameter count: 2 parameter count: 2
bytecode array length: 394 bytecode array length: 380
bytecodes: [ bytecodes: [
B(Ldar), R(2), B(Ldar), R(2),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -810,10 +807,7 @@ bytecodes: [ ...@@ -810,10 +807,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(12), U8(0), /* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(12), U8(0),
/* 49 S> */ B(Return), /* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(12), B(ResumeGenerator), R(2), R(10), R(0), U8(12),
B(LdaSmi), I8(-2),
B(Star), R(10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(12), B(Star), R(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -848,7 +842,7 @@ bytecodes: [ ...@@ -848,7 +842,7 @@ bytecodes: [
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(7), U8(8), B(LdaNamedProperty), R(5), U8(7), U8(8),
B(JumpIfToBooleanTrue), U8(74), B(JumpIfToBooleanTrue), U8(67),
B(LdaNamedProperty), R(5), U8(8), U8(10), B(LdaNamedProperty), R(5), U8(8), U8(10),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
...@@ -862,10 +856,7 @@ bytecodes: [ ...@@ -862,10 +856,7 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(SuspendGenerator), R(2), R(0), U8(16), U8(1), B(SuspendGenerator), R(2), R(0), U8(16), U8(1),
/* 49 S> */ B(Return), /* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(16), B(ResumeGenerator), R(2), R(10), R(0), U8(16),
B(LdaSmi), I8(-2),
B(Star), R(10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(16), B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
...@@ -877,7 +868,7 @@ bytecodes: [ ...@@ -877,7 +868,7 @@ bytecodes: [
B(Jump), U8(58), B(Jump), U8(58),
B(LdaZero), B(LdaZero),
B(Star), R(6), B(Star), R(6),
B(JumpLoop), U8(113), I8(0), B(JumpLoop), U8(106), I8(0),
B(Jump), U8(36), B(Jump), U8(36),
B(Star), R(16), B(Star), R(16),
B(Ldar), R(closure), B(Ldar), R(closure),
...@@ -955,7 +946,7 @@ bytecodes: [ ...@@ -955,7 +946,7 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [37], Smi [37],
Smi [97], Smi [90],
Smi [10], Smi [10],
Smi [7], Smi [7],
SYMBOL_TYPE, SYMBOL_TYPE,
...@@ -973,9 +964,9 @@ constant pool: [ ...@@ -973,9 +964,9 @@ constant pool: [
Smi [9], Smi [9],
] ]
handlers: [ handlers: [
[85, 263, 271], [78, 249, 257],
[88, 227, 229], [81, 213, 215],
[332, 342, 344], [318, 328, 330],
] ]
--- ---
...@@ -1185,7 +1176,7 @@ snippet: " ...@@ -1185,7 +1176,7 @@ snippet: "
" "
frame size: 24 frame size: 24
parameter count: 2 parameter count: 2
bytecode array length: 466 bytecode array length: 459
bytecodes: [ bytecodes: [
B(Ldar), R(2), B(Ldar), R(2),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -1237,7 +1228,7 @@ bytecodes: [ ...@@ -1237,7 +1228,7 @@ bytecodes: [
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(4), U8(8), B(LdaNamedProperty), R(5), U8(4), U8(8),
B(JumpIfToBooleanTrue), U8(72), B(JumpIfToBooleanTrue), U8(65),
B(LdaNamedProperty), R(5), U8(5), U8(10), B(LdaNamedProperty), R(5), U8(5), U8(10),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
...@@ -1251,10 +1242,7 @@ bytecodes: [ ...@@ -1251,10 +1242,7 @@ bytecodes: [
B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3), B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
B(SuspendGenerator), R(2), R(0), U8(21), U8(0), B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
/* 54 S> */ B(Return), /* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(21), B(ResumeGenerator), R(2), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(21), B(Star), R(21),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(22), B(Star), R(22),
...@@ -1265,7 +1253,7 @@ bytecodes: [ ...@@ -1265,7 +1253,7 @@ bytecodes: [
B(ReThrow), B(ReThrow),
B(LdaZero), B(LdaZero),
B(Star), R(6), B(Star), R(6),
B(JumpLoop), U8(111), I8(0), B(JumpLoop), U8(104), I8(0),
B(Jump), U8(40), B(Jump), U8(40),
B(Star), R(21), B(Star), R(21),
B(Ldar), R(closure), B(Ldar), R(closure),
...@@ -1406,10 +1394,10 @@ constant pool: [ ...@@ -1406,10 +1394,10 @@ constant pool: [
Smi [9], Smi [9],
] ]
handlers: [ handlers: [
[54, 425, 433], [54, 418, 426],
[57, 383, 385], [57, 376, 378],
[63, 243, 251], [63, 236, 244],
[66, 203, 205], [66, 196, 198],
[311, 321, 323], [304, 314, 316],
] ]
...@@ -13,7 +13,7 @@ snippet: " ...@@ -13,7 +13,7 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 1 parameter count: 1
bytecode array length: 73 bytecode array length: 66
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -32,10 +32,7 @@ bytecodes: [ ...@@ -32,10 +32,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0), /* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
/* 16 S> */ B(Return), /* 16 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2), B(ResumeGenerator), R(0), R(1), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
...@@ -61,7 +58,7 @@ snippet: " ...@@ -61,7 +58,7 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 1 parameter count: 1
bytecode array length: 118 bytecode array length: 104
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -80,10 +77,7 @@ bytecodes: [ ...@@ -80,10 +77,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0), /* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
/* 25 S> */ B(Return), /* 25 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2), B(ResumeGenerator), R(0), R(1), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -98,10 +92,7 @@ bytecodes: [ ...@@ -98,10 +92,7 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(2), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(2), U8(2),
B(SuspendGenerator), R(0), R(0), U8(2), U8(1), B(SuspendGenerator), R(0), R(0), U8(2), U8(1),
/* 25 S> */ B(Return), /* 25 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2), B(ResumeGenerator), R(0), R(1), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
...@@ -114,7 +105,7 @@ bytecodes: [ ...@@ -114,7 +105,7 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [29], Smi [29],
Smi [74], Smi [67],
Smi [10], Smi [10],
Smi [7], Smi [7],
Smi [10], Smi [10],
...@@ -130,7 +121,7 @@ snippet: " ...@@ -130,7 +121,7 @@ snippet: "
" "
frame size: 17 frame size: 17
parameter count: 1 parameter count: 1
bytecode array length: 388 bytecode array length: 374
bytecodes: [ bytecodes: [
B(Ldar), R(2), B(Ldar), R(2),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -149,10 +140,7 @@ bytecodes: [ ...@@ -149,10 +140,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0), /* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0),
/* 44 S> */ B(Return), /* 44 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(11), B(ResumeGenerator), R(2), R(10), R(0), U8(11),
B(LdaSmi), I8(-2),
B(Star), R(10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(11), B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -187,7 +175,7 @@ bytecodes: [ ...@@ -187,7 +175,7 @@ bytecodes: [
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(8), U8(9), B(LdaNamedProperty), R(5), U8(8), U8(9),
B(JumpIfToBooleanTrue), U8(74), B(JumpIfToBooleanTrue), U8(67),
B(LdaNamedProperty), R(5), U8(9), U8(11), B(LdaNamedProperty), R(5), U8(9), U8(11),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
...@@ -201,10 +189,7 @@ bytecodes: [ ...@@ -201,10 +189,7 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(SuspendGenerator), R(2), R(0), U8(15), U8(1), B(SuspendGenerator), R(2), R(0), U8(15), U8(1),
/* 44 S> */ B(Return), /* 44 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(15), B(ResumeGenerator), R(2), R(10), R(0), U8(15),
B(LdaSmi), I8(-2),
B(Star), R(10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(15), B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
...@@ -216,7 +201,7 @@ bytecodes: [ ...@@ -216,7 +201,7 @@ bytecodes: [
B(Jump), U8(58), B(Jump), U8(58),
B(LdaZero), B(LdaZero),
B(Star), R(6), B(Star), R(6),
B(JumpLoop), U8(113), I8(0), B(JumpLoop), U8(106), I8(0),
B(Jump), U8(36), B(Jump), U8(36),
B(Star), R(15), B(Star), R(15),
B(Ldar), R(closure), B(Ldar), R(closure),
...@@ -294,7 +279,7 @@ bytecodes: [ ...@@ -294,7 +279,7 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [29], Smi [29],
Smi [91], Smi [84],
Smi [10], Smi [10],
Smi [7], Smi [7],
TUPLE2_TYPE, TUPLE2_TYPE,
...@@ -313,9 +298,9 @@ constant pool: [ ...@@ -313,9 +298,9 @@ constant pool: [
Smi [9], Smi [9],
] ]
handlers: [ handlers: [
[77, 257, 265], [70, 243, 251],
[80, 221, 223], [73, 207, 209],
[326, 336, 338], [312, 322, 324],
] ]
--- ---
...@@ -326,7 +311,7 @@ snippet: " ...@@ -326,7 +311,7 @@ snippet: "
" "
frame size: 9 frame size: 9
parameter count: 1 parameter count: 1
bytecode array length: 265 bytecode array length: 251
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -345,10 +330,7 @@ bytecodes: [ ...@@ -345,10 +330,7 @@ bytecodes: [
/* 38 E> */ B(StackCheck), /* 38 E> */ B(StackCheck),
/* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0), /* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
/* 54 S> */ B(Return), /* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2), B(ResumeGenerator), R(0), R(1), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -408,18 +390,15 @@ bytecodes: [ ...@@ -408,18 +390,15 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
B(LdaNamedProperty), R(2), U8(12), U8(24), B(LdaNamedProperty), R(2), U8(12), U8(24),
B(JumpIfToBooleanTrue), U8(33), B(JumpIfToBooleanTrue), U8(26),
B(Ldar), R(2), B(Ldar), R(2),
B(SuspendGenerator), R(0), R(0), U8(8), U8(1), B(SuspendGenerator), R(0), R(0), U8(8), U8(1),
/* 54 S> */ B(Return), /* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(8), B(ResumeGenerator), R(0), R(1), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(3), B(Star), R(3),
B(JumpLoop), U8(139), I8(0), B(JumpLoop), U8(132), I8(0),
B(LdaNamedProperty), R(2), U8(13), U8(26), B(LdaNamedProperty), R(2), U8(13), U8(26),
B(Star), R(4), B(Star), R(4),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
...@@ -432,7 +411,7 @@ bytecodes: [ ...@@ -432,7 +411,7 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [29], Smi [29],
Smi [92], Smi [85],
Smi [10], Smi [10],
Smi [7], Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
......
...@@ -13,7 +13,7 @@ snippet: " ...@@ -13,7 +13,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 2 parameter count: 2
bytecode array length: 91 bytecode array length: 84
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -37,10 +37,7 @@ bytecodes: [ ...@@ -37,10 +37,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
/* 13 S> */ B(Return), /* 13 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(4), B(ResumeGenerator), R(0), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -67,7 +64,7 @@ snippet: " ...@@ -67,7 +64,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 2 parameter count: 2
bytecode array length: 91 bytecode array length: 84
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -91,10 +88,7 @@ bytecodes: [ ...@@ -91,10 +88,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
/* 24 S> */ B(Return), /* 24 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(4), B(ResumeGenerator), R(0), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -123,7 +117,7 @@ snippet: " ...@@ -123,7 +117,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 2 parameter count: 2
bytecode array length: 121 bytecode array length: 114
bytecodes: [ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -147,10 +141,7 @@ bytecodes: [ ...@@ -147,10 +141,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0), /* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
/* 64 S> */ B(Return), /* 64 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(5), B(ResumeGenerator), R(1), R(3), R(0), U8(5),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -193,7 +184,7 @@ snippet: " ...@@ -193,7 +184,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 2 parameter count: 2
bytecode array length: 119 bytecode array length: 112
bytecodes: [ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -217,10 +208,7 @@ bytecodes: [ ...@@ -217,10 +208,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0), /* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
/* 49 S> */ B(Return), /* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(5), B(ResumeGenerator), R(1), R(3), R(0), U8(5),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -261,7 +249,7 @@ snippet: " ...@@ -261,7 +249,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 2 parameter count: 2
bytecode array length: 125 bytecode array length: 118
bytecodes: [ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -288,10 +276,7 @@ bytecodes: [ ...@@ -288,10 +276,7 @@ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0), /* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
/* 49 S> */ B(Return), /* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(5), B(ResumeGenerator), R(1), R(3), R(0), U8(5),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -332,7 +317,7 @@ snippet: " ...@@ -332,7 +317,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 2 parameter count: 2
bytecode array length: 129 bytecode array length: 122
bytecodes: [ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -359,10 +344,7 @@ bytecodes: [ ...@@ -359,10 +344,7 @@ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0), /* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
/* 51 S> */ B(Return), /* 51 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(5), B(ResumeGenerator), R(1), R(3), R(0), U8(5),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -401,7 +383,7 @@ snippet: " ...@@ -401,7 +383,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 2 parameter count: 2
bytecode array length: 104 bytecode array length: 97
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -428,10 +410,7 @@ bytecodes: [ ...@@ -428,10 +410,7 @@ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
/* 32 S> */ B(Return), /* 32 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(4), B(ResumeGenerator), R(0), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -461,7 +440,7 @@ snippet: " ...@@ -461,7 +440,7 @@ snippet: "
" "
frame size: 8 frame size: 8
parameter count: 2 parameter count: 2
bytecode array length: 125 bytecode array length: 118
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -488,10 +467,7 @@ bytecodes: [ ...@@ -488,10 +467,7 @@ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
/* 26 S> */ B(Return), /* 26 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(4), B(ResumeGenerator), R(0), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -531,7 +507,7 @@ snippet: " ...@@ -531,7 +507,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 2 parameter count: 2
bytecode array length: 91 bytecode array length: 84
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -555,10 +531,7 @@ bytecodes: [ ...@@ -555,10 +531,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
/* 30 S> */ B(Return), /* 30 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(4), B(ResumeGenerator), R(0), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -585,7 +558,7 @@ snippet: " ...@@ -585,7 +558,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 2 parameter count: 2
bytecode array length: 91 bytecode array length: 84
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -609,10 +582,7 @@ bytecodes: [ ...@@ -609,10 +582,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
/* 19 S> */ B(Return), /* 19 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(4), B(ResumeGenerator), R(0), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -640,7 +610,7 @@ snippet: " ...@@ -640,7 +610,7 @@ snippet: "
" "
frame size: 9 frame size: 9
parameter count: 2 parameter count: 2
bytecode array length: 118 bytecode array length: 111
bytecodes: [ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -669,10 +639,7 @@ bytecodes: [ ...@@ -669,10 +639,7 @@ bytecodes: [
B(Ldar), R(0), B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0), /* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
/* 45 S> */ B(Return), /* 45 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(5), B(ResumeGenerator), R(0), R(3), R(0), U8(5),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
......
...@@ -272,7 +272,7 @@ snippet: " ...@@ -272,7 +272,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 1 parameter count: 1
bytecode array length: 96 bytecode array length: 89
bytecodes: [ bytecodes: [
B(Ldar), R(2), B(Ldar), R(2),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -291,10 +291,7 @@ bytecodes: [ ...@@ -291,10 +291,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(4), U8(0), /* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(4), U8(0),
/* 62 S> */ B(Return), /* 62 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(4), B(ResumeGenerator), R(2), R(3), R(0), U8(4),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(4), B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
...@@ -333,7 +330,7 @@ snippet: " ...@@ -333,7 +330,7 @@ snippet: "
" "
frame size: 5 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 151 bytecode array length: 137
bytecodes: [ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -352,10 +349,7 @@ bytecodes: [ ...@@ -352,10 +349,7 @@ bytecodes: [
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0), /* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
/* 56 S> */ B(Return), /* 56 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(3), B(ResumeGenerator), R(1), R(2), R(0), U8(3),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(3), B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
...@@ -373,7 +367,7 @@ bytecodes: [ ...@@ -373,7 +367,7 @@ bytecodes: [
B(Abort), U8(15), B(Abort), U8(15),
/* 36 S> */ B(LdaSmi), I8(10), /* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(0), U8(0), /* 36 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(56), B(JumpIfFalse), U8(49),
/* 18 E> */ B(StackCheck), /* 18 E> */ B(StackCheck),
/* 47 S> */ B(LdaFalse), /* 47 S> */ B(LdaFalse),
B(Star), R(4), B(Star), R(4),
...@@ -381,10 +375,7 @@ bytecodes: [ ...@@ -381,10 +375,7 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
B(SuspendGenerator), R(1), R(0), U8(3), U8(1), B(SuspendGenerator), R(1), R(0), U8(3), U8(1),
/* 56 S> */ B(Return), /* 56 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(3), B(ResumeGenerator), R(1), R(2), R(0), U8(3),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(3), B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
...@@ -395,13 +386,13 @@ bytecodes: [ ...@@ -395,13 +386,13 @@ bytecodes: [
/* 44 S> */ B(Ldar), R(0), /* 44 S> */ B(Ldar), R(0),
B(Inc), U8(1), B(Inc), U8(1),
B(Star), R(0), B(Star), R(0),
B(JumpLoop), U8(72), I8(0), B(JumpLoop), U8(65), I8(0),
B(LdaUndefined), B(LdaUndefined),
/* 56 S> */ B(Return), /* 56 S> */ B(Return),
] ]
constant pool: [ constant pool: [
Smi [29], Smi [29],
Smi [60], Smi [53],
Smi [10], Smi [10],
Smi [7], Smi [7],
Smi [36], Smi [36],
...@@ -509,7 +500,7 @@ snippet: " ...@@ -509,7 +500,7 @@ snippet: "
" "
frame size: 12 frame size: 12
parameter count: 1 parameter count: 1
bytecode array length: 231 bytecode array length: 224
bytecodes: [ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
B(JumpIfUndefined), U8(18), B(JumpIfUndefined), U8(18),
...@@ -540,7 +531,7 @@ bytecodes: [ ...@@ -540,7 +531,7 @@ bytecodes: [
B(Abort), U8(15), B(Abort), U8(15),
/* 41 S> */ B(LdaSmi), I8(10), /* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(0), U8(0), /* 41 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(59), B(JumpIfFalse), U8(52),
/* 23 E> */ B(StackCheck), /* 23 E> */ B(StackCheck),
/* 52 S> */ B(Mov), R(1), R(8), /* 52 S> */ B(Mov), R(1), R(8),
B(Mov), R(0), R(9), B(Mov), R(0), R(9),
...@@ -548,10 +539,7 @@ bytecodes: [ ...@@ -548,10 +539,7 @@ bytecodes: [
B(CallJSRuntime), U8(%async_function_await_uncaught), R(8), U8(3), B(CallJSRuntime), U8(%async_function_await_uncaught), R(8), U8(3),
B(SuspendGenerator), R(1), R(0), U8(8), U8(0), B(SuspendGenerator), R(1), R(0), U8(8), U8(0),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(8), B(ResumeGenerator), R(1), R(3), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
B(Star), R(8), B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(Star), R(9), B(Star), R(9),
...@@ -563,7 +551,7 @@ bytecodes: [ ...@@ -563,7 +551,7 @@ bytecodes: [
/* 49 S> */ B(Ldar), R(0), /* 49 S> */ B(Ldar), R(0),
B(Inc), U8(1), B(Inc), U8(1),
B(Star), R(0), B(Star), R(0),
B(JumpLoop), U8(75), I8(0), B(JumpLoop), U8(68), I8(0),
B(LdaUndefined), B(LdaUndefined),
B(Star), R(9), B(Star), R(9),
B(Mov), R(2), R(8), B(Mov), R(2), R(8),
...@@ -624,7 +612,7 @@ constant pool: [ ...@@ -624,7 +612,7 @@ constant pool: [
Smi [9], Smi [9],
] ]
handlers: [ handlers: [
[46, 190, 198], [46, 183, 191],
[49, 148, 150], [49, 141, 143],
] ]
...@@ -386,7 +386,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -386,7 +386,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
// Emit generator operations. // Emit generator operations.
builder.SuspendGenerator(reg, reg_list, 0) builder.SuspendGenerator(reg, reg_list, 0)
.RestoreGeneratorState(reg) .RestoreGeneratorState(reg)
.RestoreGeneratorRegisters(reg, reg_list); .ResumeGenerator(reg, reg, reg_list);
// Intrinsics handled by the interpreter. // Intrinsics handled by the interpreter.
builder.CallRuntime(Runtime::kInlineIsArray, reg_list); builder.CallRuntime(Runtime::kInlineIsArray, reg_list);
......
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