Move closing of generators upon final return to the generator-resume builtin.
Review-Url: https://codereview.chromium.org/2936813002 Cr-Commit-Position: refs/heads/master@{#45906}
This commit is contained in:
parent
322b2d7d14
commit
814d08a6af
@ -26,8 +26,6 @@ class GeneratorBuiltinsAssembler : public CodeStubAssembler {
|
||||
void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
|
||||
Node* receiver, Node* value, Node* context,
|
||||
JSGeneratorObject::ResumeMode resume_mode, char const* const method_name) {
|
||||
Node* closed = SmiConstant(JSGeneratorObject::kGeneratorClosed);
|
||||
|
||||
// Check if the {receiver} is actually a JSGeneratorObject.
|
||||
Label if_receiverisincompatible(this, Label::kDeferred);
|
||||
GotoIf(TaggedIsSmi(receiver), &if_receiverisincompatible);
|
||||
@ -41,6 +39,7 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
|
||||
LoadObjectField(receiver, JSGeneratorObject::kContinuationOffset);
|
||||
Label if_receiverisclosed(this, Label::kDeferred),
|
||||
if_receiverisrunning(this, Label::kDeferred);
|
||||
Node* closed = SmiConstant(JSGeneratorObject::kGeneratorClosed);
|
||||
GotoIf(SmiEqual(receiver_continuation, closed), &if_receiverisclosed);
|
||||
DCHECK_LT(JSGeneratorObject::kGeneratorExecuting,
|
||||
JSGeneratorObject::kGeneratorClosed);
|
||||
@ -56,18 +55,27 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
|
||||
// Make sure we close the generator if there was an exception.
|
||||
GotoIfException(result, &if_exception, &var_exception);
|
||||
|
||||
// If the generator is not suspended (i.e., it's state is 'closed'),
|
||||
// wrap the return value in IteratorResult.
|
||||
// If the generator is not suspended (i.e., its state is 'executing'),
|
||||
// close it and wrap the return value in IteratorResult.
|
||||
Node* result_continuation =
|
||||
LoadObjectField(receiver, JSGeneratorObject::kContinuationOffset);
|
||||
GotoIf(SmiEqual(result_continuation, closed), &if_final_return);
|
||||
|
||||
// The generator function should not close the generator by itself, let's
|
||||
// check it is indeed not closed yet.
|
||||
CSA_ASSERT(this, SmiNotEqual(result_continuation, closed));
|
||||
|
||||
Node* executing = SmiConstant(JSGeneratorObject::kGeneratorExecuting);
|
||||
GotoIf(SmiEqual(result_continuation, executing), &if_final_return);
|
||||
|
||||
Return(result);
|
||||
|
||||
Callable create_iter_result_object =
|
||||
Builtins::CallableFor(isolate(), Builtins::kCreateIterResultObject);
|
||||
|
||||
BIND(&if_final_return);
|
||||
{
|
||||
// Close the generator.
|
||||
StoreObjectFieldNoWriteBarrier(
|
||||
receiver, JSGeneratorObject::kContinuationOffset, closed);
|
||||
// Return the wrapped result.
|
||||
Return(
|
||||
CallStub(create_iter_result_object, context, result, TrueConstant()));
|
||||
|
@ -2249,8 +2249,13 @@ void BytecodeGenerator::BuildReturn() {
|
||||
if (info()->literal()->feedback_vector_spec()->HasTypeProfileSlot()) {
|
||||
builder()->CollectTypeProfile(info()->literal()->return_position());
|
||||
}
|
||||
if (IsGeneratorFunction(info()->literal()->kind())) {
|
||||
// Mark the generator as closed if returning from a generator function.
|
||||
if (IsAsyncGeneratorFunction(info()->literal()->kind())) {
|
||||
// Mark the generator as closed if returning from an async generator
|
||||
// function. Note that non-async generators are closed by the
|
||||
// generator-resume builtin.
|
||||
|
||||
// TODO(jarin,caitp) Move the async generator closing to the resume
|
||||
// builtin.
|
||||
RegisterAllocationScope register_scope(this);
|
||||
Register result = register_allocator()->NewRegister();
|
||||
builder()
|
||||
|
@ -386,14 +386,6 @@ bool Rewriter::Rewrite(ParseInfo* info, Isolate* isolate) {
|
||||
int pos = kNoSourcePosition;
|
||||
Expression* result_value =
|
||||
processor.factory()->NewVariableProxy(result, pos);
|
||||
if (scope->is_module_scope()) {
|
||||
auto args = new (info->zone()) ZoneList<Expression*>(2, info->zone());
|
||||
args->Add(result_value, info->zone());
|
||||
args->Add(processor.factory()->NewBooleanLiteral(true, pos),
|
||||
info->zone());
|
||||
result_value = processor.factory()->NewCallRuntime(
|
||||
Runtime::kInlineCreateIterResultObject, args, pos);
|
||||
}
|
||||
Statement* result_statement =
|
||||
processor.factory()->NewReturnStatement(result_value, pos);
|
||||
body->Add(result_statement, info->zone());
|
||||
|
@ -643,7 +643,7 @@ snippet: "
|
||||
"
|
||||
frame size: 20
|
||||
parameter count: 2
|
||||
bytecode array length: 370
|
||||
bytecode array length: 358
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(11),
|
||||
B(Ldar), R(new_target),
|
||||
@ -682,7 +682,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
||||
B(Ldar), R(14),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(11), U8(1),
|
||||
B(Ldar), R(14),
|
||||
/* 55 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
@ -794,14 +793,11 @@ bytecodes: [
|
||||
B(Ldar), R(15),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(11), U8(1),
|
||||
B(Ldar), R(14),
|
||||
/* 55 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [53],
|
||||
Smi [14],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
SYMBOL_TYPE,
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
@ -814,9 +810,9 @@ constant pool: [
|
||||
FIXED_ARRAY_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[108, 226, 232],
|
||||
[111, 190, 192],
|
||||
[292, 302, 304],
|
||||
[104, 222, 228],
|
||||
[107, 186, 188],
|
||||
[288, 298, 300],
|
||||
]
|
||||
|
||||
---
|
||||
@ -828,7 +824,7 @@ snippet: "
|
||||
"
|
||||
frame size: 20
|
||||
parameter count: 2
|
||||
bytecode array length: 453
|
||||
bytecode array length: 437
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(10),
|
||||
B(Ldar), R(new_target),
|
||||
@ -867,7 +863,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(13),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(13),
|
||||
/* 49 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
@ -1003,22 +998,18 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(13),
|
||||
B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
|
||||
B(Jump), U8(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(14),
|
||||
/* 49 S> */ B(Return),
|
||||
B(Ldar), R(14),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(13),
|
||||
/* 49 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [53],
|
||||
Smi [117],
|
||||
Smi [14],
|
||||
Smi [113],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
SYMBOL_TYPE,
|
||||
Smi [87],
|
||||
@ -1033,12 +1024,12 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
||||
FIXED_ARRAY_TYPE,
|
||||
Smi [6],
|
||||
Smi [13],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[108, 298, 304],
|
||||
[111, 262, 264],
|
||||
[365, 375, 377],
|
||||
[104, 294, 300],
|
||||
[107, 258, 260],
|
||||
[361, 371, 373],
|
||||
]
|
||||
|
||||
---
|
||||
|
@ -13,7 +13,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 1
|
||||
bytecode array length: 104
|
||||
bytecode array length: 92
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(1),
|
||||
B(Ldar), R(new_target),
|
||||
@ -48,18 +48,14 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
||||
B(Ldar), R(3),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 16 S> */ B(Return),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 16 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [45],
|
||||
Smi [14],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
]
|
||||
handlers: [
|
||||
@ -72,7 +68,7 @@ snippet: "
|
||||
"
|
||||
frame size: 6
|
||||
parameter count: 1
|
||||
bytecode array length: 158
|
||||
bytecode array length: 142
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(1),
|
||||
B(Ldar), R(new_target),
|
||||
@ -107,7 +103,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(3),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
/* 16 S> */ B(LdaSmi), I8(42),
|
||||
@ -128,21 +123,17 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
|
||||
B(Ldar), R(3),
|
||||
/* 16 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [45],
|
||||
Smi [99],
|
||||
Smi [14],
|
||||
Smi [95],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
Smi [14],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
]
|
||||
handlers: [
|
||||
@ -155,7 +146,7 @@ snippet: "
|
||||
"
|
||||
frame size: 19
|
||||
parameter count: 1
|
||||
bytecode array length: 447
|
||||
bytecode array length: 431
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(10),
|
||||
B(Ldar), R(new_target),
|
||||
@ -190,7 +181,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(12),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(12),
|
||||
/* 44 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
@ -326,22 +316,18 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(12),
|
||||
B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
|
||||
B(Jump), U8(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(13),
|
||||
/* 44 S> */ B(Return),
|
||||
B(Ldar), R(13),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(12),
|
||||
/* 44 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [45],
|
||||
Smi [111],
|
||||
Smi [14],
|
||||
Smi [107],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
TUPLE2_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
@ -357,12 +343,12 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
||||
FIXED_ARRAY_TYPE,
|
||||
Smi [6],
|
||||
Smi [13],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[100, 292, 298],
|
||||
[103, 256, 258],
|
||||
[359, 369, 371],
|
||||
[96, 288, 294],
|
||||
[99, 252, 254],
|
||||
[355, 365, 367],
|
||||
]
|
||||
|
||||
---
|
||||
@ -373,7 +359,7 @@ snippet: "
|
||||
"
|
||||
frame size: 15
|
||||
parameter count: 1
|
||||
bytecode array length: 500
|
||||
bytecode array length: 476
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(9),
|
||||
B(Ldar), R(new_target),
|
||||
@ -408,7 +394,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(11),
|
||||
/* 38 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
/* 43 S> */ B(LdaUndefined),
|
||||
@ -445,8 +430,8 @@ bytecodes: [
|
||||
B(JumpIfTrue), U8(39),
|
||||
B(LdaSmi), I8(2),
|
||||
B(TestEqualStrict), R(11), U8(28),
|
||||
B(JumpIfTrue), U8(78),
|
||||
B(Jump), U8(236),
|
||||
B(JumpIfTrue), U8(74),
|
||||
B(Jump), U8(232),
|
||||
B(LdaNamedProperty), R(4), U8(7), U8(13),
|
||||
B(Star), R(12),
|
||||
B(CallProperty1), R(12), R(4), R(1), U8(11),
|
||||
@ -455,12 +440,11 @@ bytecodes: [
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
|
||||
B(Jump), U8(208),
|
||||
B(Jump), U8(204),
|
||||
B(LdaNamedProperty), R(4), U8(8), U8(16),
|
||||
B(Star), R(3),
|
||||
B(TestUndetectable),
|
||||
B(JumpIfFalse), U8(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(JumpIfFalse), U8(5),
|
||||
B(Ldar), R(1),
|
||||
/* 54 S> */ B(Return),
|
||||
B(Mov), R(3), R(12),
|
||||
@ -552,31 +536,25 @@ bytecodes: [
|
||||
B(Star), R(1),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
||||
B(Star), R(2),
|
||||
B(Wide), B(JumpLoop), U16(327), I16(0),
|
||||
B(Wide), B(JumpLoop), U16(323), I16(0),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqualStrict), R(2), U8(31),
|
||||
B(JumpIfFalse), U8(15),
|
||||
B(JumpIfFalse), U8(7),
|
||||
B(LdaNamedProperty), R(3), U8(14), U8(32),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
B(LdaNamedProperty), R(3), U8(14), U8(34),
|
||||
B(Star), R(8),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [45],
|
||||
Smi [115],
|
||||
Smi [14],
|
||||
Smi [111],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
||||
SYMBOL_TYPE,
|
||||
Smi [300],
|
||||
Smi [296],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
||||
@ -587,6 +565,6 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
||||
]
|
||||
handlers: [
|
||||
[310, 320, 322],
|
||||
[302, 312, 314],
|
||||
]
|
||||
|
||||
|
@ -13,7 +13,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 120
|
||||
bytecode array length: 111
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -59,10 +59,6 @@ bytecodes: [
|
||||
B(Ldar), R(3),
|
||||
B(StaCurrentContextSlot), U8(5),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 13 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -80,7 +76,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 120
|
||||
bytecode array length: 111
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -126,10 +122,6 @@ bytecodes: [
|
||||
B(Ldar), R(3),
|
||||
B(StaCurrentContextSlot), U8(5),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 24 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -149,7 +141,7 @@ snippet: "
|
||||
"
|
||||
frame size: 6
|
||||
parameter count: 2
|
||||
bytecode array length: 164
|
||||
bytecode array length: 155
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -214,10 +206,6 @@ bytecodes: [
|
||||
B(StaContextSlot), R(3), U8(5), U8(0),
|
||||
B(PopContext), R(3),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 64 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -239,7 +227,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 162
|
||||
bytecode array length: 153
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -303,10 +291,6 @@ bytecodes: [
|
||||
B(StaContextSlot), R(3), U8(5), U8(0),
|
||||
B(PopContext), R(3),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 49 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -327,7 +311,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 166
|
||||
bytecode array length: 157
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -393,10 +377,6 @@ bytecodes: [
|
||||
B(StaContextSlot), R(3), U8(5), U8(0),
|
||||
B(PopContext), R(3),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 49 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -417,7 +397,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 170
|
||||
bytecode array length: 161
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -483,10 +463,6 @@ bytecodes: [
|
||||
B(StaContextSlot), R(3), U8(5), U8(0),
|
||||
B(PopContext), R(3),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 51 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -505,7 +481,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 131
|
||||
bytecode array length: 122
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -555,10 +531,6 @@ bytecodes: [
|
||||
B(CreateClosure), U8(4), U8(3), U8(0),
|
||||
B(StaModuleVariable), I8(1), U8(0),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 32 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -577,7 +549,7 @@ snippet: "
|
||||
"
|
||||
frame size: 8
|
||||
parameter count: 2
|
||||
bytecode array length: 164
|
||||
bytecode array length: 155
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -639,10 +611,6 @@ bytecodes: [
|
||||
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
|
||||
B(StaModuleVariable), I8(1), U8(0),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 26 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -661,7 +629,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 120
|
||||
bytecode array length: 111
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -707,10 +675,6 @@ bytecodes: [
|
||||
B(Ldar), R(3),
|
||||
B(StaCurrentContextSlot), U8(5),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 30 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -728,7 +692,7 @@ snippet: "
|
||||
"
|
||||
frame size: 5
|
||||
parameter count: 2
|
||||
bytecode array length: 120
|
||||
bytecode array length: 111
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -774,10 +738,6 @@ bytecodes: [
|
||||
B(Ldar), R(3),
|
||||
B(StaCurrentContextSlot), U8(5),
|
||||
B(LdaCurrentContextSlot), U8(5),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 19 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
@ -796,7 +756,7 @@ snippet: "
|
||||
"
|
||||
frame size: 7
|
||||
parameter count: 2
|
||||
bytecode array length: 158
|
||||
bytecode array length: 149
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(0),
|
||||
B(Ldar), R(new_target),
|
||||
@ -856,10 +816,6 @@ bytecodes: [
|
||||
/* 31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(3),
|
||||
B(StaCurrentContextSlot), U8(6),
|
||||
B(LdaCurrentContextSlot), U8(6),
|
||||
B(Star), R(3),
|
||||
B(LdaTrue),
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
||||
/* 45 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
|
@ -273,7 +273,7 @@ snippet: "
|
||||
"
|
||||
frame size: 11
|
||||
parameter count: 1
|
||||
bytecode array length: 184
|
||||
bytecode array length: 172
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(7),
|
||||
B(Ldar), R(new_target),
|
||||
@ -308,7 +308,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
||||
B(Ldar), R(9),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
|
||||
B(Ldar), R(9),
|
||||
/* 62 S> */ B(Return),
|
||||
/* 31 S> */ B(LdaZero),
|
||||
@ -350,14 +349,11 @@ bytecodes: [
|
||||
B(Jump), U8(5),
|
||||
B(JumpLoop), U8(68), I8(0),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
|
||||
B(Ldar), R(9),
|
||||
/* 62 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [45],
|
||||
Smi [14],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
]
|
||||
handlers: [
|
||||
@ -372,7 +368,7 @@ snippet: "
|
||||
"
|
||||
frame size: 11
|
||||
parameter count: 1
|
||||
bytecode array length: 276
|
||||
bytecode array length: 260
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(6),
|
||||
B(Ldar), R(new_target),
|
||||
@ -407,7 +403,6 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(8),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
/* 31 S> */ B(LdaZero),
|
||||
@ -440,7 +435,7 @@ bytecodes: [
|
||||
/* 36 E> */ B(TestLessThan), R(0), U8(5),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(4),
|
||||
B(Jump), U8(107),
|
||||
B(Jump), U8(103),
|
||||
B(Ldar), R(7),
|
||||
B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
@ -451,7 +446,7 @@ bytecodes: [
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqual), R(5), U8(6),
|
||||
B(JumpIfFalse), U8(67),
|
||||
B(JumpIfFalse), U8(63),
|
||||
/* 18 E> */ B(StackCheck),
|
||||
/* 47 S> */ B(LdaSmi), I8(1),
|
||||
B(Mov), R(0), R(8),
|
||||
@ -470,33 +465,29 @@ bytecodes: [
|
||||
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0),
|
||||
B(Ldar), R(8),
|
||||
/* 47 E> */ B(Throw),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
B(Star), R(5),
|
||||
B(Mov), R(0), R(3),
|
||||
B(Ldar), R(3),
|
||||
B(JumpLoop), U8(90), I8(1),
|
||||
B(JumpLoop), U8(86), I8(1),
|
||||
B(LdaSmi), I8(1),
|
||||
/* 54 E> */ B(TestEqual), R(5), U8(7),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(5),
|
||||
B(JumpLoop), U8(160), I8(0),
|
||||
B(JumpLoop), U8(156), I8(0),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [45],
|
||||
Smi [86],
|
||||
Smi [14],
|
||||
Smi [82],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
Smi [56],
|
||||
Smi [48],
|
||||
Smi [14],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
]
|
||||
handlers: [
|
||||
|
Loading…
Reference in New Issue
Block a user