Commit 71f758a2 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[ignition] Reduce generator switch boilerplate

The SwitchOnGeneratorState bytecode now also falls through if the
generator object is undefined (so that we don't need that jump) and
restores generator context (so that we don't need that PushContext).
This saves 10 bytes per generator.

Change-Id: Ie0872c827119b9f1d1e9244d3be6496a30cd9620
Reviewed-on: https://chromium-review.googlesource.com/867051
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50845}
parent 3121ffeb
......@@ -2828,13 +2828,29 @@ void BytecodeGraphBuilder::VisitSwitchOnGeneratorState() {
Node* generator =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
Node* generator_state =
NewNode(javascript()->GeneratorRestoreContinuation(), generator);
Node* generator_is_undefined =
NewNode(simplified()->ReferenceEqual(), generator,
jsgraph()->UndefinedConstant());
environment()->BindGeneratorState(generator_state);
NewBranch(generator_is_undefined);
{
SubEnvironment resume_env(this);
NewIfFalse();
Node* generator_state =
NewNode(javascript()->GeneratorRestoreContinuation(), generator);
environment()->BindGeneratorState(generator_state);
Node* generator_context =
NewNode(javascript()->GeneratorRestoreContext(), generator);
environment()->SetContext(generator_context);
BuildSwitchOnGeneratorState(bytecode_analysis()->resume_jump_targets(),
false);
BuildSwitchOnGeneratorState(bytecode_analysis()->resume_jump_targets(),
false);
}
// Fallthrough for the first-call case.
NewIfTrue();
}
void BytecodeGraphBuilder::VisitResumeGenerator() {
......
......@@ -693,6 +693,10 @@ void JSGenericLowering::LowerJSGeneratorRestoreContinuation(Node* node) {
UNREACHABLE(); // Eliminated in typed lowering.
}
void JSGenericLowering::LowerJSGeneratorRestoreContext(Node* node) {
UNREACHABLE(); // Eliminated in typed lowering.
}
void JSGenericLowering::LowerJSGeneratorRestoreInputOrDebugPos(Node* node) {
UNREACHABLE(); // Eliminated in typed lowering.
}
......
......@@ -49,8 +49,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceAsyncGeneratorYield(node);
case Runtime::kInlineGeneratorGetResumeMode:
return ReduceGeneratorGetResumeMode(node);
case Runtime::kInlineGeneratorGetContext:
return ReduceGeneratorGetContext(node);
case Runtime::kInlineIsArray:
return ReduceIsInstanceType(node, JS_ARRAY_TYPE);
case Runtime::kInlineIsTypedArray:
......@@ -198,16 +196,6 @@ Reduction JSIntrinsicLowering::ReduceAsyncGeneratorYield(Node* node) {
0);
}
Reduction JSIntrinsicLowering::ReduceGeneratorGetContext(Node* node) {
Node* const generator = NodeProperties::GetValueInput(node, 0);
Node* const effect = NodeProperties::GetEffectInput(node);
Node* const control = NodeProperties::GetControlInput(node);
Operator const* const op =
simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectContext());
return Change(node, op, generator, effect, control);
}
Reduction JSIntrinsicLowering::ReduceGeneratorGetResumeMode(Node* node) {
Node* const generator = NodeProperties::GetValueInput(node, 0);
Node* const effect = NodeProperties::GetEffectInput(node);
......
......@@ -44,7 +44,6 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final
Reduction ReduceDeoptimizeNow(Node* node);
Reduction ReduceCreateJSGeneratorObject(Node* node);
Reduction ReduceGeneratorClose(Node* node);
Reduction ReduceGeneratorGetContext(Node* node);
Reduction ReduceGeneratorGetInputOrDebugPos(Node* node);
Reduction ReduceAsyncGeneratorReject(Node* node);
Reduction ReduceAsyncGeneratorResolve(Node* node);
......
......@@ -576,6 +576,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
V(LoadMessage, Operator::kNoThrow | Operator::kNoWrite, 0, 1) \
V(StoreMessage, Operator::kNoRead | Operator::kNoThrow, 1, 0) \
V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \
V(GeneratorRestoreContext, Operator::kNoThrow, 1, 1) \
V(GeneratorRestoreInputOrDebugPos, Operator::kNoThrow, 1, 1) \
V(StackCheck, Operator::kNoWrite, 0, 0) \
V(Debugger, Operator::kNoProperties, 0, 0) \
......
......@@ -744,6 +744,8 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
// Used to implement Ignition's SwitchOnGeneratorState bytecode.
const Operator* GeneratorRestoreContinuation();
const Operator* GeneratorRestoreContext();
// Used to implement Ignition's ResumeGenerator bytecode.
const Operator* GeneratorRestoreRegister(int index);
const Operator* GeneratorRestoreInputOrDebugPos();
......
......@@ -2069,6 +2069,21 @@ Reduction JSTypedLowering::ReduceJSGeneratorRestoreContinuation(Node* node) {
return Changed(continuation);
}
Reduction JSTypedLowering::ReduceJSGeneratorRestoreContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSGeneratorRestoreContext, node->opcode());
const Operator* new_op =
simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectContext());
// 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::ReduceJSGeneratorRestoreRegister(Node* node) {
DCHECK_EQ(IrOpcode::kJSGeneratorRestoreRegister, node->opcode());
Node* generator = NodeProperties::GetValueInput(node, 0);
......@@ -2190,6 +2205,8 @@ Reduction JSTypedLowering::Reduce(Node* node) {
return ReduceJSGeneratorStore(node);
case IrOpcode::kJSGeneratorRestoreContinuation:
return ReduceJSGeneratorRestoreContinuation(node);
case IrOpcode::kJSGeneratorRestoreContext:
return ReduceJSGeneratorRestoreContext(node);
case IrOpcode::kJSGeneratorRestoreRegister:
return ReduceJSGeneratorRestoreRegister(node);
case IrOpcode::kJSGeneratorRestoreInputOrDebugPos:
......
......@@ -72,6 +72,7 @@ class V8_EXPORT_PRIVATE JSTypedLowering final
Reduction ReduceJSStoreMessage(Node* node);
Reduction ReduceJSGeneratorStore(Node* node);
Reduction ReduceJSGeneratorRestoreContinuation(Node* node);
Reduction ReduceJSGeneratorRestoreContext(Node* node);
Reduction ReduceJSGeneratorRestoreRegister(Node* node);
Reduction ReduceJSGeneratorRestoreInputOrDebugPos(Node* node);
Reduction ReduceNumberBinop(Node* node);
......
......@@ -182,7 +182,6 @@ bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
case Runtime::kInlineClassOf:
case Runtime::kInlineCreateIterResultObject:
case Runtime::kInlineGeneratorClose:
case Runtime::kInlineGeneratorGetContext:
case Runtime::kInlineGeneratorGetInputOrDebugPos:
case Runtime::kInlineGeneratorGetResumeMode:
case Runtime::kInlineCreateJSGeneratorObject:
......
......@@ -191,6 +191,7 @@
V(JSStoreModule) \
V(JSGeneratorStore) \
V(JSGeneratorRestoreContinuation) \
V(JSGeneratorRestoreContext) \
V(JSGeneratorRestoreRegister) \
V(JSGeneratorRestoreInputOrDebugPos) \
V(JSStackCheck) \
......
......@@ -1822,6 +1822,10 @@ Type* Typer::Visitor::TypeJSGeneratorRestoreContinuation(Node* node) {
return Type::SignedSmall();
}
Type* Typer::Visitor::TypeJSGeneratorRestoreContext(Node* node) {
return Type::Any();
}
Type* Typer::Visitor::TypeJSGeneratorRestoreRegister(Node* node) {
return Type::Any();
}
......
......@@ -831,6 +831,10 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
CheckTypeIs(node, Type::SignedSmall());
break;
case IrOpcode::kJSGeneratorRestoreContext:
CheckTypeIs(node, Type::Any());
break;
case IrOpcode::kJSGeneratorRestoreRegister:
CheckTypeIs(node, Type::Any());
break;
......
......@@ -159,7 +159,6 @@ void BytecodeArrayWriter::UpdateExitSeenInBlock(Bytecode bytecode) {
case Bytecode::kJump:
case Bytecode::kJumpConstant:
case Bytecode::kSuspendGenerator:
case Bytecode::kSwitchOnGeneratorState:
exit_seen_in_block_ = true;
break;
default:
......
......@@ -1134,28 +1134,13 @@ void BytecodeGenerator::BuildGeneratorPrologue() {
generator_jump_table_ =
builder()->AllocateJumpTable(info()->literal()->suspend_count(), 0);
BytecodeLabel regular_call;
builder()
->LoadAccumulatorWithRegister(generator_object())
.JumpIfUndefined(&regular_call);
// This is a resume call. Restore the current context and the registers,
// then perform state dispatch.
{
RegisterAllocationScope register_scope(this);
Register generator_context = register_allocator()->NewRegister();
builder()
->CallRuntime(Runtime::kInlineGeneratorGetContext, generator_object())
.PushContext(generator_context)
.SwitchOnGeneratorState(generator_object(), generator_jump_table_);
// The switch is guaranteed to jump (or abort), so there is no fall-through.
}
// If the generator is not undefined, this is a resume, so perform state
// dispatch.
builder()->SwitchOnGeneratorState(generator_object(), generator_jump_table_);
// This is a regular call.
builder()->Bind(&regular_call);
// Now fall through to the ordinary function prologue, after which we will run
// into the generator object creation and other extra code inserted by the
// parser.
// Otherwise, fall-through to the ordinary function prologue, after which we
// will run into the generator object creation and other extra code inserted
// by the parser.
}
void BytecodeGenerator::VisitBlock(Block* stmt) {
......
......@@ -3110,20 +3110,27 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
// SwitchOnGeneratorState <generator> <table_start> <table_length>
//
// Loads the |generator|'s state and stores it in the accumulator, before
// overwriting it with kGeneratorExecuting. Then, jumps to the appropriate
// resume bytecode, by looking up the generator state in a jump table in the
// If |generator| is undefined, falls through. Otherwise, loads the
// generator's state (overwriting it with kGeneratorExecuting), sets the context
// to the generator's resume context, and performs state dispatch on the
// generator's state by looking up the generator state in a jump table in the
// constant pool, starting at |table_start|, and of length |table_length|.
IGNITION_HANDLER(SwitchOnGeneratorState, InterpreterAssembler) {
Node* generator_reg = BytecodeOperandReg(0);
Node* generator = LoadRegister(generator_reg);
Label fallthrough(this);
GotoIf(WordEqual(generator, UndefinedConstant()), &fallthrough);
Node* state =
LoadObjectField(generator, JSGeneratorObject::kContinuationOffset);
Node* new_state = SmiConstant(JSGeneratorObject::kGeneratorExecuting);
StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
new_state);
Node* context = LoadObjectField(generator, JSGeneratorObject::kContextOffset);
SetContext(context);
Node* table_start = BytecodeOperandIdx(1);
// TODO(leszeks): table_length is only used for a CSA_ASSERT, we don't
// actually need it otherwise.
......@@ -3141,6 +3148,9 @@ IGNITION_HANDLER(SwitchOnGeneratorState, InterpreterAssembler) {
Node* entry = IntPtrAdd(table_start, case_value);
Node* relative_jump = LoadAndUntagConstantPoolEntry(entry);
Jump(relative_jump);
BIND(&fallthrough);
Dispatch();
}
// ResumeGenerator <generator> <first output register> <register count>
......
......@@ -391,15 +391,6 @@ Node* IntrinsicsGenerator::CreateJSGeneratorObject(Node* input, Node* arg_count,
Builtins::kCreateGeneratorObject);
}
Node* IntrinsicsGenerator::GeneratorGetContext(Node* args_reg, Node* arg_count,
Node* context) {
Node* generator = __ LoadRegister(args_reg);
Node* const value =
__ LoadObjectField(generator, JSGeneratorObject::kContextOffset);
return value;
}
Node* IntrinsicsGenerator::GeneratorGetInputOrDebugPos(Node* args_reg,
Node* arg_count,
Node* context) {
......
......@@ -18,7 +18,6 @@ namespace interpreter {
V(AsyncGeneratorResolve, async_generator_resolve, 3) \
V(AsyncGeneratorYield, async_generator_yield, 3) \
V(CreateJSGeneratorObject, create_js_generator_object, 2) \
V(GeneratorGetContext, generator_get_context, 1) \
V(GeneratorGetResumeMode, generator_get_resume_mode, 1) \
V(GeneratorGetInputOrDebugPos, generator_get_input_or_debug_pos, 1) \
V(GeneratorClose, generator_close, 1) \
......
......@@ -55,12 +55,6 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) {
return generator->receiver();
}
RUNTIME_FUNCTION(Runtime_GeneratorGetContext) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
UNREACHABLE();
}
RUNTIME_FUNCTION(Runtime_GeneratorGetInputOrDebugPos) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
......
......@@ -245,7 +245,6 @@ namespace internal {
F(GeneratorClose, 1, 1) \
F(GeneratorGetFunction, 1, 1) \
F(GeneratorGetReceiver, 1, 1) \
F(GeneratorGetContext, 1, 1) \
F(GeneratorGetInputOrDebugPos, 1, 1) \
F(AsyncGeneratorResolve, 3, 1) \
F(AsyncGeneratorReject, 2, 1) \
......
......@@ -14,12 +14,8 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 202
bytecode array length: 192
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(1),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
......@@ -117,8 +113,8 @@ constant pool: [
Smi [23],
]
handlers: [
[30, 147, 155],
[33, 108, 110],
[20, 137, 145],
[23, 98, 100],
]
---
......@@ -128,12 +124,8 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 246
bytecode array length: 236
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(1),
B(SwitchOnGeneratorState), R(0), U8(0), U8(3),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
......@@ -251,8 +243,8 @@ constant pool: [
Smi [23],
]
handlers: [
[30, 191, 199],
[33, 152, 154],
[20, 181, 189],
[23, 142, 144],
]
---
......@@ -262,12 +254,8 @@ snippet: "
"
frame size: 22
parameter count: 1
bytecode array length: 506
bytecode array length: 496
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(11),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
......@@ -504,11 +492,11 @@ constant pool: [
Smi [23],
]
handlers: [
[30, 451, 459],
[33, 412, 414],
[71, 235, 243],
[74, 195, 197],
[304, 314, 316],
[20, 441, 449],
[23, 402, 404],
[61, 225, 233],
[64, 185, 187],
[294, 304, 306],
]
---
......@@ -519,12 +507,8 @@ snippet: "
"
frame size: 17
parameter count: 1
bytecode array length: 492
bytecode array length: 482
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(1),
B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
......@@ -744,7 +728,7 @@ constant pool: [
Smi [23],
]
handlers: [
[30, 437, 445],
[33, 398, 400],
[20, 427, 435],
[23, 388, 390],
]
......@@ -16,12 +16,8 @@ snippet: "
"
frame size: 23
parameter count: 1
bytecode array length: 524
bytecode array length: 514
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(12),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(12),
B(Mov), R(this), R(13),
......@@ -257,11 +253,11 @@ constant pool: [
Smi [9],
]
handlers: [
[36, 483, 491],
[39, 441, 443],
[45, 224, 232],
[48, 184, 186],
[292, 341, 343],
[26, 473, 481],
[29, 431, 433],
[35, 214, 222],
[38, 174, 176],
[282, 331, 333],
]
---
......@@ -273,12 +269,8 @@ snippet: "
"
frame size: 23
parameter count: 1
bytecode array length: 553
bytecode array length: 543
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(12),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(12),
B(Mov), R(this), R(13),
......@@ -527,11 +519,11 @@ constant pool: [
Smi [22],
]
handlers: [
[36, 499, 507],
[39, 456, 458],
[45, 226, 234],
[48, 186, 188],
[295, 344, 346],
[26, 489, 497],
[29, 446, 448],
[35, 216, 224],
[38, 176, 178],
[285, 334, 336],
]
---
......@@ -546,12 +538,8 @@ snippet: "
"
frame size: 23
parameter count: 1
bytecode array length: 542
bytecode array length: 532
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(12),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(12),
B(Mov), R(this), R(13),
......@@ -795,11 +783,11 @@ constant pool: [
Smi [9],
]
handlers: [
[36, 501, 509],
[39, 459, 461],
[45, 242, 250],
[48, 202, 204],
[310, 359, 361],
[26, 491, 499],
[29, 449, 451],
[35, 232, 240],
[38, 192, 194],
[300, 349, 351],
]
---
......
......@@ -619,12 +619,8 @@ snippet: "
"
frame size: 19
parameter count: 2
bytecode array length: 308
bytecode array length: 298
bytecodes: [
B(Ldar), R(3),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(3), U8(1),
B(PushContext), R(12),
B(SwitchOnGeneratorState), R(3), U8(0), U8(1),
B(CreateFunctionContext), U8(1),
B(PushContext), R(12),
......@@ -764,9 +760,9 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
]
handlers: [
[66, 184, 192],
[69, 148, 150],
[252, 262, 264],
[56, 174, 182],
[59, 138, 140],
[242, 252, 254],
]
---
......@@ -778,12 +774,8 @@ snippet: "
"
frame size: 18
parameter count: 2
bytecode array length: 352
bytecode array length: 342
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(11),
B(SwitchOnGeneratorState), R(2), U8(0), U8(2),
B(CreateFunctionContext), U8(1),
B(PushContext), R(11),
......@@ -944,9 +936,9 @@ constant pool: [
Smi [9],
]
handlers: [
[66, 221, 229],
[69, 185, 187],
[290, 300, 302],
[56, 211, 219],
[59, 175, 177],
[280, 290, 292],
]
---
......@@ -1156,12 +1148,8 @@ snippet: "
"
frame size: 24
parameter count: 2
bytecode array length: 433
bytecode array length: 423
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(12),
B(SwitchOnGeneratorState), R(2), U8(0), U8(1),
B(CreateFunctionContext), U8(1),
B(PushContext), R(12),
......@@ -1361,10 +1349,10 @@ constant pool: [
Smi [9],
]
handlers: [
[44, 392, 400],
[47, 350, 352],
[53, 210, 218],
[56, 170, 172],
[278, 288, 290],
[34, 382, 390],
[37, 340, 342],
[43, 200, 208],
[46, 160, 162],
[268, 278, 280],
]
......@@ -13,12 +13,8 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 54
bytecode array length: 44
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(1),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
......@@ -52,12 +48,8 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 90
bytecode array length: 80
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(1),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
......@@ -108,12 +100,8 @@ snippet: "
"
frame size: 17
parameter count: 1
bytecode array length: 346
bytecode array length: 336
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(11),
B(SwitchOnGeneratorState), R(2), U8(0), U8(2),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
......@@ -271,9 +259,9 @@ constant pool: [
Smi [9],
]
handlers: [
[58, 215, 223],
[61, 179, 181],
[284, 294, 296],
[48, 205, 213],
[51, 169, 171],
[274, 284, 286],
]
---
......@@ -284,12 +272,8 @@ snippet: "
"
frame size: 9
parameter count: 1
bytecode array length: 227
bytecode array length: 217
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(1),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
......
......@@ -13,12 +13,8 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 72
bytecode array length: 62
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
......@@ -58,12 +54,8 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 72
bytecode array length: 62
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
......@@ -105,12 +97,8 @@ snippet: "
"
frame size: 6
parameter count: 2
bytecode array length: 102
bytecode array length: 92
bytecodes: [
B(Ldar), R(1),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(1), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(5),
......@@ -166,12 +154,8 @@ snippet: "
"
frame size: 6
parameter count: 2
bytecode array length: 100
bytecode array length: 90
bytecodes: [
B(Ldar), R(1),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(1), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(5),
......@@ -225,12 +209,8 @@ snippet: "
"
frame size: 6
parameter count: 2
bytecode array length: 106
bytecode array length: 96
bytecodes: [
B(Ldar), R(1),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(1), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(5),
......@@ -287,12 +267,8 @@ snippet: "
"
frame size: 6
parameter count: 2
bytecode array length: 110
bytecode array length: 100
bytecodes: [
B(Ldar), R(1),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(1), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(5),
......@@ -347,12 +323,8 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 85
bytecode array length: 75
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
......@@ -398,12 +370,8 @@ snippet: "
"
frame size: 7
parameter count: 2
bytecode array length: 106
bytecode array length: 96
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
......@@ -459,12 +427,8 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 72
bytecode array length: 62
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
......@@ -504,12 +468,8 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 72
bytecode array length: 62
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
......@@ -550,12 +510,8 @@ snippet: "
"
frame size: 8
parameter count: 2
bytecode array length: 99
bytecode array length: 89
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(5),
......
......@@ -272,12 +272,8 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 77
bytecode array length: 67
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(2), U8(0), U8(1),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
......@@ -324,12 +320,8 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 109
bytecode array length: 99
bytecodes: [
B(Ldar), R(1),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
B(PushContext), R(2),
B(SwitchOnGeneratorState), R(1), U8(0), U8(2),
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
......@@ -480,12 +472,8 @@ snippet: "
"
frame size: 11
parameter count: 1
bytecode array length: 198
bytecode array length: 188
bytecodes: [
B(Ldar), R(1),
B(JumpIfUndefined), U8(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
B(PushContext), R(3),
B(SwitchOnGeneratorState), R(1), U8(0), U8(1),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
......@@ -579,7 +567,7 @@ constant pool: [
Smi [9],
]
handlers: [
[36, 157, 165],
[39, 115, 117],
[26, 147, 155],
[29, 105, 107],
]
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