Commit 4fe1d715 authored by Caitlin Potter's avatar Caitlin Potter Committed by Commit Bot

[interpreter] make `suspend_id` an immediate operand to SuspendGenerator

Remove need for shuffling of accumulator and operand registers when
suspending a generator

BUG=v8:6351
TBR=bmeurer@chromium.org

Change-Id: I372509adc03b9781716412b809639554fe16e372
Reviewed-on: https://chromium-review.googlesource.com/578377
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: 's avatarCaitlin Potter <caitp@igalia.com>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46883}
parent 832e5b9f
......@@ -2355,7 +2355,6 @@ void BytecodeGraphBuilder::VisitForInStep() {
}
void BytecodeGraphBuilder::VisitSuspendGenerator() {
Node* state = environment()->LookupAccumulator();
Node* generator = environment()->LookupRegister(
bytecode_iterator().GetRegisterOperand(0));
interpreter::Register first_reg = bytecode_iterator().GetRegisterOperand(1);
......@@ -2363,6 +2362,8 @@ void BytecodeGraphBuilder::VisitSuspendGenerator() {
CHECK_EQ(0, first_reg.index());
int register_count =
static_cast<int>(bytecode_iterator().GetRegisterCountOperand(2));
Node* suspend_id = jsgraph()->SmiConstant(
bytecode_iterator().GetUnsignedImmediateOperand(3));
// The offsets used by the bytecode iterator are relative to a different base
// than what is used in the interpreter, hence the addition.
......@@ -2374,7 +2375,7 @@ void BytecodeGraphBuilder::VisitSuspendGenerator() {
Node** value_inputs = local_zone()->NewArray<Node*>(value_input_count);
value_inputs[0] = generator;
value_inputs[1] = state;
value_inputs[1] = suspend_id;
value_inputs[2] = offset;
for (int i = 0; i < register_count; ++i) {
value_inputs[3 + i] =
......
......@@ -1245,8 +1245,9 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadModuleVariable(int cell_index,
}
BytecodeArrayBuilder& BytecodeArrayBuilder::SuspendGenerator(
Register generator, RegisterList registers) {
OutputSuspendGenerator(generator, registers, registers.register_count());
Register generator, RegisterList registers, int suspend_id) {
OutputSuspendGenerator(generator, registers, registers.register_count(),
suspend_id);
return *this;
}
......
......@@ -404,7 +404,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final
// Generators.
BytecodeArrayBuilder& SuspendGenerator(Register generator,
RegisterList registers);
RegisterList registers,
int suspend_id);
BytecodeArrayBuilder& RestoreGeneratorState(Register generator);
BytecodeArrayBuilder& RestoreGeneratorRegisters(Register generator,
RegisterList registers);
......
......@@ -2564,17 +2564,9 @@ void BytecodeGenerator::VisitAssignment(Assignment* expr) {
// accumulator.
void BytecodeGenerator::BuildSuspendPoint(int suspend_id) {
RegisterList registers(0, register_allocator()->next_register_index());
RegisterAllocationScope reg_scope(this);
// TODO(caitp): eliminate register to hold output by making SuspendGenerator
// take an immediate input.
Register output = register_allocator()->NewRegister();
// Save context, registers, and state. Then return.
builder()
->StoreAccumulatorInRegister(output)
.LoadLiteral(Smi::FromInt(suspend_id))
.SuspendGenerator(generator_object_, registers)
.LoadAccumulatorWithRegister(output);
builder()->SuspendGenerator(generator_object_, registers, suspend_id);
builder()->SetReturnPosition(kNoSourcePosition, info()->literal());
builder()->Return(); // Hard return (ignore any finally blocks).
......
......@@ -310,8 +310,8 @@ namespace interpreter {
\
/* Generators */ \
V(RestoreGeneratorState, AccumulatorUse::kWrite, OperandType::kReg) \
V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \
V(SuspendGenerator, AccumulatorUse::kNone, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kUImm) \
V(RestoreGeneratorRegisters, AccumulatorUse::kNone, OperandType::kReg, \
OperandType::kRegOutList, OperandType::kRegCount) \
\
......
......@@ -440,6 +440,10 @@ Node* InterpreterAssembler::BytecodeOperandUImmWord(int operand_index) {
return ChangeUint32ToWord(BytecodeOperandUImm(operand_index));
}
Node* InterpreterAssembler::BytecodeOperandUImmSmi(int operand_index) {
return SmiFromWord32(BytecodeOperandUImm(operand_index));
}
Node* InterpreterAssembler::BytecodeOperandImm(int operand_index) {
DCHECK_EQ(OperandType::kImm,
Bytecodes::GetOperandType(bytecode_, operand_index));
......
......@@ -45,6 +45,9 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// Returns the word-size unsigned immediate for bytecode operand
// |operand_index| in the current bytecode.
compiler::Node* BytecodeOperandUImmWord(int operand_index);
// Returns the unsigned smi immediate for bytecode operand |operand_index| in
// the current bytecode.
compiler::Node* BytecodeOperandUImmSmi(int operand_index);
// Returns the 32-bit signed immediate for bytecode operand |operand_index|
// in the current bytecode.
compiler::Node* BytecodeOperandImm(int operand_index);
......
......@@ -3223,10 +3223,11 @@ IGNITION_HANDLER(ExtraWide, InterpreterAssembler) {
IGNITION_HANDLER(Illegal, InterpreterAssembler) { Abort(kInvalidBytecode); }
// SuspendGenerator <generator> <first input register> <register count>
// <suspend_id>
//
// Exports the register file and stores it into the generator. Also stores the
// current context, the state given in the accumulator, and the current bytecode
// offset (for debugging purposes) into the generator.
// current context, |suspend_id|, and the current bytecode offset (for debugging
// purposes) into the generator.
IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
Node* generator_reg = BytecodeOperandReg(0);
......@@ -3245,7 +3246,7 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
Node* array =
LoadObjectField(generator, JSGeneratorObject::kRegisterFileOffset);
Node* context = GetContext();
Node* state = GetAccumulator();
Node* suspend_id = BytecodeOperandUImmSmi(3);
// Bytecode operand 1 should be always 0 (we are always store registers
// from the beginning).
......@@ -3255,7 +3256,8 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
Node* register_count = ChangeUint32ToWord(BytecodeOperandCount(2));
ExportRegisterFile(array, register_count);
StoreObjectField(generator, JSGeneratorObject::kContextOffset, context);
StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, state);
StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
suspend_id);
// Store the bytecode offset in the [input_or_debug_pos] field, to be used by
// the inspector.
......
......@@ -14,7 +14,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 219
bytecode array length: 216
bytecodes: [
B(Mov), R(new_target), R(1),
B(Ldar), R(new_target),
......@@ -37,10 +37,8 @@ bytecodes: [
B(Star), R(1),
B(Mov), R(context), R(5),
B(Mov), R(context), R(6),
B(LdaZero),
B(Mov), R(0), R(7),
/* 17 E> */ B(SuspendGenerator), R(1), R(0), U8(7),
B(Ldar), R(7),
B(Ldar), R(0),
/* 17 E> */ B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
/* 22 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(7),
B(LdaSmi), I8(-2),
......@@ -114,7 +112,7 @@ bytecodes: [
/* 22 S> */ B(Return),
]
constant pool: [
Smi [49],
Smi [46],
Smi [15],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
......@@ -124,8 +122,8 @@ constant pool: [
Smi [35],
]
handlers: [
[52, 146, 152],
[55, 107, 109],
[52, 143, 149],
[55, 104, 106],
]
---
......@@ -135,7 +133,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 277
bytecode array length: 269
bytecodes: [
B(Mov), R(new_target), R(1),
B(Ldar), R(new_target),
......@@ -158,10 +156,8 @@ bytecodes: [
B(Star), R(1),
B(Mov), R(context), R(5),
B(Mov), R(context), R(6),
B(LdaZero),
B(Mov), R(0), R(7),
/* 17 E> */ B(SuspendGenerator), R(1), R(0), U8(7),
B(Ldar), R(7),
B(Ldar), R(0),
/* 17 E> */ B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
/* 31 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(7),
B(LdaSmi), I8(-2),
......@@ -175,17 +171,14 @@ bytecodes: [
B(LdaZero),
B(Star), R(3),
B(Mov), R(7), R(4),
B(Jump), U8(119),
B(Jump), U8(114),
/* 22 S> */ B(LdaSmi), I8(42),
B(Star), R(8),
B(LdaFalse),
B(Star), R(9),
B(Mov), R(1), R(7),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(7), U8(3),
B(Star), R(7),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(1), R(0), U8(7),
B(Ldar), R(7),
B(SuspendGenerator), R(1), R(0), U8(7), U8(1),
/* 31 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(7),
B(LdaSmi), I8(-2),
......@@ -259,8 +252,8 @@ bytecodes: [
/* 31 S> */ B(Return),
]
constant pool: [
Smi [49],
Smi [107],
Smi [46],
Smi [99],
Smi [15],
Smi [7],
Smi [15],
......@@ -272,8 +265,8 @@ constant pool: [
Smi [35],
]
handlers: [
[52, 204, 210],
[55, 165, 167],
[52, 196, 202],
[55, 157, 159],
]
---
......@@ -283,7 +276,7 @@ snippet: "
"
frame size: 23
parameter count: 1
bytecode array length: 573
bytecode array length: 565
bytecodes: [
B(Mov), R(new_target), R(10),
B(Ldar), R(new_target),
......@@ -306,10 +299,8 @@ bytecodes: [
B(Star), R(10),
B(Mov), R(context), R(14),
B(Mov), R(context), R(15),
B(LdaZero),
B(Mov), R(2), R(16),
/* 17 E> */ B(SuspendGenerator), R(10), R(0), U8(16),
B(Ldar), R(16),
B(Ldar), R(2),
/* 17 E> */ B(SuspendGenerator), R(10), R(0), U8(16), U8(0),
/* 50 S> */ B(Return),
B(RestoreGeneratorRegisters), R(10), R(0), U8(16),
B(LdaSmi), I8(-2),
......@@ -355,7 +346,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(8), U8(13),
B(JumpIfToBooleanTrue), U8(82),
B(JumpIfToBooleanTrue), U8(77),
B(LdaNamedProperty), R(5), U8(9), U8(15),
B(Star), R(7),
B(LdaSmi), I8(2),
......@@ -368,10 +359,7 @@ bytecodes: [
B(Mov), R(10), R(20),
B(Mov), R(0), R(21),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(20), U8(3),
B(Star), R(20),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(10), R(0), U8(20),
B(Ldar), R(20),
B(SuspendGenerator), R(10), R(0), U8(20), U8(1),
/* 50 S> */ B(Return),
B(RestoreGeneratorRegisters), R(10), R(0), U8(20),
B(LdaSmi), I8(-2),
......@@ -388,7 +376,7 @@ bytecodes: [
B(Jump), U8(60),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(128), I8(0),
B(JumpLoop), U8(123), I8(0),
B(Jump), U8(40),
B(Star), R(20),
B(Ldar), R(closure),
......@@ -530,13 +518,13 @@ bytecodes: [
/* 50 S> */ B(Return),
]
constant pool: [
Smi [49],
Smi [119],
Smi [46],
Smi [116],
Smi [15],
Smi [7],
TUPLE2_TYPE,
SYMBOL_TYPE,
Smi [90],
Smi [85],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -550,17 +538,17 @@ constant pool: [
Smi [6],
Smi [14],
FIXED_ARRAY_TYPE,
Smi [415],
Smi [410],
Smi [6],
Smi [28],
Smi [35],
]
handlers: [
[52, 500, 506],
[55, 461, 463],
[108, 307, 313],
[111, 267, 269],
[374, 384, 386],
[52, 492, 498],
[55, 453, 455],
[105, 299, 305],
[108, 259, 261],
[366, 376, 378],
]
---
......@@ -571,7 +559,7 @@ snippet: "
"
frame size: 19
parameter count: 1
bytecode array length: 897
bytecode array length: 864
bytecodes: [
B(Mov), R(new_target), R(9),
B(Ldar), R(new_target),
......@@ -594,10 +582,8 @@ bytecodes: [
B(Star), R(9),
B(Mov), R(context), R(13),
B(Mov), R(context), R(14),
B(LdaZero),
B(Mov), R(0), R(15),
/* 44 E> */ B(SuspendGenerator), R(9), R(0), U8(15),
B(Ldar), R(15),
B(Ldar), R(0),
/* 44 E> */ B(SuspendGenerator), R(9), R(0), U8(15), U8(0),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(15),
B(LdaSmi), I8(-2),
......@@ -650,10 +636,10 @@ bytecodes: [
B(JumpIfTrue), U8(18),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(15), U8(24),
B(JumpIfTrue), U8(88),
B(JumpIfTrue), U8(83),
B(LdaSmi), I8(2),
B(TestEqualStrict), R(15), U8(33),
B(JumpIfTrue), U8(177),
B(JumpIfTrue), U8(167),
B(JumpConstant), U8(24),
B(LdaNamedProperty), R(4), U8(18), U8(18),
B(Star), R(16),
......@@ -661,10 +647,7 @@ bytecodes: [
B(Star), R(17),
B(Mov), R(9), R(16),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(16), U8(2),
B(Star), R(16),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(9), R(0), U8(16),
B(Ldar), R(16),
B(SuspendGenerator), R(9), R(0), U8(16), U8(1),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(16),
B(LdaSmi), I8(-2),
......@@ -699,10 +682,7 @@ bytecodes: [
B(Star), R(17),
B(Mov), R(9), R(16),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(16), U8(2),
B(Star), R(16),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(9), R(0), U8(16),
B(Ldar), R(16),
B(SuspendGenerator), R(9), R(0), U8(16), U8(2),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(16),
B(LdaSmi), I8(-2),
......@@ -725,17 +705,17 @@ bytecodes: [
B(LdaNamedProperty), R(4), U8(20), U8(25),
B(Star), R(5),
B(TestUndetectable),
B(JumpIfFalse), U8(222),
B(JumpIfFalse), U8(212),
B(LdaNamedProperty), R(4), U8(19), U8(28),
B(Star), R(6),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(195),
B(Jump), U8(185),
B(LdaZero),
B(Star), R(16),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(16), U8(31),
B(JumpIfFalse), U8(111),
B(JumpIfFalse), U8(106),
B(Ldar), R(6),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
......@@ -753,10 +733,7 @@ bytecodes: [
B(Star), R(18),
B(Mov), R(9), R(17),
B(CallJSRuntime), U8(%async_generator_await_caught), R(17), U8(2),
B(Star), R(17),
B(LdaSmi), I8(3),
B(SuspendGenerator), R(9), R(0), U8(17),
B(Ldar), R(17),
B(SuspendGenerator), R(9), R(0), U8(17), U8(3),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(17),
B(LdaSmi), I8(-2),
......@@ -781,17 +758,14 @@ bytecodes: [
B(Ldar), R(16),
B(PushContext), R(17),
B(PopContext), R(17),
B(Jump), U8(76),
B(Jump), U8(71),
B(Mov), R(6), R(16),
B(Mov), R(4), R(17),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
B(Star), R(17),
B(Mov), R(9), R(16),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(16), U8(2),
B(Star), R(16),
B(LdaSmi), I8(4),
B(SuspendGenerator), R(9), R(0), U8(16),
B(Ldar), R(16),
B(SuspendGenerator), R(9), R(0), U8(16), U8(4),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(16),
B(LdaSmi), I8(-2),
......@@ -823,10 +797,7 @@ bytecodes: [
B(Star), R(17),
B(Mov), R(9), R(16),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(16), U8(2),
B(Star), R(16),
B(LdaSmi), I8(5),
B(SuspendGenerator), R(9), R(0), U8(16),
B(Ldar), R(16),
B(SuspendGenerator), R(9), R(0), U8(16), U8(5),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(16),
B(LdaSmi), I8(-2),
......@@ -848,7 +819,7 @@ bytecodes: [
B(Jump), U8(2),
B(LdaNamedProperty), R(3), U8(27), U8(34),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(62),
B(Jump), U8(57),
B(LdaNamedProperty), R(3), U8(28), U8(36),
B(Star), R(3),
B(LdaFalse),
......@@ -856,10 +827,7 @@ bytecodes: [
B(Mov), R(9), R(15),
B(Mov), R(3), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(15), U8(3),
B(Star), R(15),
B(LdaSmi), I8(6),
B(SuspendGenerator), R(9), R(0), U8(15),
B(Ldar), R(15),
B(SuspendGenerator), R(9), R(0), U8(15), U8(6),
/* 60 S> */ B(Return),
B(RestoreGeneratorRegisters), R(9), R(0), U8(15),
B(LdaSmi), I8(-2),
......@@ -869,7 +837,7 @@ bytecodes: [
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(2),
B(Wide), B(JumpLoop), U16(591), I16(0),
B(Wide), B(JumpLoop), U16(561), I16(0),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(2), U8(38),
B(JumpIfFalse), U8(13),
......@@ -939,45 +907,45 @@ bytecodes: [
/* 60 S> */ B(Return),
]
constant pool: [
Smi [49],
Smi [140],
Smi [140],
Smi [140],
Smi [140],
Smi [140],
Smi [140],
Smi [46],
Smi [137],
Smi [137],
Smi [137],
Smi [137],
Smi [137],
Smi [137],
Smi [15],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
SYMBOL_TYPE,
SYMBOL_TYPE,
Smi [76],
Smi [172],
Smi [305],
Smi [387],
Smi [480],
Smi [564],
Smi [71],
Smi [162],
Smi [290],
Smi [367],
Smi [455],
Smi [534],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
Smi [483],
Smi [406],
Smi [310],
Smi [458],
Smi [386],
Smi [295],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
FIXED_ARRAY_TYPE,
Smi [739],
Smi [540],
Smi [709],
Smi [515],
Smi [6],
Smi [28],
Smi [35],
]
handlers: [
[52, 824, 830],
[55, 785, 787],
[434, 494, 496],
[52, 791, 797],
[55, 752, 754],
[421, 476, 478],
]
......@@ -16,7 +16,7 @@ snippet: "
"
frame size: 24
parameter count: 1
bytecode array length: 637
bytecode array length: 623
bytecodes: [
B(Mov), R(new_target), R(11),
B(Ldar), R(new_target),
......@@ -79,10 +79,7 @@ bytecodes: [
B(Mov), R(11), R(21),
B(Mov), R(10), R(23),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
B(Star), R(21),
B(LdaZero),
B(SuspendGenerator), R(11), R(0), U8(21),
B(Ldar), R(21),
B(SuspendGenerator), R(11), R(0), U8(21), U8(0),
/* 57 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
......@@ -112,7 +109,7 @@ bytecodes: [
B(Mov), R(3), R(0),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(122), I8(0),
B(JumpLoop), U8(118), I8(0),
B(Jump), U8(40),
B(Star), R(21),
B(Ldar), R(closure),
......@@ -142,15 +139,15 @@ bytecodes: [
B(Star), R(19),
B(LdaZero),
B(TestEqualStrict), R(6), U8(22),
B(JumpIfTrue), U8(209),
B(JumpIfTrue), U8(199),
B(LdaNamedProperty), R(4), U8(12), U8(23),
B(Star), R(8),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(198),
B(Jump), U8(188),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(6), U8(26),
B(JumpIfFalse), U8(114),
B(JumpIfFalse), U8(109),
B(Ldar), R(8),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
......@@ -169,10 +166,7 @@ bytecodes: [
B(Mov), R(11), R(21),
B(Mov), R(10), R(23),
B(CallJSRuntime), U8(%async_function_await_caught), R(21), U8(3),
B(Star), R(21),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(11), R(0), U8(21),
B(Ldar), R(21),
B(SuspendGenerator), R(11), R(0), U8(21), U8(1),
/* 57 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
......@@ -197,7 +191,7 @@ bytecodes: [
B(Ldar), R(20),
B(PushContext), R(21),
B(PopContext), R(21),
B(Jump), U8(79),
B(Jump), U8(74),
B(Mov), R(8), R(20),
B(Mov), R(4), R(21),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
......@@ -205,10 +199,7 @@ bytecodes: [
B(Mov), R(11), R(20),
B(Mov), R(10), R(22),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
B(Star), R(20),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(11), R(0), U8(20),
B(Ldar), R(20),
B(SuspendGenerator), R(11), R(0), U8(20), U8(2),
/* 57 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(20),
B(LdaSmi), I8(-2),
......@@ -293,12 +284,12 @@ bytecodes: [
]
constant pool: [
Smi [105],
Smi [369],
Smi [454],
Smi [360],
Smi [440],
TUPLE2_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
Smi [51],
Smi [47],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -312,11 +303,11 @@ constant pool: [
Smi [9],
]
handlers: [
[62, 592, 598],
[65, 547, 549],
[74, 287, 293],
[77, 247, 249],
[353, 416, 418],
[62, 578, 584],
[65, 533, 535],
[74, 283, 289],
[77, 243, 245],
[349, 407, 409],
]
---
......@@ -328,7 +319,7 @@ snippet: "
"
frame size: 24
parameter count: 1
bytecode array length: 669
bytecode array length: 655
bytecodes: [
B(Mov), R(new_target), R(11),
B(Ldar), R(new_target),
......@@ -391,10 +382,7 @@ bytecodes: [
B(Mov), R(11), R(21),
B(Mov), R(10), R(23),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
B(Star), R(21),
B(LdaZero),
B(SuspendGenerator), R(11), R(0), U8(21),
B(Ldar), R(21),
B(SuspendGenerator), R(11), R(0), U8(21), U8(0),
/* 68 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
......@@ -455,15 +443,15 @@ bytecodes: [
B(Star), R(19),
B(LdaZero),
B(TestEqualStrict), R(6), U8(22),
B(JumpIfTrue), U8(209),
B(JumpIfTrue), U8(199),
B(LdaNamedProperty), R(4), U8(12), U8(23),
B(Star), R(8),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(198),
B(Jump), U8(188),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(6), U8(26),
B(JumpIfFalse), U8(114),
B(JumpIfFalse), U8(109),
B(Ldar), R(8),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
......@@ -482,10 +470,7 @@ bytecodes: [
B(Mov), R(11), R(21),
B(Mov), R(10), R(23),
B(CallJSRuntime), U8(%async_function_await_caught), R(21), U8(3),
B(Star), R(21),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(11), R(0), U8(21),
B(Ldar), R(21),
B(SuspendGenerator), R(11), R(0), U8(21), U8(1),
/* 68 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
......@@ -510,7 +495,7 @@ bytecodes: [
B(Ldar), R(20),
B(PushContext), R(21),
B(PopContext), R(21),
B(Jump), U8(79),
B(Jump), U8(74),
B(Mov), R(8), R(20),
B(Mov), R(4), R(21),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
......@@ -518,10 +503,7 @@ bytecodes: [
B(Mov), R(11), R(20),
B(Mov), R(10), R(22),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
B(Star), R(20),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(11), R(0), U8(20),
B(Ldar), R(20),
B(SuspendGenerator), R(11), R(0), U8(20), U8(2),
/* 68 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(20),
B(LdaSmi), I8(-2),
......@@ -617,12 +599,12 @@ bytecodes: [
]
constant pool: [
Smi [105],
Smi [372],
Smi [457],
Smi [363],
Smi [443],
TUPLE2_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
Smi [51],
Smi [47],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -639,11 +621,11 @@ constant pool: [
Smi [25],
]
handlers: [
[62, 608, 614],
[65, 562, 564],
[74, 289, 295],
[77, 249, 251],
[356, 419, 421],
[62, 594, 600],
[65, 548, 550],
[74, 285, 291],
[77, 245, 247],
[352, 410, 412],
]
---
......@@ -658,7 +640,7 @@ snippet: "
"
frame size: 24
parameter count: 1
bytecode array length: 655
bytecode array length: 641
bytecodes: [
B(Mov), R(new_target), R(11),
B(Ldar), R(new_target),
......@@ -721,10 +703,7 @@ bytecodes: [
B(Mov), R(11), R(21),
B(Mov), R(10), R(23),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
B(Star), R(21),
B(LdaZero),
B(SuspendGenerator), R(11), R(0), U8(21),
B(Ldar), R(21),
B(SuspendGenerator), R(11), R(0), U8(21), U8(0),
/* 114 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
......@@ -762,7 +741,7 @@ bytecodes: [
/* 103 S> */ B(Jump), U8(8),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(140), I8(0),
B(JumpLoop), U8(136), I8(0),
B(Jump), U8(40),
B(Star), R(21),
B(Ldar), R(closure),
......@@ -792,15 +771,15 @@ bytecodes: [
B(Star), R(19),
B(LdaZero),
B(TestEqualStrict), R(6), U8(24),
B(JumpIfTrue), U8(209),
B(JumpIfTrue), U8(199),
B(LdaNamedProperty), R(4), U8(12), U8(25),
B(Star), R(8),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(198),
B(Jump), U8(188),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(6), U8(28),
B(JumpIfFalse), U8(114),
B(JumpIfFalse), U8(109),
B(Ldar), R(8),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
......@@ -819,10 +798,7 @@ bytecodes: [
B(Mov), R(11), R(21),
B(Mov), R(10), R(23),
B(CallJSRuntime), U8(%async_function_await_caught), R(21), U8(3),
B(Star), R(21),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(11), R(0), U8(21),
B(Ldar), R(21),
B(SuspendGenerator), R(11), R(0), U8(21), U8(1),
/* 114 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(21),
B(LdaSmi), I8(-2),
......@@ -847,7 +823,7 @@ bytecodes: [
B(Ldar), R(20),
B(PushContext), R(21),
B(PopContext), R(21),
B(Jump), U8(79),
B(Jump), U8(74),
B(Mov), R(8), R(20),
B(Mov), R(4), R(21),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
......@@ -855,10 +831,7 @@ bytecodes: [
B(Mov), R(11), R(20),
B(Mov), R(10), R(22),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
B(Star), R(20),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(11), R(0), U8(20),
B(Ldar), R(20),
B(SuspendGenerator), R(11), R(0), U8(20), U8(2),
/* 114 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(20),
B(LdaSmi), I8(-2),
......@@ -943,12 +916,12 @@ bytecodes: [
]
constant pool: [
Smi [105],
Smi [387],
Smi [472],
Smi [378],
Smi [458],
TUPLE2_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
Smi [51],
Smi [47],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -962,11 +935,11 @@ constant pool: [
Smi [9],
]
handlers: [
[62, 610, 616],
[65, 565, 567],
[74, 305, 311],
[77, 265, 267],
[371, 434, 436],
[62, 596, 602],
[65, 551, 553],
[74, 301, 307],
[77, 261, 263],
[367, 425, 427],
]
---
......
......@@ -651,7 +651,7 @@ snippet: "
"
frame size: 20
parameter count: 2
bytecode array length: 360
bytecode array length: 354
bytecodes: [
B(Mov), R(new_target), R(11),
B(Ldar), R(new_target),
......@@ -675,11 +675,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(14), U8(2),
B(Star), R(3),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(3), R(11),
B(Mov), R(3), R(14),
/* 11 E> */ B(SuspendGenerator), R(11), R(0), U8(14),
B(Ldar), R(14),
B(Star), R(11),
/* 11 E> */ B(SuspendGenerator), R(11), R(0), U8(14), U8(0),
/* 55 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(14),
B(LdaSmi), I8(-2),
......@@ -806,7 +803,7 @@ bytecodes: [
/* 55 S> */ B(Return),
]
constant pool: [
Smi [52],
Smi [46],
Smi [10],
Smi [7],
SYMBOL_TYPE,
......@@ -820,9 +817,9 @@ constant pool: [
FIXED_ARRAY_TYPE,
]
handlers: [
[106, 224, 230],
[109, 188, 190],
[290, 300, 302],
[100, 218, 224],
[103, 182, 184],
[284, 294, 296],
]
---
......@@ -834,7 +831,7 @@ snippet: "
"
frame size: 19
parameter count: 2
bytecode array length: 439
bytecode array length: 428
bytecodes: [
B(Mov), R(new_target), R(10),
B(Ldar), R(new_target),
......@@ -858,11 +855,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(2), R(10),
B(Mov), R(2), R(13),
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(13),
B(Ldar), R(13),
B(Star), R(10),
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(13), U8(0),
/* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(10), R(0), U8(13),
B(LdaSmi), I8(-2),
......@@ -906,7 +900,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(7), U8(12),
B(JumpIfToBooleanTrue), U8(79),
B(JumpIfToBooleanTrue), U8(74),
B(LdaNamedProperty), R(5), U8(8), U8(14),
B(Star), R(7),
B(LdaSmi), I8(2),
......@@ -918,10 +912,7 @@ bytecodes: [
B(Star), R(18),
B(Mov), R(0), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(Star), R(17),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(10), R(0), U8(17),
B(Ldar), R(17),
B(SuspendGenerator), R(10), R(0), U8(17), U8(1),
/* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(10), R(0), U8(17),
B(LdaSmi), I8(-2),
......@@ -938,7 +929,7 @@ bytecodes: [
B(Jump), U8(56),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(125), I8(0),
B(JumpLoop), U8(120), I8(0),
B(Jump), U8(36),
B(Star), R(17),
B(Ldar), R(closure),
......@@ -1020,12 +1011,12 @@ bytecodes: [
/* 49 S> */ B(Return),
]
constant pool: [
Smi [52],
Smi [115],
Smi [46],
Smi [109],
Smi [10],
Smi [7],
SYMBOL_TYPE,
Smi [87],
Smi [82],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -1040,9 +1031,9 @@ constant pool: [
Smi [9],
]
handlers: [
[106, 296, 302],
[109, 260, 262],
[363, 373, 375],
[100, 285, 291],
[103, 249, 251],
[352, 362, 364],
]
---
......@@ -1268,7 +1259,7 @@ snippet: "
"
frame size: 25
parameter count: 2
bytecode array length: 518
bytecode array length: 514
bytecodes: [
B(Mov), R(new_target), R(11),
B(Ldar), R(new_target),
......@@ -1330,7 +1321,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(4), U8(12),
B(JumpIfToBooleanTrue), U8(76),
B(JumpIfToBooleanTrue), U8(72),
B(LdaNamedProperty), R(5), U8(5), U8(14),
B(Star), R(7),
B(LdaSmi), I8(2),
......@@ -1342,10 +1333,7 @@ bytecodes: [
B(Mov), R(0), R(23),
B(Mov), R(10), R(24),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(22), U8(3),
B(Star), R(22),
B(LdaZero),
B(SuspendGenerator), R(11), R(0), U8(22),
B(Ldar), R(22),
B(SuspendGenerator), R(11), R(0), U8(22), U8(0),
/* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(11), R(0), U8(22),
B(LdaSmi), I8(-2),
......@@ -1361,7 +1349,7 @@ bytecodes: [
/* 45 E> */ B(ReThrow),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(122), I8(0),
B(JumpLoop), U8(118), I8(0),
B(Jump), U8(40),
B(Star), R(22),
B(Ldar), R(closure),
......@@ -1500,7 +1488,7 @@ bytecodes: [
constant pool: [
Smi [91],
SYMBOL_TYPE,
Smi [89],
Smi [85],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -1514,10 +1502,10 @@ constant pool: [
Smi [9],
]
handlers: [
[70, 473, 479],
[73, 428, 430],
[82, 273, 279],
[85, 233, 235],
[339, 349, 351],
[70, 469, 475],
[73, 424, 426],
[82, 269, 275],
[85, 229, 231],
[335, 345, 347],
]
......@@ -13,7 +13,7 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 91
bytecode array length: 85
bytecodes: [
B(Mov), R(new_target), R(1),
B(Ldar), R(new_target),
......@@ -33,11 +33,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(0), R(1),
B(Mov), R(0), R(3),
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3),
B(Ldar), R(3),
B(Star), R(1),
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
/* 16 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -54,7 +51,7 @@ bytecodes: [
/* 16 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [38],
Smi [10],
Smi [7],
]
......@@ -68,7 +65,7 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 141
bytecode array length: 130
bytecodes: [
B(Mov), R(new_target), R(1),
B(Ldar), R(new_target),
......@@ -88,11 +85,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(0), R(1),
B(Mov), R(0), R(3),
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3),
B(Ldar), R(3),
B(Star), R(1),
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
/* 25 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -110,10 +104,7 @@ bytecodes: [
B(LdaFalse),
B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
B(Star), R(3),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(1), R(0), U8(3),
B(Ldar), R(3),
B(SuspendGenerator), R(1), R(0), U8(3), U8(1),
/* 25 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -130,8 +121,8 @@ bytecodes: [
/* 25 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [94],
Smi [38],
Smi [83],
Smi [10],
Smi [7],
Smi [10],
......@@ -147,7 +138,7 @@ snippet: "
"
frame size: 18
parameter count: 1
bytecode array length: 433
bytecode array length: 422
bytecodes: [
B(Mov), R(new_target), R(10),
B(Ldar), R(new_target),
......@@ -167,11 +158,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(2), R(10),
B(Mov), R(2), R(12),
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(12),
B(Ldar), R(12),
B(Star), R(10),
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(12), U8(0),
/* 44 S> */ B(Return),
B(RestoreGeneratorRegisters), R(10), R(0), U8(12),
B(LdaSmi), I8(-2),
......@@ -215,7 +203,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(8), U8(13),
B(JumpIfToBooleanTrue), U8(79),
B(JumpIfToBooleanTrue), U8(74),
B(LdaNamedProperty), R(5), U8(9), U8(15),
B(Star), R(7),
B(LdaSmi), I8(2),
......@@ -227,10 +215,7 @@ bytecodes: [
B(Star), R(17),
B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(Star), R(16),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(10), R(0), U8(16),
B(Ldar), R(16),
B(SuspendGenerator), R(10), R(0), U8(16), U8(1),
/* 44 S> */ B(Return),
B(RestoreGeneratorRegisters), R(10), R(0), U8(16),
B(LdaSmi), I8(-2),
......@@ -247,7 +232,7 @@ bytecodes: [
B(Jump), U8(56),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(125), I8(0),
B(JumpLoop), U8(120), I8(0),
B(Jump), U8(36),
B(Star), R(16),
B(Ldar), R(closure),
......@@ -329,13 +314,13 @@ bytecodes: [
/* 44 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [109],
Smi [38],
Smi [103],
Smi [10],
Smi [7],
TUPLE2_TYPE,
SYMBOL_TYPE,
Smi [87],
Smi [82],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......@@ -350,9 +335,9 @@ constant pool: [
Smi [9],
]
handlers: [
[98, 290, 296],
[101, 254, 256],
[357, 367, 369],
[92, 279, 285],
[95, 243, 245],
[346, 356, 358],
]
---
......@@ -363,7 +348,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 294
bytecode array length: 284
bytecodes: [
B(Mov), R(new_target), R(1),
B(Ldar), R(new_target),
......@@ -383,11 +368,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 38 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(0), R(1),
B(Mov), R(0), R(3),
/* 38 E> */ B(SuspendGenerator), R(1), R(0), U8(3),
B(Ldar), R(3),
B(Star), R(1),
/* 38 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
/* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -454,11 +436,9 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
B(LdaNamedProperty), R(3), U8(12), U8(16),
B(JumpIfToBooleanTrue), U8(37),
B(LdaSmi), I8(1),
B(Mov), R(3), R(9),
B(SuspendGenerator), R(1), R(0), U8(9),
B(Ldar), R(9),
B(JumpIfToBooleanTrue), U8(33),
B(Ldar), R(3),
B(SuspendGenerator), R(1), R(0), U8(9), U8(1),
/* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(1), R(0), U8(9),
B(LdaSmi), I8(-2),
......@@ -467,7 +447,7 @@ bytecodes: [
B(Star), R(6),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(Star), R(4),
B(JumpLoop), U8(150), I8(0),
B(JumpLoop), U8(146), I8(0),
B(LdaNamedProperty), R(3), U8(13), U8(18),
B(Star), R(5),
B(LdaSmi), I8(1),
......@@ -479,13 +459,13 @@ bytecodes: [
/* 54 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [107],
Smi [38],
Smi [101],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
SYMBOL_TYPE,
Smi [128],
Smi [124],
Smi [17],
Smi [37],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
......
......@@ -13,7 +13,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 110
bytecode array length: 106
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -40,10 +40,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 13 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -62,7 +59,7 @@ bytecodes: [
/* 13 S> */ B(Return),
]
constant pool: [
Smi [58],
Smi [54],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -76,7 +73,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 110
bytecode array length: 106
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -103,10 +100,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 24 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -125,7 +119,7 @@ bytecodes: [
/* 24 S> */ B(Return),
]
constant pool: [
Smi [58],
Smi [54],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -141,7 +135,7 @@ snippet: "
"
frame size: 6
parameter count: 2
bytecode array length: 154
bytecode array length: 150
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -168,10 +162,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 64 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -209,7 +200,7 @@ bytecodes: [
/* 64 S> */ B(Return),
]
constant pool: [
Smi [58],
Smi [54],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -227,7 +218,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 152
bytecode array length: 148
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -254,10 +245,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -294,7 +282,7 @@ bytecodes: [
/* 49 S> */ B(Return),
]
constant pool: [
Smi [58],
Smi [54],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -311,7 +299,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 156
bytecode array length: 152
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -340,10 +328,7 @@ bytecodes: [
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 49 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -380,7 +365,7 @@ bytecodes: [
/* 49 S> */ B(Return),
]
constant pool: [
Smi [62],
Smi [58],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -397,7 +382,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 160
bytecode array length: 156
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -426,10 +411,7 @@ bytecodes: [
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 51 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -466,7 +448,7 @@ bytecodes: [
/* 51 S> */ B(Return),
]
constant pool: [
Smi [62],
Smi [58],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -481,7 +463,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 121
bytecode array length: 117
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -510,10 +492,7 @@ bytecodes: [
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 32 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -534,7 +513,7 @@ bytecodes: [
/* 32 S> */ B(Return),
]
constant pool: [
Smi [62],
Smi [58],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -549,7 +528,7 @@ snippet: "
"
frame size: 8
parameter count: 2
bytecode array length: 154
bytecode array length: 150
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -578,10 +557,7 @@ bytecodes: [
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 26 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -614,7 +590,7 @@ bytecodes: [
/* 26 S> */ B(Return),
]
constant pool: [
Smi [62],
Smi [58],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -629,7 +605,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 110
bytecode array length: 106
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -656,10 +632,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 30 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -678,7 +651,7 @@ bytecodes: [
/* 30 S> */ B(Return),
]
constant pool: [
Smi [58],
Smi [54],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -692,7 +665,7 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 110
bytecode array length: 106
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -719,10 +692,7 @@ bytecodes: [
/* 0 E> */ B(StackCheck),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 19 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -741,7 +711,7 @@ bytecodes: [
/* 19 S> */ B(Return),
]
constant pool: [
Smi [58],
Smi [54],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......@@ -756,7 +726,7 @@ snippet: "
"
frame size: 7
parameter count: 2
bytecode array length: 148
bytecode array length: 144
bytecodes: [
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
......@@ -787,10 +757,7 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(3),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
/* 45 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(3),
B(LdaSmi), I8(-2),
......@@ -819,7 +786,7 @@ bytecodes: [
/* 45 S> */ B(Return),
]
constant pool: [
Smi [68],
Smi [64],
FIXED_ARRAY_TYPE,
Smi [10],
Smi [7],
......
......@@ -272,7 +272,7 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 114
bytecode array length: 108
bytecodes: [
B(Mov), R(new_target), R(3),
B(Ldar), R(new_target),
......@@ -292,11 +292,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(2), R(3),
B(Mov), R(2), R(5),
/* 11 E> */ B(SuspendGenerator), R(3), R(0), U8(5),
B(Ldar), R(5),
B(Star), R(3),
/* 11 E> */ B(SuspendGenerator), R(3), R(0), U8(5), U8(0),
/* 62 S> */ B(Return),
B(RestoreGeneratorRegisters), R(3), R(0), U8(5),
B(LdaSmi), I8(-2),
......@@ -324,7 +321,7 @@ bytecodes: [
/* 62 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [38],
Smi [10],
Smi [7],
]
......@@ -340,7 +337,7 @@ snippet: "
"
frame size: 6
parameter count: 1
bytecode array length: 181
bytecode array length: 170
bytecodes: [
B(Mov), R(new_target), R(2),
B(Ldar), R(new_target),
......@@ -360,11 +357,8 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star), R(1),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(1), R(2),
B(Mov), R(1), R(4),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(4),
B(Ldar), R(4),
B(Star), R(2),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(4), U8(0),
/* 56 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
......@@ -389,16 +383,13 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(0), U8(4),
B(JumpIfFalse), U8(61),
B(JumpIfFalse), U8(56),
/* 18 E> */ B(StackCheck),
/* 47 S> */ B(LdaFalse),
B(Star), R(5),
B(Mov), R(0), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
B(Star), R(4),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(2), R(0), U8(4),
B(Ldar), R(4),
B(SuspendGenerator), R(2), R(0), U8(4), U8(1),
/* 56 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(4),
B(LdaSmi), I8(-2),
......@@ -414,16 +405,16 @@ bytecodes: [
/* 44 S> */ B(Ldar), R(0),
B(Inc), U8(5),
B(Star), R(0),
B(JumpLoop), U8(84), I8(0),
B(JumpLoop), U8(79), I8(0),
B(LdaUndefined),
/* 56 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [75],
Smi [38],
Smi [69],
Smi [10],
Smi [7],
Smi [48],
Smi [43],
Smi [10],
Smi [7],
]
......@@ -536,7 +527,7 @@ snippet: "
"
frame size: 14
parameter count: 1
bytecode array length: 268
bytecode array length: 264
bytecodes: [
B(Mov), R(new_target), R(3),
B(Ldar), R(new_target),
......@@ -575,16 +566,13 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(0), U8(4),
B(JumpIfFalse), U8(63),
B(JumpIfFalse), U8(59),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(Mov), R(3), R(9),
B(Mov), R(0), R(10),
B(Mov), R(2), R(11),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(9), U8(3),
B(Star), R(9),
B(LdaZero),
B(SuspendGenerator), R(3), R(0), U8(9),
B(Ldar), R(9),
B(SuspendGenerator), R(3), R(0), U8(9), U8(0),
/* 61 S> */ B(Return),
B(RestoreGeneratorRegisters), R(3), R(0), U8(9),
B(LdaSmi), I8(-2),
......@@ -601,7 +589,7 @@ bytecodes: [
/* 49 S> */ B(Ldar), R(0),
B(Inc), U8(5),
B(Star), R(0),
B(JumpLoop), U8(86), I8(0),
B(JumpLoop), U8(82), I8(0),
B(LdaUndefined),
B(Star), R(9),
B(LdaUndefined),
......@@ -661,14 +649,14 @@ bytecodes: [
]
constant pool: [
Smi [51],
Smi [50],
Smi [46],
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
Smi [6],
Smi [9],
]
handlers: [
[62, 223, 229],
[65, 178, 180],
[62, 219, 225],
[65, 174, 176],
]
......@@ -363,7 +363,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.StoreModuleVariable(1, 42);
// Emit generator operations.
builder.SuspendGenerator(reg, reg_list)
builder.SuspendGenerator(reg, reg_list, 0)
.RestoreGeneratorState(reg)
.RestoreGeneratorRegisters(reg, 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