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,40 +2421,43 @@ 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.
builder()->SetExpressionAsStatementPosition(stmt->each());
BuildIteratorNext(iterator, next_result);
builder()->LoadNamedProperty(
next_result, ast_string_constants()->done_string(),
feedback_index(feedback_spec()->AddLoadICSlot()));
loop_builder.BreakIfTrue(ToBooleanMode::kConvertToBoolean);
{
RegisterAllocationScope allocation_scope(this);
Register next_result = register_allocator()->NewRegister();
builder()
// value = value.value
->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.
builder()
->StoreAccumulatorInRegister(next_result)
.LoadFalse()
.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.
builder()->SetExpressionAsStatementPosition(stmt->each());
BuildIteratorNext(iterator, next_result);
builder()->LoadNamedProperty(
next_result, ast_string_constants()->done_string(),
feedback_index(feedback_spec()->AddLoadICSlot()));
loop_builder.BreakIfTrue(ToBooleanMode::kConvertToBoolean);
// Assign to the 'each' target.
AssignmentLhsData lhs_data = PrepareAssignmentLhs(stmt->each());
builder()->LoadAccumulatorWithRegister(next_result);
BuildAssignment(lhs_data, Token::ASSIGN, LookupHoistingMode::kNormal);
builder()
// value = value.value
->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.
builder()
->StoreAccumulatorInRegister(next_result)
.LoadFalse()
.StoreAccumulatorInRegister(done);
// Assign to the 'each' target.
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],
]
---
......
......@@ -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],
]
......@@ -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