Commit b63dfdb2 authored by Yolanda Chen's avatar Yolanda Chen Committed by V8 LUCI CQ

[interpreter] Release temp register earlier to reduce frame size

Some temp register slots are only used in a short range at the begining
of a statement or expression. They can be released earlier to save a
slot for later use. After the change, we can see frame size reduced in
the switch, class literal and ForOf tests.

Bug: v8:12940
Change-Id: I17b412d89353206fc01248cb3eefd2c678bc4ebb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688565Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
Cr-Commit-Position: refs/heads/main@{#81021}
parent 1bc0208b
......@@ -2016,6 +2016,8 @@ void BytecodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
VisitForAccumulatorValue(stmt->tag());
if (use_jump_table) {
// Release temps so that they can be reused in clauses.
RegisterAllocationScope allocation_scope(this);
// This also fills empty slots in jump table.
Register r2 = register_allocator()->NewRegister();
......@@ -2095,6 +2097,7 @@ void BytecodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
case_compare_ctr++);
}
}
register_allocator()->ReleaseRegister(tag_holder);
}
// For fall-throughs after comparisons (or out-of-range/non-Smi's for jump
......@@ -2418,17 +2421,19 @@ void BytecodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
BuildTryFinally(
// Try block.
[&]() {
Register next_result = register_allocator()->NewRegister();
LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt,
feedback_spec());
LoopScope loop_scope(this, &loop_builder);
builder()->LoadTrue().StoreAccumulatorInRegister(done);
// Call the iterator's .next() method. Break from the loop if the `done`
// property is truthy, otherwise load the value from the iterator result
// and append the argument.
{
RegisterAllocationScope allocation_scope(this);
Register next_result = register_allocator()->NewRegister();
// Call the iterator's .next() method. Break from the loop if the
// `done` property is truthy, otherwise load the value from the
// iterator result and append the argument.
builder()->SetExpressionAsStatementPosition(stmt->each());
BuildIteratorNext(iterator, next_result);
builder()->LoadNamedProperty(
......@@ -2441,8 +2446,8 @@ void BytecodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
->LoadNamedProperty(
next_result, ast_string_constants()->value_string(),
feedback_index(feedback_spec()->AddLoadICSlot()));
// done = false, before the assignment to each happens, so that done is
// false if the assignment throws.
// done = false, before the assignment to each happens, so that done
// is false if the assignment throws.
builder()
->StoreAccumulatorInRegister(next_result)
.LoadFalse()
......@@ -2452,6 +2457,7 @@ void BytecodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
AssignmentLhsData lhs_data = PrepareAssignmentLhs(stmt->each());
builder()->LoadAccumulatorWithRegister(next_result);
BuildAssignment(lhs_data, Token::ASSIGN, LookupHoistingMode::kNormal);
}
VisitIterationBody(stmt, &loop_builder);
},
......@@ -2583,6 +2589,8 @@ void BytecodeGenerator::BuildClassLiteral(ClassLiteral* expr, Register name) {
->LoadLiteral(class_name)
.StoreAccumulatorInRegister(brand)
.CallRuntime(Runtime::kCreatePrivateBrandSymbol, brand);
register_allocator()->ReleaseRegister(brand);
BuildVariableAssignment(expr->scope()->brand(), Token::INIT,
HoleCheckMode::kElided);
}
......@@ -6864,6 +6872,7 @@ void BytecodeGenerator::BuildNewLocalActivationContext() {
Register arg = register_allocator()->NewRegister();
builder()->LoadLiteral(scope).StoreAccumulatorInRegister(arg).CallRuntime(
Runtime::kNewFunctionContext, arg);
register_allocator()->ReleaseRegister(arg);
}
}
......@@ -6907,6 +6916,8 @@ void BytecodeGenerator::BuildNewLocalWithContext(Scope* scope) {
builder()->ToObject(extension_object);
builder()->CreateWithContext(extension_object, scope);
register_allocator()->ReleaseRegister(extension_object);
}
void BytecodeGenerator::BuildNewLocalCatchContext(Scope* scope) {
......@@ -6916,6 +6927,7 @@ void BytecodeGenerator::BuildNewLocalCatchContext(Scope* scope) {
Register exception = register_allocator()->NewRegister();
builder()->StoreAccumulatorInRegister(exception);
builder()->CreateCatchContext(exception, scope);
register_allocator()->ReleaseRegister(exception);
}
void BytecodeGenerator::VisitLiteralAccessor(LiteralProperty* property,
......
......@@ -23,6 +23,7 @@ class BytecodeRegisterAllocator final {
virtual void RegisterAllocateEvent(Register reg) = 0;
virtual void RegisterListAllocateEvent(RegisterList reg_list) = 0;
virtual void RegisterListFreeEvent(RegisterList reg_list) = 0;
virtual void RegisterFreeEvent(Register reg_list) = 0;
};
explicit BytecodeRegisterAllocator(int start_index)
......@@ -85,6 +86,15 @@ class BytecodeRegisterAllocator final {
}
}
// Release last allocated register
void ReleaseRegister(Register reg) {
DCHECK_EQ(next_register_index_ - 1, reg.index());
if (observer_) {
observer_->RegisterFreeEvent(reg);
}
next_register_index_--;
}
// Returns true if the register |reg| is a live register.
bool RegisterIsLive(Register reg) const {
return reg.index() < next_register_index_;
......
......@@ -505,6 +505,10 @@ void BytecodeRegisterOptimizer::RegisterListFreeEvent(RegisterList reg_list) {
}
}
void BytecodeRegisterOptimizer::RegisterFreeEvent(Register reg) {
GetRegisterInfo(reg)->set_allocated(false);
}
} // namespace interpreter
} // namespace internal
} // namespace v8
......@@ -120,6 +120,7 @@ class V8_EXPORT_PRIVATE BytecodeRegisterOptimizer final
void RegisterAllocateEvent(Register reg) override;
void RegisterListAllocateEvent(RegisterList reg_list) override;
void RegisterListFreeEvent(RegisterList reg) override;
void RegisterFreeEvent(Register reg) override;
// Update internal state for register transfer from |input| to |output|
void RegisterTransfer(RegisterInfo* input, RegisterInfo* output);
......
......@@ -208,9 +208,9 @@ snippet: "
async function* f() { for (let x of [42]) yield x }
f();
"
frame size: 18
frame size: 17
parameter count: 1
bytecode array length: 304
bytecode array length: 303
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -230,7 +230,7 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star4),
B(Mov), R(8), R(5),
B(Jump), U8(215),
B(Jump), U8(214),
/* 36 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
B(Star10),
B(GetIterator), R(10), U8(1), U8(3),
......@@ -255,22 +255,22 @@ bytecodes: [
B(Mov), R(14), R(1),
/* 31 S> */ B(Mov), R(1), R(3),
/* 42 S> */ B(LdaFalse),
B(Star), R(17),
B(Mov), R(0), R(15),
B(Mov), R(3), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(15), U8(3),
/* 42 E> */ B(SuspendGenerator), R(0), R(0), U8(15), U8(1),
B(ResumeGenerator), R(0), R(0), U8(15),
B(Star15),
B(Star), R(16),
B(Mov), R(0), R(14),
B(Mov), R(3), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(14), U8(3),
/* 42 E> */ B(SuspendGenerator), R(0), R(0), U8(14), U8(1),
B(ResumeGenerator), R(0), R(0), U8(14),
B(Star14),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
B(Ldar), R(15),
B(Ldar), R(14),
/* 42 E> */ B(Throw),
B(LdaSmi), I8(1),
B(Star11),
B(Mov), R(15), R(12),
B(Mov), R(14), R(12),
B(Jump), U8(17),
B(Ldar), R(15),
B(Ldar), R(14),
/* 22 E> */ B(JumpLoop), U8(77), I8(0), U8(13),
B(LdaSmi), I8(-1),
B(Star12),
......@@ -283,21 +283,21 @@ bytecodes: [
B(SetPendingMessage),
B(Star13),
B(Ldar), R(10),
B(JumpIfToBooleanTrue), U8(37),
B(Mov), R(context), R(15),
B(JumpIfToBooleanTrue), U8(36),
B(Mov), R(context), R(14),
B(GetNamedProperty), R(9), U8(10), U8(14),
B(JumpIfUndefinedOrNull), U8(28),
B(Star), R(16),
B(CallProperty0), R(16), R(9), U8(16),
B(JumpIfUndefinedOrNull), U8(27),
B(Star15),
B(CallProperty0), R(15), R(9), U8(16),
B(JumpIfJSReceiver), U8(20),
B(Star), R(17),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(17), U8(1),
B(Star), R(16),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(16), U8(1),
B(Jump), U8(11),
B(Star15),
B(Star14),
B(LdaZero),
B(TestReferenceEqual), R(11),
B(JumpIfTrue), U8(5),
B(Ldar), R(15),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(13),
B(SetPendingMessage),
......@@ -376,10 +376,10 @@ constant pool: [
Smi [22],
]
handlers: [
[18, 262, 262],
[21, 233, 233],
[18, 261, 261],
[21, 232, 232],
[72, 153, 159],
[172, 193, 195],
[172, 192, 194],
]
---
......
......@@ -14,9 +14,9 @@ snippet: "
}
f();
"
frame size: 19
frame size: 16
parameter count: 1
bytecode array length: 269
bytecode array length: 265
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -84,35 +84,35 @@ bytecodes: [
B(SetPendingMessage),
B(Star10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(72),
B(Mov), R(context), R(14),
B(JumpIfToBooleanTrue), U8(68),
B(Mov), R(context), R(11),
B(GetNamedProperty), R(6), U8(8), U8(18),
B(JumpIfUndefinedOrNull), U8(63),
B(Star15),
B(CallProperty0), R(15), R(6), U8(20),
B(Star), R(17),
B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
B(SuspendGenerator), R(0), R(0), U8(16), U8(1),
B(ResumeGenerator), R(0), R(0), U8(16),
B(Star), R(16),
B(JumpIfUndefinedOrNull), U8(59),
B(Star12),
B(CallProperty0), R(12), R(6), U8(20),
B(Star14),
B(Mov), R(0), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(13), U8(2),
B(SuspendGenerator), R(0), R(0), U8(13), U8(1),
B(ResumeGenerator), R(0), R(0), U8(13),
B(Star13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(17),
B(Star14),
B(LdaZero),
B(TestReferenceEqual), R(17),
B(TestReferenceEqual), R(14),
B(JumpIfTrue), U8(5),
B(Ldar), R(16),
B(Ldar), R(13),
B(ReThrow),
B(Ldar), R(16),
B(JumpIfJSReceiver), U8(20),
B(Star), R(18),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(18), U8(1),
B(Ldar), R(13),
B(JumpIfJSReceiver), U8(19),
B(Star15),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
B(Jump), U8(11),
B(Star14),
B(Star11),
B(LdaZero),
B(TestReferenceEqual), R(8),
B(JumpIfTrue), U8(5),
B(Ldar), R(14),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(10),
B(SetPendingMessage),
......@@ -141,7 +141,7 @@ bytecodes: [
]
constant pool: [
Smi [85],
Smi [184],
Smi [183],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
......@@ -152,9 +152,9 @@ constant pool: [
SCOPE_INFO_TYPE,
]
handlers: [
[18, 247, 247],
[18, 243, 243],
[66, 140, 146],
[159, 215, 217],
[159, 211, 213],
]
---
......@@ -164,9 +164,9 @@ snippet: "
}
f();
"
frame size: 19
frame size: 16
parameter count: 1
bytecode array length: 285
bytecode array length: 281
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -236,35 +236,35 @@ bytecodes: [
B(SetPendingMessage),
B(Star10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(72),
B(Mov), R(context), R(14),
B(JumpIfToBooleanTrue), U8(68),
B(Mov), R(context), R(11),
B(GetNamedProperty), R(6), U8(8), U8(18),
B(JumpIfUndefinedOrNull), U8(63),
B(Star15),
B(CallProperty0), R(15), R(6), U8(20),
B(Star), R(17),
B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
B(SuspendGenerator), R(0), R(0), U8(16), U8(1),
B(ResumeGenerator), R(0), R(0), U8(16),
B(Star), R(16),
B(JumpIfUndefinedOrNull), U8(59),
B(Star12),
B(CallProperty0), R(12), R(6), U8(20),
B(Star14),
B(Mov), R(0), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(13), U8(2),
B(SuspendGenerator), R(0), R(0), U8(13), U8(1),
B(ResumeGenerator), R(0), R(0), U8(13),
B(Star13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(17),
B(Star14),
B(LdaZero),
B(TestReferenceEqual), R(17),
B(TestReferenceEqual), R(14),
B(JumpIfTrue), U8(5),
B(Ldar), R(16),
B(Ldar), R(13),
B(ReThrow),
B(Ldar), R(16),
B(JumpIfJSReceiver), U8(20),
B(Star), R(18),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(18), U8(1),
B(Ldar), R(13),
B(JumpIfJSReceiver), U8(19),
B(Star15),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
B(Jump), U8(11),
B(Star14),
B(Star11),
B(LdaZero),
B(TestReferenceEqual), R(8),
B(JumpIfTrue), U8(5),
B(Ldar), R(14),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(10),
B(SetPendingMessage),
......@@ -273,9 +273,9 @@ bytecodes: [
B(Jump), U8(16),
B(Ldar), R(9),
B(ReThrow),
B(Mov), R(0), R(14),
B(Mov), R(9), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(14), U8(2),
B(Mov), R(0), R(11),
B(Mov), R(9), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(11), U8(2),
B(Return),
B(LdaUndefined),
B(Star6),
......@@ -297,7 +297,7 @@ bytecodes: [
]
constant pool: [
Smi [85],
Smi [186],
Smi [185],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
......@@ -310,9 +310,9 @@ constant pool: [
SCOPE_INFO_TYPE,
]
handlers: [
[18, 263, 263],
[18, 259, 259],
[66, 142, 148],
[161, 217, 219],
[161, 213, 215],
]
---
......@@ -325,9 +325,9 @@ snippet: "
}
f();
"
frame size: 19
frame size: 16
parameter count: 1
bytecode array length: 285
bytecode array length: 281
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -383,7 +383,7 @@ bytecodes: [
B(Mov), R(11), R(1),
/* 38 S> */ B(Mov), R(1), R(3),
/* 63 S> */ B(LdaSmi), I8(10),
/* 69 E> */ B(TestEqual), R(3), U8(17),
/* 69 E> */ B(TestEqual), R(11), U8(17),
B(JumpIfFalse), U8(4),
/* 76 S> */ B(Jump), U8(11),
/* 90 S> */ B(LdaSmi), I8(20),
......@@ -402,35 +402,35 @@ bytecodes: [
B(SetPendingMessage),
B(Star10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(72),
B(Mov), R(context), R(14),
B(JumpIfToBooleanTrue), U8(68),
B(Mov), R(context), R(11),
B(GetNamedProperty), R(6), U8(8), U8(20),
B(JumpIfUndefinedOrNull), U8(63),
B(Star15),
B(CallProperty0), R(15), R(6), U8(22),
B(Star), R(17),
B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
B(SuspendGenerator), R(0), R(0), U8(16), U8(1),
B(ResumeGenerator), R(0), R(0), U8(16),
B(Star), R(16),
B(JumpIfUndefinedOrNull), U8(59),
B(Star12),
B(CallProperty0), R(12), R(6), U8(22),
B(Star14),
B(Mov), R(0), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(13), U8(2),
B(SuspendGenerator), R(0), R(0), U8(13), U8(1),
B(ResumeGenerator), R(0), R(0), U8(13),
B(Star13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(17),
B(Star14),
B(LdaZero),
B(TestReferenceEqual), R(17),
B(TestReferenceEqual), R(14),
B(JumpIfTrue), U8(5),
B(Ldar), R(16),
B(Ldar), R(13),
B(ReThrow),
B(Ldar), R(16),
B(JumpIfJSReceiver), U8(20),
B(Star), R(18),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(18), U8(1),
B(Ldar), R(13),
B(JumpIfJSReceiver), U8(19),
B(Star15),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
B(Jump), U8(11),
B(Star14),
B(Star11),
B(LdaZero),
B(TestReferenceEqual), R(8),
B(JumpIfTrue), U8(5),
B(Ldar), R(14),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(10),
B(SetPendingMessage),
......@@ -459,7 +459,7 @@ bytecodes: [
]
constant pool: [
Smi [85],
Smi [200],
Smi [199],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
......@@ -470,9 +470,9 @@ constant pool: [
SCOPE_INFO_TYPE,
]
handlers: [
[18, 263, 263],
[18, 259, 259],
[66, 156, 162],
[175, 231, 233],
[175, 227, 229],
]
---
......@@ -483,9 +483,9 @@ snippet: "
}
f();
"
frame size: 14
frame size: 12
parameter count: 1
bytecode array length: 191
bytecode array length: 188
bytecodes: [
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
......@@ -510,7 +510,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(GetNamedProperty), R(9), U8(3), U8(10),
B(JumpIfToBooleanTrue), U8(28),
B(JumpIfToBooleanTrue), U8(25),
B(GetNamedProperty), R(9), U8(4), U8(12),
B(Star9),
B(LdaFalse),
......@@ -521,7 +521,6 @@ bytecodes: [
B(Star7),
B(LdaSmi), I8(1),
B(Star6),
B(Mov), R(1), R(10),
B(Jump), U8(11),
B(LdaSmi), I8(-1),
B(Star7),
......@@ -535,20 +534,20 @@ bytecodes: [
B(Star8),
B(Ldar), R(5),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11),
B(Mov), R(context), R(9),
B(GetNamedProperty), R(4), U8(6), U8(19),
B(JumpIfUndefinedOrNull), U8(26),
B(Star12),
B(CallProperty0), R(12), R(4), U8(21),
B(Star10),
B(CallProperty0), R(10), R(4), U8(21),
B(JumpIfJSReceiver), U8(19),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Jump), U8(11),
B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Jump), U8(11),
B(Star9),
B(LdaZero),
B(TestReferenceEqual), R(6),
B(JumpIfTrue), U8(5),
B(Ldar), R(11),
B(Ldar), R(9),
B(ReThrow),
B(Ldar), R(8),
B(SetPendingMessage),
......@@ -557,9 +556,9 @@ bytecodes: [
B(Jump), U8(16),
B(Ldar), R(7),
B(ReThrow),
B(Mov), R(0), R(11),
B(Mov), R(7), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(11), U8(2),
B(Mov), R(0), R(9),
B(Mov), R(7), R(10),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(9), U8(2),
B(Return),
B(LdaUndefined),
B(Star4),
......@@ -592,8 +591,8 @@ constant pool: [
SCOPE_INFO_TYPE,
]
handlers: [
[14, 169, 169],
[39, 85, 91],
[104, 123, 125],
[14, 166, 166],
[39, 82, 88],
[101, 120, 122],
]
......@@ -9,7 +9,7 @@ wrap: yes
snippet: "
for (var p of [0, 1, 2]) {}
"
frame size: 12
frame size: 11
parameter count: 1
bytecode array length: 121
bytecodes: [
......@@ -50,20 +50,20 @@ bytecodes: [
B(Star7),
B(Ldar), R(4),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(9),
B(Mov), R(context), R(8),
B(GetNamedProperty), R(3), U8(4), U8(14),
B(JumpIfUndefinedOrNull), U8(26),
B(Star10),
B(CallProperty0), R(10), R(3), U8(16),
B(Star9),
B(CallProperty0), R(9), R(3), U8(16),
B(JumpIfJSReceiver), U8(19),
B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Star10),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(Jump), U8(11),
B(Star9),
B(Star8),
B(LdaZero),
B(TestReferenceEqual), R(5),
B(JumpIfTrue), U8(5),
B(Ldar), R(9),
B(Ldar), R(8),
B(ReThrow),
B(Ldar), R(7),
B(SetPendingMessage),
......@@ -92,7 +92,7 @@ snippet: "
var x = 'potatoes';
for (var p of x) { return p; }
"
frame size: 13
frame size: 12
parameter count: 1
bytecode array length: 127
bytecodes: [
......@@ -135,20 +135,20 @@ bytecodes: [
B(Star8),
B(Ldar), R(5),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(10),
B(Mov), R(context), R(9),
B(GetNamedProperty), R(4), U8(4), U8(13),
B(JumpIfUndefinedOrNull), U8(26),
B(Star11),
B(CallProperty0), R(11), R(4), U8(15),
B(Star10),
B(CallProperty0), R(10), R(4), U8(15),
B(JumpIfJSReceiver), U8(19),
B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Jump), U8(11),
B(Star10),
B(Star9),
B(LdaZero),
B(TestReferenceEqual), R(6),
B(JumpIfTrue), U8(5),
B(Ldar), R(10),
B(Ldar), R(9),
B(ReThrow),
B(Ldar), R(8),
B(SetPendingMessage),
......@@ -183,7 +183,7 @@ snippet: "
if (x == 20) break;
}
"
frame size: 12
frame size: 11
parameter count: 1
bytecode array length: 137
bytecodes: [
......@@ -211,7 +211,7 @@ bytecodes: [
B(Mov), R(8), R(1),
/* 43 S> */ B(Mov), R(1), R(0),
/* 66 S> */ B(LdaSmi), I8(10),
/* 72 E> */ B(TestEqual), R(0), U8(13),
/* 72 E> */ B(TestEqual), R(8), U8(13),
B(JumpIfFalse), U8(4),
/* 79 S> */ B(Jump), U8(11),
/* 91 S> */ B(LdaSmi), I8(20),
......@@ -231,20 +231,20 @@ bytecodes: [
B(Star7),
B(Ldar), R(4),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(9),
B(Mov), R(context), R(8),
B(GetNamedProperty), R(3), U8(4), U8(16),
B(JumpIfUndefinedOrNull), U8(26),
B(Star10),
B(CallProperty0), R(10), R(3), U8(18),
B(Star9),
B(CallProperty0), R(9), R(3), U8(18),
B(JumpIfJSReceiver), U8(19),
B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Star10),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(Jump), U8(11),
B(Star9),
B(Star8),
B(LdaZero),
B(TestReferenceEqual), R(5),
B(JumpIfTrue), U8(5),
B(Ldar), R(9),
B(Ldar), R(8),
B(ReThrow),
B(Ldar), R(7),
B(SetPendingMessage),
......@@ -273,9 +273,9 @@ snippet: "
var x = { 'a': 1, 'b': 2 };
for (x['a'] of [1,2,3]) { return x['a']; }
"
frame size: 12
frame size: 10
parameter count: 1
bytecode array length: 139
bytecode array length: 136
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star0),
......@@ -295,7 +295,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
B(GetNamedProperty), R(7), U8(3), U8(10),
B(JumpIfToBooleanTrue), U8(28),
B(JumpIfToBooleanTrue), U8(25),
B(GetNamedProperty), R(7), U8(4), U8(12),
B(Star7),
B(LdaFalse),
......@@ -306,7 +306,6 @@ bytecodes: [
B(Star5),
B(LdaSmi), I8(1),
B(Star4),
B(Mov), R(0), R(8),
B(Jump), U8(11),
B(LdaSmi), I8(-1),
B(Star5),
......@@ -320,20 +319,20 @@ bytecodes: [
B(Star6),
B(Ldar), R(3),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(9),
B(Mov), R(context), R(7),
B(GetNamedProperty), R(2), U8(6), U8(19),
B(JumpIfUndefinedOrNull), U8(26),
B(Star10),
B(CallProperty0), R(10), R(2), U8(21),
B(Star8),
B(CallProperty0), R(8), R(2), U8(21),
B(JumpIfJSReceiver), U8(19),
B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Jump), U8(11),
B(Star9),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(Jump), U8(11),
B(Star7),
B(LdaZero),
B(TestReferenceEqual), R(4),
B(JumpIfTrue), U8(5),
B(Ldar), R(9),
B(Ldar), R(7),
B(ReThrow),
B(Ldar), R(6),
B(SetPendingMessage),
......@@ -359,7 +358,7 @@ constant pool: [
Smi [9],
]
handlers: [
[25, 71, 77],
[90, 109, 111],
[25, 68, 74],
[87, 106, 108],
]
......@@ -13,7 +13,7 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 14
frame size: 13
parameter count: 2
bytecode array length: 119
bytecodes: [
......@@ -53,20 +53,20 @@ bytecodes: [
B(Star9),
B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11),
B(Mov), R(context), R(10),
B(GetNamedProperty), R(5), U8(3), U8(13),
B(JumpIfUndefinedOrNull), U8(26),
B(Star12),
B(CallProperty0), R(12), R(5), U8(15),
B(Star11),
B(CallProperty0), R(11), R(5), U8(15),
B(JumpIfJSReceiver), U8(19),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(Jump), U8(11),
B(Star11),
B(Star10),
B(LdaZero),
B(TestReferenceEqual), R(7),
B(JumpIfTrue), U8(5),
B(Ldar), R(11),
B(Ldar), R(10),
B(ReThrow),
B(Ldar), R(9),
B(SetPendingMessage),
......@@ -96,9 +96,9 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 20
frame size: 19
parameter count: 2
bytecode array length: 199
bytecode array length: 196
bytecodes: [
/* 10 E> */ B(CreateFunctionContext), U8(0), U8(5),
B(PushContext), R(2),
......@@ -130,37 +130,36 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(3), U8(8),
B(JumpIfToBooleanTrue), U8(70),
B(JumpIfToBooleanTrue), U8(67),
B(GetNamedProperty), R(10), U8(4), U8(10),
B(Star10),
B(LdaFalse),
B(Star6),
B(Mov), R(10), R(0),
B(CreateBlockContext), U8(5),
B(PushContext), R(11),
B(PushContext), R(10),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 29 S> */ B(Ldar), R(0),
/* 29 E> */ B(StaCurrentContextSlot), U8(2),
/* 41 S> */ B(LdaLookupGlobalSlot), U8(6), U8(12), U8(3),
B(Star12),
B(Star11),
B(LdaConstant), U8(7),
B(Star13),
B(Star12),
B(LdaZero),
B(Star), R(17),
B(Star), R(16),
B(LdaSmi), I8(37),
B(Star), R(18),
B(Star), R(17),
B(LdaSmi), I8(41),
B(Star), R(19),
B(Star), R(18),
B(Mov), R(11), R(13),
B(Mov), R(12), R(14),
B(Mov), R(13), R(15),
B(Mov), R(closure), R(16),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(14), U8(6),
B(Star12),
/* 41 E> */ B(CallUndefinedReceiver1), R(12), R(13), U8(14),
B(PopContext), R(11),
B(Mov), R(0), R(10),
/* 20 E> */ B(JumpLoop), U8(84), I8(0), U8(16),
B(Mov), R(closure), R(15),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(13), U8(6),
B(Star11),
/* 41 E> */ B(CallUndefinedReceiver1), R(11), R(12), U8(14),
B(PopContext), R(10),
/* 20 E> */ B(JumpLoop), U8(81), I8(0), U8(16),
B(LdaSmi), I8(-1),
B(Star8),
B(Star7),
......@@ -173,20 +172,20 @@ bytecodes: [
B(Star9),
B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(12),
B(Mov), R(context), R(11),
B(GetNamedProperty), R(5), U8(8), U8(17),
B(JumpIfUndefinedOrNull), U8(26),
B(Star13),
B(CallProperty0), R(13), R(5), U8(19),
B(Star12),
B(CallProperty0), R(12), R(5), U8(19),
B(JumpIfJSReceiver), U8(19),
B(Star14),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Jump), U8(11),
B(Star12),
B(Star11),
B(LdaZero),
B(TestReferenceEqual), R(7),
B(JumpIfTrue), U8(5),
B(Ldar), R(12),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(9),
B(SetPendingMessage),
......@@ -211,8 +210,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
]
handlers: [
[47, 135, 141],
[154, 173, 175],
[47, 132, 138],
[151, 170, 172],
]
---
......@@ -222,9 +221,9 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 13
frame size: 12
parameter count: 2
bytecode array length: 135
bytecode array length: 132
bytecodes: [
/* 34 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
B(Star3),
......@@ -240,24 +239,23 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
B(GetNamedProperty), R(8), U8(1), U8(8),
B(JumpIfToBooleanTrue), U8(40),
B(JumpIfToBooleanTrue), U8(37),
B(GetNamedProperty), R(8), U8(2), U8(10),
B(Star8),
B(LdaFalse),
B(Star4),
B(Mov), R(8), R(0),
B(CreateBlockContext), U8(3),
B(PushContext), R(9),
B(PushContext), R(8),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 29 S> */ B(Ldar), R(0),
/* 29 E> */ B(StaCurrentContextSlot), U8(2),
/* 41 S> */ B(CreateClosure), U8(4), U8(0), U8(2),
B(Star10),
/* 67 E> */ B(CallUndefinedReceiver0), R(10), U8(12),
B(PopContext), R(9),
B(Mov), R(0), R(8),
/* 20 E> */ B(JumpLoop), U8(54), I8(0), U8(14),
B(Star9),
/* 67 E> */ B(CallUndefinedReceiver0), R(9), U8(12),
B(PopContext), R(8),
/* 20 E> */ B(JumpLoop), U8(51), I8(0), U8(14),
B(LdaSmi), I8(-1),
B(Star6),
B(Star5),
......@@ -270,20 +268,20 @@ bytecodes: [
B(Star7),
B(Ldar), R(4),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(10),
B(Mov), R(context), R(9),
B(GetNamedProperty), R(3), U8(5), U8(15),
B(JumpIfUndefinedOrNull), U8(26),
B(Star11),
B(CallProperty0), R(11), R(3), U8(17),
B(Star10),
B(CallProperty0), R(10), R(3), U8(17),
B(JumpIfJSReceiver), U8(19),
B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Jump), U8(11),
B(Star10),
B(Star9),
B(LdaZero),
B(TestReferenceEqual), R(5),
B(JumpIfTrue), U8(5),
B(Ldar), R(10),
B(Ldar), R(9),
B(ReThrow),
B(Ldar), R(7),
B(SetPendingMessage),
......@@ -304,8 +302,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
]
handlers: [
[15, 73, 79],
[92, 111, 113],
[15, 70, 76],
[89, 108, 110],
]
---
......@@ -315,7 +313,7 @@ snippet: "
}
f([{ x: 0, y: 3 }, { x: 1, y: 9 }, { x: -12, y: 17 }]);
"
frame size: 16
frame size: 15
parameter count: 2
bytecode array length: 127
bytecodes: [
......@@ -339,9 +337,9 @@ bytecodes: [
B(LdaFalse),
B(Star8),
B(Mov), R(12), R(0),
/* 31 S> */ B(GetNamedProperty), R(0), U8(3), U8(12),
/* 31 S> */ B(GetNamedProperty), R(12), U8(3), U8(12),
B(Star3),
/* 34 S> */ B(GetNamedProperty), R(0), U8(4), U8(14),
/* 34 S> */ B(GetNamedProperty), R(12), U8(4), U8(14),
B(Star4),
/* 56 S> */ B(Ldar), R(4),
/* 58 E> */ B(Add), R(3), U8(16),
......@@ -359,20 +357,20 @@ bytecodes: [
B(Star11),
B(Ldar), R(8),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(13),
B(Mov), R(context), R(12),
B(GetNamedProperty), R(7), U8(5), U8(18),
B(JumpIfUndefinedOrNull), U8(26),
B(Star14),
B(CallProperty0), R(14), R(7), U8(20),
B(Star13),
B(CallProperty0), R(13), R(7), U8(20),
B(JumpIfJSReceiver), U8(19),
B(Star15),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
B(Star14),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
B(Jump), U8(11),
B(Star13),
B(Star12),
B(LdaZero),
B(TestReferenceEqual), R(9),
B(JumpIfTrue), U8(5),
B(Ldar), R(13),
B(Ldar), R(12),
B(ReThrow),
B(Ldar), R(11),
B(SetPendingMessage),
......@@ -404,7 +402,7 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 15
frame size: 14
parameter count: 2
bytecode array length: 158
bytecodes: [
......@@ -458,20 +456,20 @@ bytecodes: [
B(Star10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(12),
B(Mov), R(context), R(11),
B(GetNamedProperty), R(6), U8(6), U8(13),
B(JumpIfUndefinedOrNull), U8(26),
B(Star13),
B(CallProperty0), R(13), R(6), U8(15),
B(Star12),
B(CallProperty0), R(12), R(6), U8(15),
B(JumpIfJSReceiver), U8(19),
B(Star14),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Jump), U8(11),
B(Star12),
B(Star11),
B(LdaZero),
B(TestReferenceEqual), R(8),
B(JumpIfTrue), U8(5),
B(Ldar), R(12),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(10),
B(SetPendingMessage),
......@@ -504,9 +502,9 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 14
frame size: 13
parameter count: 2
bytecode array length: 199
bytecode array length: 196
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -536,7 +534,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(5), U8(8),
B(JumpIfToBooleanTrue), U8(59),
B(JumpIfToBooleanTrue), U8(56),
B(GetNamedProperty), R(10), U8(6), U8(10),
B(Star10),
B(LdaFalse),
......@@ -544,22 +542,21 @@ bytecodes: [
B(Mov), R(10), R(1),
/* 30 S> */ B(Mov), R(1), R(3),
/* 40 S> */ B(LdaFalse),
B(Star12),
B(Mov), R(3), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(1),
B(ResumeGenerator), R(0), R(0), U8(11),
B(Star11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(10), U8(1),
B(ResumeGenerator), R(0), R(0), U8(10),
B(Star10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
B(Ldar), R(11),
B(Ldar), R(10),
/* 40 E> */ B(Throw),
B(LdaSmi), I8(1),
B(Star7),
B(Mov), R(11), R(8),
B(Mov), R(10), R(8),
B(Jump), U8(17),
B(Ldar), R(11),
/* 21 E> */ B(JumpLoop), U8(73), I8(0), U8(12),
B(Ldar), R(10),
/* 21 E> */ B(JumpLoop), U8(70), I8(0), U8(12),
B(LdaSmi), I8(-1),
B(Star8),
B(Star7),
......@@ -572,20 +569,20 @@ bytecodes: [
B(Star9),
B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11),
B(Mov), R(context), R(10),
B(GetNamedProperty), R(5), U8(9), U8(13),
B(JumpIfUndefinedOrNull), U8(26),
B(Star12),
B(CallProperty0), R(12), R(5), U8(15),
B(Star11),
B(CallProperty0), R(11), R(5), U8(15),
B(JumpIfJSReceiver), U8(19),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(Jump), U8(11),
B(Star11),
B(Star10),
B(LdaZero),
B(TestReferenceEqual), R(7),
B(JumpIfTrue), U8(5),
B(Ldar), R(11),
B(Ldar), R(10),
B(ReThrow),
B(Ldar), R(9),
B(SetPendingMessage),
......@@ -601,7 +598,7 @@ bytecodes: [
]
constant pool: [
Smi [20],
Smi [101],
Smi [98],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
......@@ -614,8 +611,8 @@ constant pool: [
Smi [9],
]
handlers: [
[54, 131, 137],
[150, 169, 171],
[54, 128, 134],
[147, 166, 168],
]
---
......@@ -625,7 +622,7 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 16
frame size: 15
parameter count: 2
bytecode array length: 163
bytecodes: [
......@@ -670,20 +667,20 @@ bytecodes: [
B(Star11),
B(Ldar), R(8),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(13),
B(Mov), R(context), R(12),
B(GetNamedProperty), R(7), U8(3), U8(13),
B(JumpIfUndefinedOrNull), U8(26),
B(Star14),
B(CallProperty0), R(14), R(7), U8(15),
B(Star13),
B(CallProperty0), R(13), R(7), U8(15),
B(JumpIfJSReceiver), U8(19),
B(Star15),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
B(Star14),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
B(Jump), U8(11),
B(Star13),
B(Star12),
B(LdaZero),
B(TestReferenceEqual), R(9),
B(JumpIfTrue), U8(5),
B(Ldar), R(13),
B(Ldar), R(12),
B(ReThrow),
B(Ldar), R(11),
B(SetPendingMessage),
......@@ -730,7 +727,7 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 15
frame size: 14
parameter count: 2
bytecode array length: 197
bytecodes: [
......@@ -761,20 +758,20 @@ bytecodes: [
B(Star7),
B(Mov), R(11), R(1),
/* 35 S> */ B(Mov), R(1), R(3),
/* 45 S> */ B(Mov), R(0), R(12),
B(Mov), R(3), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(12), U8(2),
/* 45 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(0),
B(ResumeGenerator), R(0), R(0), U8(12),
B(Star12),
/* 45 S> */ B(Mov), R(0), R(11),
B(Mov), R(3), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(11), U8(2),
/* 45 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(0),
B(ResumeGenerator), R(0), R(0), U8(11),
B(Star11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star13),
B(Star12),
B(LdaZero),
B(TestReferenceEqual), R(13),
B(TestReferenceEqual), R(12),
B(JumpIfTrue), U8(5),
B(Ldar), R(12),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(12),
B(Ldar), R(11),
/* 26 E> */ B(JumpLoop), U8(68), I8(0), U8(12),
B(LdaSmi), I8(-1),
B(Star9),
......@@ -788,20 +785,20 @@ bytecodes: [
B(Star10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(12),
B(Mov), R(context), R(11),
B(GetNamedProperty), R(6), U8(4), U8(13),
B(JumpIfUndefinedOrNull), U8(26),
B(Star13),
B(CallProperty0), R(13), R(6), U8(15),
B(Star12),
B(CallProperty0), R(12), R(6), U8(15),
B(JumpIfJSReceiver), U8(19),
B(Star14),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Jump), U8(11),
B(Star12),
B(Star11),
B(LdaZero),
B(TestReferenceEqual), R(8),
B(JumpIfTrue), U8(5),
B(Ldar), R(12),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(10),
B(SetPendingMessage),
......
......@@ -96,9 +96,9 @@ snippet: "
function* f() { for (let x of [42]) yield x }
f();
"
frame size: 14
frame size: 13
parameter count: 1
bytecode array length: 204
bytecode array length: 201
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -130,7 +130,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(6), U8(9),
B(JumpIfToBooleanTrue), U8(59),
B(JumpIfToBooleanTrue), U8(56),
B(GetNamedProperty), R(10), U8(7), U8(11),
B(Star10),
B(LdaFalse),
......@@ -138,22 +138,21 @@ bytecodes: [
B(Mov), R(10), R(1),
/* 25 S> */ B(Mov), R(1), R(3),
/* 36 S> */ B(LdaFalse),
B(Star12),
B(Mov), R(3), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
/* 36 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(1),
B(ResumeGenerator), R(0), R(0), U8(11),
B(Star11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
/* 36 E> */ B(SuspendGenerator), R(0), R(0), U8(10), U8(1),
B(ResumeGenerator), R(0), R(0), U8(10),
B(Star10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
B(Ldar), R(11),
B(Ldar), R(10),
/* 36 E> */ B(Throw),
B(LdaSmi), I8(1),
B(Star7),
B(Mov), R(11), R(8),
B(Mov), R(10), R(8),
B(Jump), U8(17),
B(Ldar), R(11),
/* 16 E> */ B(JumpLoop), U8(73), I8(0), U8(13),
B(Ldar), R(10),
/* 16 E> */ B(JumpLoop), U8(70), I8(0), U8(13),
B(LdaSmi), I8(-1),
B(Star8),
B(Star7),
......@@ -166,20 +165,20 @@ bytecodes: [
B(Star9),
B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11),
B(Mov), R(context), R(10),
B(GetNamedProperty), R(5), U8(10), U8(14),
B(JumpIfUndefinedOrNull), U8(26),
B(Star12),
B(CallProperty0), R(12), R(5), U8(16),
B(Star11),
B(CallProperty0), R(11), R(5), U8(16),
B(JumpIfJSReceiver), U8(19),
B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(Jump), U8(11),
B(Star11),
B(Star10),
B(LdaZero),
B(TestReferenceEqual), R(7),
B(JumpIfTrue), U8(5),
B(Ldar), R(11),
B(Ldar), R(10),
B(ReThrow),
B(Ldar), R(9),
B(SetPendingMessage),
......@@ -195,7 +194,7 @@ bytecodes: [
]
constant pool: [
Smi [20],
Smi [106],
Smi [103],
Smi [10],
Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
......@@ -209,8 +208,8 @@ constant pool: [
Smi [9],
]
handlers: [
[59, 136, 142],
[155, 174, 176],
[59, 133, 139],
[152, 171, 173],
]
---
......
......@@ -14,7 +14,7 @@ snippet: "
}
}
"
frame size: 7
frame size: 6
parameter count: 1
bytecode array length: 57
bytecodes: [
......@@ -25,19 +25,19 @@ bytecodes: [
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star6),
B(Star5),
B(CreateClosure), U8(3), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star4),
B(Mov), R(2), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(Star3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star3),
B(CreateClosure), U8(4), U8(1), U8(2),
B(Star5),
B(Star4),
B(CreateClosure), U8(5), U8(2), U8(2),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(Star5),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(4), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(2), R(0),
......@@ -63,7 +63,7 @@ snippet: "
}
}
"
frame size: 7
frame size: 6
parameter count: 1
bytecode array length: 54
bytecodes: [
......@@ -74,19 +74,19 @@ bytecodes: [
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star6),
B(Star5),
B(CreateClosure), U8(3), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star4),
B(Mov), R(2), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(Star3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star3),
B(CreateClosure), U8(4), U8(1), U8(2),
B(Star5),
B(Star4),
B(LdaNull),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(Star5),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(4), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(2), R(0),
......@@ -111,7 +111,7 @@ snippet: "
}
}
"
frame size: 7
frame size: 6
parameter count: 1
bytecode array length: 54
bytecodes: [
......@@ -122,19 +122,19 @@ bytecodes: [
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star6),
B(Star5),
B(CreateClosure), U8(3), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star4),
B(Mov), R(2), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(Star3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star3),
B(LdaNull),
B(Star5),
B(Star4),
B(CreateClosure), U8(4), U8(1), U8(2),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(Star5),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(4), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(2), R(0),
......@@ -165,7 +165,7 @@ snippet: "
}
}
"
frame size: 8
frame size: 7
parameter count: 1
bytecode array length: 113
bytecodes: [
......@@ -176,19 +176,19 @@ bytecodes: [
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star7),
B(Star6),
B(CreateClosure), U8(3), U8(0), U8(2),
B(Star3),
B(LdaConstant), U8(1),
B(Star5),
B(Mov), R(3), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star5),
B(Star4),
B(Mov), R(3), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(CreateClosure), U8(4), U8(1), U8(2),
B(Star6),
B(Star5),
B(CreateClosure), U8(5), U8(2), U8(2),
B(Star7),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(6), U8(2),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(2),
B(Mov), R(3), R(0),
......@@ -201,16 +201,16 @@ bytecodes: [
/* 118 E> */ B(CreateClosure), U8(9), U8(3), U8(2),
B(Star3),
B(LdaConstant), U8(7),
B(Star5),
B(Mov), R(3), R(6),
B(Mov), R(0), R(7),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star5),
B(Star4),
B(Mov), R(3), R(5),
B(Mov), R(0), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(CreateClosure), U8(10), U8(4), U8(2),
B(Star6),
B(Star5),
B(CreateClosure), U8(11), U8(5), U8(2),
B(Star7),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(6), U8(2),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(2),
B(Mov), R(3), R(1),
......@@ -272,19 +272,19 @@ bytecodes: [
/* 77 E> */ B(CreateClosure), U8(7), U8(2), U8(2),
B(Star3),
B(LdaConstant), U8(5),
B(Star5),
B(Mov), R(3), R(6),
B(Mov), R(0), R(7),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star4),
B(Mov), R(3), R(5),
B(Mov), R(0), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(StaCurrentContextSlot), U8(4),
B(Star5),
B(Ldar), R(6),
B(Star4),
B(Ldar), R(5),
B(StaCurrentContextSlot), U8(5),
B(CreateClosure), U8(8), U8(3), U8(2),
B(Star6),
B(Star5),
B(LdaNull),
B(Star7),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(6), U8(2),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(2),
B(Mov), R(3), R(1),
......@@ -345,19 +345,19 @@ bytecodes: [
/* 80 E> */ B(CreateClosure), U8(7), U8(2), U8(2),
B(Star3),
B(LdaConstant), U8(5),
B(Star5),
B(Mov), R(3), R(6),
B(Mov), R(0), R(7),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star4),
B(Mov), R(3), R(5),
B(Mov), R(0), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(StaCurrentContextSlot), U8(4),
B(Star5),
B(Ldar), R(6),
B(Star4),
B(Ldar), R(5),
B(StaCurrentContextSlot), U8(5),
B(LdaNull),
B(Star6),
B(Star5),
B(CreateClosure), U8(8), U8(3), U8(2),
B(Star7),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(6), U8(2),
B(Star6),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(5), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(2),
B(Mov), R(3), R(1),
......
......@@ -13,7 +13,7 @@ snippet: "
}
}
"
frame size: 7
frame size: 6
parameter count: 1
bytecode array length: 46
bytecodes: [
......@@ -26,16 +26,16 @@ bytecodes: [
B(CreateClosure), U8(3), U8(0), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star6),
B(Star5),
B(CreateClosure), U8(4), U8(1), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star4),
B(Mov), R(2), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(Star3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star3),
B(PopContext), R(1),
B(Mov), R(5), R(0),
B(Mov), R(4), R(0),
B(LdaUndefined),
/* 77 S> */ B(Return),
]
......@@ -60,7 +60,7 @@ snippet: "
}
}
"
frame size: 8
frame size: 7
parameter count: 1
bytecode array length: 91
bytecodes: [
......@@ -73,16 +73,16 @@ bytecodes: [
B(CreateClosure), U8(3), U8(0), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star7),
B(Star6),
B(CreateClosure), U8(4), U8(1), U8(2),
B(Star3),
B(LdaConstant), U8(1),
B(Star5),
B(Mov), R(3), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star5),
B(Star4),
B(Mov), R(3), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(PopContext), R(2),
B(Mov), R(6), R(0),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(5),
B(PushContext), R(2),
B(LdaConstant), U8(7),
......@@ -94,13 +94,13 @@ bytecodes: [
/* 93 E> */ B(CreateClosure), U8(9), U8(3), U8(2),
B(Star3),
B(LdaConstant), U8(6),
B(Star5),
B(Mov), R(3), R(6),
B(Mov), R(0), R(7),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star5),
B(Star4),
B(Mov), R(3), R(5),
B(Mov), R(0), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(PopContext), R(2),
B(Mov), R(6), R(1),
B(Mov), R(5), R(1),
B(LdaUndefined),
/* 126 S> */ B(Return),
]
......@@ -158,13 +158,13 @@ bytecodes: [
/* 77 E> */ B(CreateClosure), U8(8), U8(3), U8(2),
B(Star3),
B(LdaConstant), U8(5),
B(Star5),
B(Mov), R(3), R(6),
B(Mov), R(0), R(7),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
B(Star4),
B(Mov), R(3), R(5),
B(Mov), R(0), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(StaCurrentContextSlot), U8(4),
B(Star5),
B(Ldar), R(6),
B(Star4),
B(Ldar), R(5),
B(StaCurrentContextSlot), U8(5),
B(PopContext), R(2),
B(Star1),
......
......@@ -184,7 +184,7 @@ snippet: "
}
}
"
frame size: 7
frame size: 6
parameter count: 1
bytecode array length: 52
bytecodes: [
......@@ -199,16 +199,16 @@ bytecodes: [
B(CreateClosure), U8(4), U8(1), U8(2),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star6),
B(Star5),
B(CreateClosure), U8(5), U8(2), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star4),
B(Mov), R(2), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star4),
B(Star3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star3),
B(PopContext), R(1),
B(Mov), R(5), R(0),
B(Mov), R(4), R(0),
B(LdaUndefined),
/* 87 S> */ B(Return),
]
......
......@@ -461,7 +461,7 @@ snippet: "
case 2: a = 3;
}
"
frame size: 3
frame size: 2
parameter count: 1
bytecode array length: 52
bytecodes: [
......@@ -477,9 +477,9 @@ bytecodes: [
B(Jump), U8(30),
/* 70 S> */ B(Ldar), R(0),
/* 79 E> */ B(AddSmi), I8(1), U8(1),
B(Star2),
B(Star1),
B(LdaSmi), I8(2),
B(TestEqualStrict), R(2), U8(2),
B(TestEqualStrict), R(1), U8(2),
B(JumpIfTrue), U8(4),
B(Jump), U8(7),
/* 101 S> */ B(LdaSmi), I8(1),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment