Commit b8d8ab41 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[interpreter] Move IterationBody StackChecks to end of loops

This CL is a step towards making StackChecks implicit. In a follow-up CL
said StackChecks will become implicit within JumpLoops.

Cq-Include-Trybots: luci.chromium.try:linux-rel
Bug: v8:10149, v8:9960
Change-Id: I5ae247be3f7a58ccdf86398cace30724715767a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062391
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66668}
parent 1dcaea82
......@@ -1860,7 +1860,6 @@ void BytecodeGenerator::VisitIterationBody(IterationStatement* stmt,
LoopBuilder* loop_builder) {
loop_builder->LoopBody();
ControlScopeForIteration execution_control(this, stmt, loop_builder);
builder()->StackCheck(stmt->position());
Visit(stmt->body());
loop_builder->BindContinueTarget();
}
......
......@@ -68,7 +68,8 @@ class V8_EXPORT_PRIVATE BytecodeRegisterOptimizer final
if (Bytecodes::IsJump(bytecode) || Bytecodes::IsSwitch(bytecode) ||
bytecode == Bytecode::kDebugger ||
bytecode == Bytecode::kSuspendGenerator ||
bytecode == Bytecode::kResumeGenerator) {
bytecode == Bytecode::kResumeGenerator ||
bytecode == Bytecode::kStackCheck) {
// All state must be flushed before emitting
// - a jump bytecode (as the register equivalents at the jump target
// aren't known)
......
......@@ -77,6 +77,7 @@ void LoopBuilder::JumpToHeader(int loop_depth, LoopBuilder* const parent_loop) {
// they are a nested inner loop too, a Jump to its parent's JumpToHeader.
parent_loop->JumpToLoopEnd();
} else {
builder()->StackCheck(source_position_);
// Pass the proper loop nesting level to the backwards branch, to trigger
// on-stack replacement when armed for the given loop nesting depth.
int level = Min(loop_depth, AbstractCode::kMaxLoopNestingMarker - 1);
......
......@@ -105,6 +105,7 @@ class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder {
block_coverage_builder_->AllocateBlockCoverageSlot(
node, SourceRangeKind::kBody);
}
source_position_ = node ? node->position() : kNoSourcePosition;
}
~LoopBuilder() override;
......@@ -140,6 +141,8 @@ class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder {
BytecodeLabels end_labels_;
int block_coverage_body_slot_;
int source_position_;
};
// A class to help with co-ordinating break statements with their switch.
......
......@@ -138,7 +138,7 @@ snippet: "
"
frame size: 6
parameter count: 1
bytecode array length: 74
bytecode array length: 75
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(0),
......@@ -157,13 +157,14 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(4), U8(17),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(20),
B(LdaNamedProperty), R(5), U8(5), U8(8),
B(StaInArrayLiteral), R(2), R(1), U8(13),
B(Ldar), R(1),
B(Inc), U8(12),
B(Star), R(1),
B(JumpLoop), U8(33), I8(0),
B(StackCheck),
B(JumpLoop), U8(34), I8(0),
B(Ldar), R(2),
/* 71 S> */ B(Return),
]
......
......@@ -255,7 +255,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(10),
B(Mov), R(14), R(1),
/* 22 E> */ B(StackCheck),
/* 31 S> */ B(Mov), R(1), R(3),
/* 42 S> */ B(LdaFalse),
B(Star), R(17),
......@@ -272,8 +271,9 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star), R(11),
B(Mov), R(15), R(12),
B(Jump), U8(20),
B(Jump), U8(21),
B(Ldar), R(15),
/* 22 E> */ B(StackCheck),
B(JumpLoop), U8(84), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(12),
......@@ -369,7 +369,7 @@ bytecodes: [
]
constant pool: [
Smi [29],
Smi [142],
Smi [141],
Smi [16],
Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
......@@ -403,7 +403,7 @@ snippet: "
"
frame size: 17
parameter count: 1
bytecode array length: 463
bytecode array length: 464
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
B(Mov), R(closure), R(1),
......@@ -471,7 +471,7 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star), R(1),
B(Mov), R(10), R(2),
B(Jump), U8(238),
B(Jump), U8(239),
B(LdaNamedProperty), R(7), U8(14), U8(20),
B(JumpIfUndefinedOrNull), U8(11),
B(Star), R(12),
......@@ -518,7 +518,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(15), U8(28),
B(JumpIfToBooleanTrue), U8(38),
B(JumpIfToBooleanTrue), U8(39),
B(LdaNamedProperty), R(5), U8(16), U8(30),
B(Star), R(15),
B(LdaFalse),
......@@ -530,7 +530,8 @@ bytecodes: [
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(6),
B(JumpLoop), U8(236), I8(0),
B(StackCheck),
B(JumpLoop), U8(237), I8(0),
B(LdaNamedProperty), R(5), U8(16), U8(32),
B(Star), R(7),
B(LdaSmi), I8(1),
......@@ -605,13 +606,13 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
SCOPE_INFO_TYPE,
Smi [369],
Smi [370],
Smi [6],
Smi [9],
Smi [23],
]
handlers: [
[19, 417, 417],
[22, 383, 383],
[19, 418, 418],
[22, 384, 384],
]
......@@ -56,13 +56,11 @@ bytecodes: [
/* 76 S> */ B(LdaSmi), I8(10),
/* 76 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(54),
/* 58 E> */ B(StackCheck),
/* 106 S> */ B(LdaZero),
B(Star), R(2),
/* 111 S> */ B(LdaSmi), I8(3),
/* 111 E> */ B(TestLessThan), R(2), U8(1),
B(JumpIfFalse), U8(34),
/* 93 E> */ B(StackCheck),
/* 129 S> */ B(Ldar), R(0),
B(Inc), U8(2),
B(Star), R(0),
......@@ -72,14 +70,16 @@ bytecodes: [
B(LdaSmi), I8(12),
/* 152 E> */ B(TestEqual), R(3), U8(4),
B(JumpIfFalse), U8(4),
/* 161 S> */ B(Jump), U8(20),
/* 161 S> */ B(Jump), U8(22),
/* 118 S> */ B(Ldar), R(2),
B(Inc), U8(5),
B(Star), R(2),
/* 93 E> */ B(StackCheck),
B(JumpLoop), U8(36), I8(1),
/* 84 S> */ B(Ldar), R(1),
B(Inc), U8(6),
B(Star), R(1),
/* 58 E> */ B(StackCheck),
B(JumpLoop), U8(56), I8(0),
/* 188 S> */ B(Ldar), R(0),
/* 199 S> */ B(Return),
......
......@@ -65,7 +65,7 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 100
bytecode array length: 101
bytecodes: [
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
......@@ -89,13 +89,14 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
B(LdaNamedProperty), R(7), U8(6), U8(21),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(20),
B(LdaNamedProperty), R(7), U8(7), U8(12),
B(StaInArrayLiteral), R(4), R(3), U8(17),
B(Ldar), R(3),
B(Inc), U8(16),
B(Star), R(3),
B(JumpLoop), U8(33), I8(0),
B(StackCheck),
B(JumpLoop), U8(34), I8(0),
B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(4), R(3), U8(17),
B(Mov), R(4), R(3),
......
......@@ -260,10 +260,10 @@ bytecodes: [
B(Star), R(1),
/* 73 S> */ B(Ldar), R(0),
B(JumpIfUndefined), U8(12),
/* 64 E> */ B(StackCheck),
/* 92 S> */ B(Ldar), R(1),
B(Inc), U8(0),
B(Star), R(1),
/* 64 E> */ B(StackCheck),
B(JumpLoop), U8(11), I8(0),
B(LdaUndefined),
/* 99 S> */ B(Return),
......
......@@ -109,7 +109,7 @@ snippet: "
"
frame size: 15
parameter count: 1
bytecode array length: 252
bytecode array length: 253
bytecodes: [
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(2),
......@@ -167,13 +167,14 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(LdaNamedProperty), R(10), U8(2), U8(21),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(20),
B(LdaNamedProperty), R(10), U8(3), U8(7),
B(StaInArrayLiteral), R(11), R(12), U8(16),
B(Ldar), R(12),
B(Inc), U8(18),
B(Star), R(12),
B(JumpLoop), U8(33), I8(0),
B(StackCheck),
B(JumpLoop), U8(34), I8(0),
B(Mov), R(11), R(1),
B(LdaSmi), I8(-1),
B(Star), R(8),
......@@ -229,8 +230,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
]
handlers: [
[34, 162, 170],
[194, 227, 229],
[34, 163, 171],
[195, 228, 230],
]
---
......
......@@ -70,9 +70,9 @@ bytecodes: [
B(LdaFalse),
B(Star), R(7),
B(Mov), R(11), R(1),
/* 23 E> */ B(StackCheck),
/* 38 S> */ B(Mov), R(1), R(3),
B(Ldar), R(11),
/* 23 E> */ B(StackCheck),
B(JumpLoop), U8(77), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(9),
......@@ -82,7 +82,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(8),
B(LdaTheHole),
/* 38 E> */ B(SetPendingMessage),
B(SetPendingMessage),
B(Star), R(10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(94),
......@@ -180,7 +180,7 @@ snippet: "
"
frame size: 19
parameter count: 1
bytecode array length: 341
bytecode array length: 340
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
......@@ -228,13 +228,12 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(LdaNamedProperty), R(11), U8(6), U8(13),
B(JumpIfToBooleanTrue), U8(27),
B(JumpIfToBooleanTrue), U8(26),
B(LdaNamedProperty), R(11), U8(7), U8(15),
B(Star), R(11),
B(LdaFalse),
B(Star), R(7),
B(Mov), R(11), R(1),
/* 23 E> */ B(StackCheck),
/* 38 S> */ B(Mov), R(1), R(3),
/* 56 S> */ B(LdaSmi), I8(1),
B(Mov), R(11), R(9),
......@@ -326,7 +325,7 @@ bytecodes: [
]
constant pool: [
Smi [95],
Smi [228],
Smi [227],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
......@@ -340,9 +339,9 @@ constant pool: [
SCOPE_INFO_TYPE,
]
handlers: [
[19, 313, 313],
[74, 158, 166],
[190, 259, 261],
[19, 312, 312],
[74, 157, 165],
[189, 258, 260],
]
---
......@@ -411,7 +410,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(7),
B(Mov), R(11), R(1),
/* 23 E> */ B(StackCheck),
/* 38 S> */ B(Mov), R(1), R(3),
/* 63 S> */ B(LdaSmi), I8(10),
/* 69 E> */ B(TestEqual), R(3), U8(17),
......@@ -420,7 +418,8 @@ bytecodes: [
/* 90 S> */ B(LdaSmi), I8(20),
/* 96 E> */ B(TestEqual), R(3), U8(18),
B(JumpIfFalse), U8(4),
/* 103 S> */ B(Jump), U8(5),
/* 103 S> */ B(Jump), U8(6),
/* 23 E> */ B(StackCheck),
B(JumpLoop), U8(93), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(9),
......@@ -529,7 +528,7 @@ snippet: "
"
frame size: 15
parameter count: 1
bytecode array length: 252
bytecode array length: 251
bytecodes: [
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
......@@ -556,14 +555,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(LdaNamedProperty), R(9), U8(3), U8(10),
B(JumpIfToBooleanTrue), U8(33),
B(JumpIfToBooleanTrue), U8(32),
B(LdaNamedProperty), R(9), U8(4), U8(12),
B(Star), R(9),
B(LdaFalse),
B(Star), R(5),
B(Ldar), R(9),
/* 58 E> */ B(StaNamedProperty), R(1), U8(5), U8(14),
/* 53 E> */ B(StackCheck),
/* 87 S> */ B(LdaNamedProperty), R(1), U8(5), U8(16),
B(Star), R(7),
B(LdaSmi), I8(1),
......@@ -654,8 +652,8 @@ constant pool: [
SCOPE_INFO_TYPE,
]
handlers: [
[15, 224, 224],
[52, 105, 113],
[137, 170, 172],
[15, 223, 223],
[52, 104, 112],
[136, 169, 171],
]
......@@ -73,13 +73,13 @@ bytecodes: [
/* 63 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(22),
B(ForInNext), R(3), R(7), R(4), U8(0),
B(JumpIfUndefined), U8(8),
B(JumpIfUndefined), U8(7),
B(Star), R(2),
/* 54 E> */ B(StackCheck),
/* 63 S> */ B(Star), R(1),
/* 82 S> */ B(Return),
B(ForInStep), R(7),
B(Star), R(7),
/* 54 E> */ B(StackCheck),
B(JumpLoop), U8(22), I8(0),
B(LdaUndefined),
/* 85 S> */ B(Return),
......@@ -111,9 +111,8 @@ bytecodes: [
/* 54 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(31),
B(ForInNext), R(3), R(7), R(4), U8(0),
B(JumpIfUndefined), U8(17),
B(JumpIfUndefined), U8(16),
B(Star), R(2),
/* 45 E> */ B(StackCheck),
/* 54 S> */ B(Star), R(1),
/* 70 S> */ B(Ldar), R(2),
/* 75 E> */ B(Add), R(0), U8(2),
......@@ -121,6 +120,7 @@ bytecodes: [
B(Star), R(0),
/* 72 E> */ B(ForInStep), R(7),
B(Star), R(7),
/* 45 E> */ B(StackCheck),
B(JumpLoop), U8(31), I8(0),
B(LdaUndefined),
/* 80 S> */ B(Return),
......@@ -155,11 +155,10 @@ bytecodes: [
/* 68 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(55),
B(ForInNext), R(1), R(5), R(2), U8(1),
B(JumpIfUndefined), U8(41),
B(JumpIfUndefined), U8(40),
B(Star), R(6),
B(Ldar), R(6),
/* 68 E> */ B(StaNamedProperty), R(0), U8(2), U8(3),
/* 62 E> */ B(StackCheck),
/* 100 S> */ B(LdaNamedProperty), R(0), U8(2), U8(5),
B(Star), R(6),
B(LdaSmi), I8(10),
......@@ -171,9 +170,10 @@ bytecodes: [
B(LdaSmi), I8(20),
/* 136 E> */ B(TestEqual), R(6), U8(8),
B(JumpIfFalse), U8(4),
/* 143 S> */ B(Jump), U8(9),
/* 143 S> */ B(Jump), U8(10),
B(ForInStep), R(5),
B(Star), R(5),
/* 62 E> */ B(StackCheck),
B(JumpLoop), U8(55), I8(0),
B(LdaUndefined),
/* 152 S> */ B(Return),
......@@ -207,18 +207,18 @@ bytecodes: [
/* 65 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(34),
B(ForInNext), R(1), R(5), R(2), U8(1),
B(JumpIfUndefined), U8(20),
B(JumpIfUndefined), U8(19),
B(Star), R(6),
B(LdaZero),
B(Star), R(8),
B(Ldar), R(6),
/* 65 E> */ B(StaKeyedProperty), R(0), R(8), U8(3),
/* 59 E> */ B(StackCheck),
/* 83 S> */ B(LdaSmi), I8(3),
/* 91 E> */ B(LdaKeyedProperty), R(0), U8(5),
/* 95 S> */ B(Return),
B(ForInStep), R(5),
B(Star), R(5),
/* 59 E> */ B(StackCheck),
B(JumpLoop), U8(34), I8(0),
B(LdaUndefined),
/* 98 S> */ B(Return),
......
......@@ -37,9 +37,9 @@ bytecodes: [
B(LdaFalse),
B(Star), R(4),
B(Mov), R(8), R(1),
/* 34 E> */ B(StackCheck),
/* 43 S> */ B(Mov), R(1), R(0),
B(Ldar), R(8),
/* 34 E> */ B(StackCheck),
B(JumpLoop), U8(40), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(6),
......@@ -49,7 +49,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(5),
B(LdaTheHole),
/* 43 E> */ B(SetPendingMessage),
B(SetPendingMessage),
B(Star), R(7),
B(Ldar), R(4),
B(JumpIfToBooleanTrue), U8(58),
......@@ -106,7 +106,7 @@ snippet: "
"
frame size: 14
parameter count: 1
bytecode array length: 172
bytecode array length: 171
bytecodes: [
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
......@@ -126,13 +126,12 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(LdaNamedProperty), R(9), U8(2), U8(8),
B(JumpIfToBooleanTrue), U8(27),
B(JumpIfToBooleanTrue), U8(26),
B(LdaNamedProperty), R(9), U8(3), U8(10),
B(Star), R(9),
B(LdaFalse),
B(Star), R(5),
B(Mov), R(9), R(2),
/* 54 E> */ B(StackCheck),
/* 63 S> */ B(Mov), R(2), R(1),
/* 73 S> */ B(LdaSmi), I8(1),
B(Mov), R(9), R(7),
......@@ -196,8 +195,8 @@ constant pool: [
Smi [9],
]
handlers: [
[29, 76, 84],
[108, 141, 143],
[29, 75, 83],
[107, 140, 142],
]
---
......@@ -235,7 +234,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(4),
B(Mov), R(8), R(1),
/* 34 E> */ B(StackCheck),
/* 43 S> */ B(Mov), R(1), R(0),
/* 66 S> */ B(LdaSmi), I8(10),
/* 72 E> */ B(TestEqual), R(0), U8(13),
......@@ -244,7 +242,8 @@ bytecodes: [
/* 91 S> */ B(LdaSmi), I8(20),
/* 97 E> */ B(TestEqual), R(0), U8(14),
B(JumpIfFalse), U8(4),
/* 104 S> */ B(Jump), U8(5),
/* 104 S> */ B(Jump), U8(6),
/* 34 E> */ B(StackCheck),
B(JumpLoop), U8(56), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(6),
......@@ -311,7 +310,7 @@ snippet: "
"
frame size: 13
parameter count: 1
bytecode array length: 186
bytecode array length: 185
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
......@@ -333,14 +332,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
B(LdaNamedProperty), R(7), U8(3), U8(10),
B(JumpIfToBooleanTrue), U8(33),
B(JumpIfToBooleanTrue), U8(32),
B(LdaNamedProperty), R(7), U8(4), U8(12),
B(Star), R(7),
B(LdaFalse),
B(Star), R(3),
B(Ldar), R(7),
/* 67 E> */ B(StaNamedProperty), R(0), U8(5), U8(14),
/* 62 E> */ B(StackCheck),
/* 96 S> */ B(LdaNamedProperty), R(0), U8(5), U8(16),
B(Star), R(5),
B(LdaSmi), I8(1),
......@@ -407,7 +405,7 @@ constant pool: [
Smi [9],
]
handlers: [
[37, 90, 98],
[122, 155, 157],
[37, 89, 97],
[121, 154, 156],
]
......@@ -39,10 +39,10 @@ bytecodes: [
B(LdaFalse),
B(Star), R(6),
B(Mov), R(10), R(0),
/* 20 E> */ B(StackCheck),
/* 29 S> */ B(Mov), R(0), R(2),
/* 49 S> */ B(Mov), R(2), R(3),
B(Ldar), R(10),
/* 20 E> */ B(StackCheck),
B(JumpLoop), U8(43), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(8),
......@@ -52,7 +52,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(7),
B(LdaTheHole),
/* 49 E> */ B(SetPendingMessage),
B(SetPendingMessage),
B(Star), R(9),
B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(58),
......@@ -150,7 +150,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(6),
B(Mov), R(10), R(0),
/* 20 E> */ B(StackCheck),
B(CreateBlockContext), U8(5),
B(PushContext), R(11),
B(LdaTheHole),
......@@ -175,6 +174,7 @@ bytecodes: [
/* 41 E> */ B(CallUndefinedReceiver1), R(12), R(13), U8(14),
B(PopContext), R(11),
B(Mov), R(0), R(10),
/* 20 E> */ B(StackCheck),
B(JumpLoop), U8(92), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(8),
......@@ -272,7 +272,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(4),
B(Mov), R(8), R(0),
/* 20 E> */ B(StackCheck),
B(CreateBlockContext), U8(3),
B(PushContext), R(9),
B(LdaTheHole),
......@@ -284,6 +283,7 @@ bytecodes: [
/* 67 E> */ B(CallUndefinedReceiver0), R(10), U8(12),
B(PopContext), R(9),
B(Mov), R(0), R(8),
/* 20 E> */ B(StackCheck),
B(JumpLoop), U8(60), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(6),
......@@ -377,7 +377,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(8),
B(Mov), R(12), R(0),
/* 20 E> */ B(StackCheck),
/* 31 S> */ B(LdaNamedProperty), R(0), U8(3), U8(12),
B(Star), R(3),
/* 34 S> */ B(LdaNamedProperty), R(0), U8(4), U8(14),
......@@ -385,6 +384,7 @@ bytecodes: [
/* 56 S> */ B(Ldar), R(4),
/* 58 E> */ B(Add), R(3), U8(16),
B(Star), R(5),
/* 20 E> */ B(StackCheck),
B(JumpLoop), U8(54), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(10),
......@@ -394,7 +394,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(9),
B(LdaTheHole),
/* 56 E> */ B(SetPendingMessage),
B(SetPendingMessage),
B(Star), R(11),
B(Ldar), R(8),
B(JumpIfToBooleanTrue), U8(58),
......@@ -492,10 +492,10 @@ bytecodes: [
B(LdaFalse),
B(Star), R(7),
B(Mov), R(11), R(1),
/* 21 E> */ B(StackCheck),
/* 30 S> */ B(Mov), R(1), R(3),
/* 50 S> */ B(Mov), R(3), R(4),
B(Ldar), R(11),
/* 21 E> */ B(StackCheck),
B(JumpLoop), U8(43), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(9),
......@@ -505,7 +505,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(8),
B(LdaTheHole),
/* 50 E> */ B(SetPendingMessage),
B(SetPendingMessage),
B(Star), R(10),
B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(58),
......@@ -604,7 +604,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(6),
B(Mov), R(10), R(1),
/* 21 E> */ B(StackCheck),
/* 30 S> */ B(Mov), R(1), R(3),
/* 40 S> */ B(LdaFalse),
B(Star), R(12),
......@@ -620,8 +619,9 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star), R(7),
B(Mov), R(11), R(8),
B(Jump), U8(20),
B(Jump), U8(21),
B(Ldar), R(11),
/* 21 E> */ B(StackCheck),
B(JumpLoop), U8(81), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(8),
......@@ -672,7 +672,7 @@ bytecodes: [
]
constant pool: [
Smi [21],
Smi [119],
Smi [118],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
......@@ -728,10 +728,10 @@ bytecodes: [
B(LdaFalse),
B(Star), R(8),
B(Mov), R(12), R(1),
/* 26 E> */ B(StackCheck),
/* 35 S> */ B(Mov), R(1), R(3),
/* 55 S> */ B(Mov), R(3), R(4),
B(Ldar), R(12),
/* 26 E> */ B(StackCheck),
B(JumpLoop), U8(43), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(10),
......@@ -741,7 +741,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(9),
B(LdaTheHole),
/* 55 E> */ B(SetPendingMessage),
B(SetPendingMessage),
B(Star), R(11),
B(Ldar), R(8),
B(JumpIfToBooleanTrue), U8(58),
......@@ -850,7 +850,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(7),
B(Mov), R(11), R(1),
/* 26 E> */ B(StackCheck),
/* 35 S> */ B(Mov), R(1), R(3),
/* 45 S> */ B(Mov), R(0), R(12),
B(Mov), R(3), R(13),
......@@ -866,6 +865,7 @@ bytecodes: [
B(Ldar), R(12),
B(ReThrow),
B(Ldar), R(12),
/* 26 E> */ B(StackCheck),
B(JumpLoop), U8(75), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(9),
......@@ -932,7 +932,7 @@ bytecodes: [
/* 54 S> */ B(Return),
]
constant pool: [
Smi [97],
Smi [96],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
......
......@@ -138,7 +138,6 @@ bytecodes: [
B(LdaFalse),
B(Star), R(6),
B(Mov), R(10), R(1),
/* 16 E> */ B(StackCheck),
/* 25 S> */ B(Mov), R(1), R(3),
/* 36 S> */ B(LdaFalse),
B(Star), R(12),
......@@ -154,8 +153,9 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star), R(7),
B(Mov), R(11), R(8),
B(Jump), U8(20),
B(Jump), U8(21),
B(Ldar), R(11),
/* 16 E> */ B(StackCheck),
B(JumpLoop), U8(81), I8(0),
B(LdaSmi), I8(-1),
B(Star), R(8),
......@@ -206,7 +206,7 @@ bytecodes: [
]
constant pool: [
Smi [21],
Smi [125],
Smi [124],
Smi [10],
Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
......@@ -233,7 +233,7 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 204
bytecode array length: 205
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
......@@ -292,14 +292,15 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1),
B(LdaNamedProperty), R(1), U8(10), U8(24),
B(JumpIfToBooleanTrue), U8(24),
B(JumpIfToBooleanTrue), U8(25),
B(Ldar), R(1),
/* 43 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
B(ResumeGenerator), R(0), R(0), U8(6),
B(Star), R(4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(2),
B(JumpLoop), U8(108), I8(0),
B(StackCheck),
B(JumpLoop), U8(109), I8(0),
B(LdaNamedProperty), R(1), U8(11), U8(26),
B(Star), R(3),
B(LdaSmi), I8(1),
......
......@@ -77,7 +77,6 @@ bytecodes: [
B(LdaSmi), I8(5),
/* 59 E> */ B(TestLessThan), R(1), U8(6),
B(JumpIfFalse), U8(43),
/* 45 E> */ B(StackCheck),
/* 81 S> */ B(LdaGlobal), U8(0), U8(7),
B(Star), R(1),
B(LdaSmi), I8(2),
......@@ -91,6 +90,7 @@ bytecodes: [
/* 66 S> */ B(LdaGlobal), U8(1), U8(4),
B(Inc), U8(15),
/* 66 E> */ B(StaGlobal), U8(1), U8(2),
/* 45 E> */ B(StackCheck),
B(JumpLoop), U8(50), I8(0),
/* 149 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 156 S> */ B(Return),
......@@ -135,7 +135,6 @@ bytecodes: [
B(LdaSmi), I8(4),
/* 68 E> */ B(TestGreaterThan), R(1), U8(6),
B(JumpIfFalse), U8(43),
/* 60 E> */ B(StackCheck),
/* 85 S> */ B(LdaGlobal), U8(0), U8(7),
B(Star), R(1),
B(LdaSmi), I8(2),
......@@ -149,6 +148,7 @@ bytecodes: [
/* 128 S> */ B(LdaGlobal), U8(1), U8(4),
B(Dec), U8(15),
/* 129 E> */ B(StaGlobal), U8(1), U8(2),
/* 60 E> */ B(StackCheck),
B(JumpLoop), U8(50), I8(0),
/* 168 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 175 S> */ B(Return),
......@@ -188,7 +188,6 @@ bytecodes: [
/* 31 E> */ B(StaGlobal), U8(0), U8(0),
/* 45 S> */ B(LdaSmi), I8(4),
/* 47 E> */ B(StaGlobal), U8(1), U8(2),
/* 60 E> */ B(StackCheck),
/* 75 S> */ B(LdaGlobal), U8(0), U8(4),
B(Star), R(1),
B(LdaSmi), I8(2),
......@@ -206,7 +205,8 @@ bytecodes: [
B(Star), R(1),
B(LdaSmi), I8(4),
/* 141 E> */ B(TestGreaterThan), R(1), U8(15),
B(JumpIfFalse), U8(5),
B(JumpIfFalse), U8(6),
/* 60 E> */ B(StackCheck),
B(JumpLoop), U8(50), I8(0),
/* 171 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 178 S> */ B(Return),
......
......@@ -90,7 +90,7 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 121
bytecode array length: 122
bytecodes: [
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
......@@ -123,13 +123,14 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(LdaNamedProperty), R(6), U8(7), U8(17),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(20),
B(LdaNamedProperty), R(6), U8(8), U8(8),
B(StaInArrayLiteral), R(3), R(2), U8(13),
B(Ldar), R(2),
B(Inc), U8(12),
B(Star), R(2),
B(JumpLoop), U8(33), I8(0),
B(StackCheck),
B(JumpLoop), U8(34), I8(0),
B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(3), R(2), U8(13),
B(Mov), R(3), R(2),
......
......@@ -96,7 +96,6 @@ bytecodes: [
B(LdaSmi), I8(5),
/* 77 E> */ B(TestLessThan), R(1), U8(6),
B(JumpIfFalse), U8(83),
/* 63 E> */ B(StackCheck),
/* 97 S> */ B(LdaGlobal), U8(1), U8(7),
B(Star), R(1),
/* 106 E> */ B(LdaGlobal), U8(1), U8(7),
......@@ -124,6 +123,7 @@ bytecodes: [
/* 84 S> */ B(LdaGlobal), U8(2), U8(4),
B(Inc), U8(19),
/* 84 E> */ B(StaGlobal), U8(2), U8(2),
/* 63 E> */ B(StackCheck),
B(JumpLoop), U8(90), I8(0),
B(Ldar), R(0),
/* 171 S> */ B(Return),
......@@ -168,7 +168,6 @@ bytecodes: [
B(LdaZero),
/* 72 E> */ B(TestGreaterThan), R(1), U8(4),
B(JumpIfFalse), U8(77),
/* 63 E> */ B(StackCheck),
/* 87 S> */ B(LdaGlobal), U8(1), U8(5),
B(Star), R(1),
/* 97 E> */ B(LdaGlobal), U8(1), U8(5),
......@@ -194,6 +193,7 @@ bytecodes: [
/* 130 E> */ B(StaNamedProperty), R(1), U8(4), U8(15),
B(Mov), R(2), R(0),
B(Ldar), R(2),
/* 63 E> */ B(StackCheck),
B(JumpLoop), U8(83), I8(0),
B(Ldar), R(0),
/* 163 S> */ B(Return),
......@@ -235,7 +235,6 @@ bytecodes: [
/* 65 E> */ B(StaGlobal), U8(2), U8(2),
B(LdaUndefined),
B(Star), R(0),
/* 77 E> */ B(StackCheck),
/* 90 S> */ B(LdaGlobal), U8(1), U8(4),
B(Star), R(1),
/* 99 E> */ B(LdaGlobal), U8(1), U8(4),
......@@ -253,7 +252,8 @@ bytecodes: [
B(Star), R(1),
B(LdaSmi), I8(10),
/* 133 E> */ B(TestLessThan), R(1), U8(15),
B(JumpIfFalse), U8(5),
B(JumpIfFalse), U8(6),
/* 77 E> */ B(StackCheck),
B(JumpLoop), U8(50), I8(0),
B(Ldar), R(0),
/* 146 S> */ B(Return),
......
......@@ -20,14 +20,14 @@ bytecode array length: 27
bytecodes: [
/* 45 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 48 E> */ B(StackCheck),
/* 64 S> */ B(Ldar), R(0),
/* 76 E> */ B(Add), R(0), U8(0),
B(Star), R(0),
/* 86 S> */ B(LdaSmi), I8(10),
/* 95 E> */ B(TestGreaterThan), R(0), U8(1),
B(JumpIfFalse), U8(4),
/* 101 S> */ B(Jump), U8(5),
/* 101 S> */ B(Jump), U8(6),
/* 48 E> */ B(StackCheck),
B(JumpLoop), U8(17), I8(0),
/* 110 S> */ B(Ldar), R(0),
/* 122 S> */ B(Return),
......@@ -48,11 +48,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 22
bytecode array length: 21
bytecodes: [
/* 45 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 48 E> */ B(StackCheck),
/* 67 S> */ B(Add), R(0), U8(0),
B(Star), R(0),
/* 77 S> */ B(LdaSmi), I8(10),
......
......@@ -22,11 +22,11 @@ bytecodes: [
/* 35 S> */ B(LdaSmi), I8(10),
/* 35 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(15),
/* 17 E> */ B(StackCheck),
/* 56 S> */ B(Mov), R(0), R(1),
/* 43 S> */ B(Ldar), R(1),
B(Inc), U8(1),
B(Star), R(0),
/* 17 E> */ B(StackCheck),
B(JumpLoop), U8(17), I8(0),
B(LdaUndefined),
/* 61 S> */ B(Return),
......@@ -65,8 +65,7 @@ bytecodes: [
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(1),
/* 59 E> */ B(StackCheck),
B(CreateBlockContext), U8(2),
/* 59 E> */ B(CreateBlockContext), U8(2),
B(PushContext), R(6),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
......@@ -90,11 +89,10 @@ bytecodes: [
B(JumpIfFalse), U8(4),
B(Jump), U8(6),
B(PopContext), R(6),
B(Jump), U8(77),
B(Jump), U8(78),
B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(3),
B(JumpIfFalse), U8(54),
/* 17 E> */ B(StackCheck),
/* 48 S> */ B(LdaLookupGlobalSlot), U8(3), U8(4), U8(3),
B(Star), R(7),
B(LdaConstant), U8(4),
......@@ -115,13 +113,15 @@ bytecodes: [
B(Star), R(2),
B(LdaCurrentContextSlot), U8(2),
B(Star), R(0),
/* 17 E> */ B(StackCheck),
B(JumpLoop), U8(56), I8(1),
B(LdaSmi), I8(1),
/* 59 E> */ B(TestEqual), R(2), U8(8),
B(TestEqual), R(2), U8(8),
B(JumpIfFalse), U8(6),
B(PopContext), R(6),
B(Jump), U8(7),
B(Jump), U8(8),
B(PopContext), R(6),
B(StackCheck),
B(JumpLoop), U8(123), I8(0),
B(PopContext), R(5),
B(LdaUndefined),
......@@ -153,8 +153,7 @@ bytecodes: [
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(1),
/* 78 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
/* 78 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(4),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
......@@ -178,11 +177,10 @@ bytecodes: [
B(JumpIfFalse), U8(4),
B(Jump), U8(6),
B(PopContext), R(4),
B(Jump), U8(45),
B(Jump), U8(46),
B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(3),
B(JumpIfFalse), U8(22),
/* 17 E> */ B(StackCheck),
/* 48 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(5),
/* 74 E> */ B(CallUndefinedReceiver0), R(5), U8(4),
......@@ -190,13 +188,15 @@ bytecodes: [
B(Star), R(2),
B(LdaCurrentContextSlot), U8(2),
B(Star), R(0),
/* 17 E> */ B(StackCheck),
B(JumpLoop), U8(24), I8(1),
B(LdaSmi), I8(1),
/* 78 E> */ B(TestEqual), R(2), U8(6),
B(TestEqual), R(2), U8(6),
B(JumpIfFalse), U8(6),
B(PopContext), R(4),
B(Jump), U8(7),
B(Jump), U8(8),
B(PopContext), R(4),
B(StackCheck),
B(JumpLoop), U8(91), I8(0),
B(LdaUndefined),
/* 80 S> */ B(Return),
......@@ -228,13 +228,13 @@ bytecodes: [
/* 55 S> */ B(LdaZero),
/* 55 E> */ B(TestGreaterThan), R(1), U8(5),
B(JumpIfFalse), U8(19),
/* 17 E> */ B(StackCheck),
/* 75 S> */ B(Ldar), R(1),
/* 77 E> */ B(Add), R(0), U8(6),
B(Star), R(2),
/* 62 S> */ B(Ldar), R(1),
B(Dec), U8(7),
B(Star), R(1),
/* 17 E> */ B(StackCheck),
B(JumpLoop), U8(20), I8(0),
B(LdaUndefined),
/* 84 S> */ B(Return),
......@@ -277,11 +277,11 @@ bytecodes: [
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(15),
/* 18 E> */ B(StackCheck),
/* 57 S> */ B(Mov), R(1), R(2),
/* 44 S> */ B(Ldar), R(2),
B(Inc), U8(1),
B(Star), R(1),
/* 18 E> */ B(StackCheck),
B(JumpLoop), U8(17), I8(0),
B(LdaUndefined),
/* 62 S> */ B(Return),
......@@ -324,7 +324,6 @@ bytecodes: [
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(47),
/* 18 E> */ B(StackCheck),
/* 47 S> */ B(LdaFalse),
B(Star), R(3),
B(Mov), R(1), R(2),
......@@ -341,13 +340,14 @@ bytecodes: [
/* 44 S> */ B(Ldar), R(1),
B(Inc), U8(1),
B(Star), R(1),
/* 18 E> */ B(StackCheck),
B(JumpLoop), U8(49), I8(0),
B(LdaUndefined),
/* 56 S> */ B(Return),
]
constant pool: [
Smi [21],
Smi [67],
Smi [66],
Smi [10],
Smi [7],
Smi [10],
......@@ -377,18 +377,18 @@ bytecodes: [
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(15),
/* 23 E> */ B(StackCheck),
/* 62 S> */ B(Mov), R(1), R(2),
/* 49 S> */ B(Ldar), R(2),
B(Inc), U8(1),
B(Star), R(1),
/* 23 E> */ B(StackCheck),
B(JumpLoop), U8(17), I8(0),
B(LdaUndefined),
B(Star), R(5),
B(LdaFalse),
B(Star), R(6),
B(Mov), R(0), R(4),
/* 49 E> */ B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(4), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(4), U8(3),
/* 67 S> */ B(Return),
B(Star), R(4),
B(CreateCatchContext), R(4), U8(0),
......@@ -434,7 +434,6 @@ bytecodes: [
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(47),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(Mov), R(0), R(3),
B(Mov), R(1), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(3), U8(2),
......@@ -451,13 +450,14 @@ bytecodes: [
/* 49 S> */ B(Ldar), R(1),
B(Inc), U8(1),
B(Star), R(1),
/* 23 E> */ B(StackCheck),
B(JumpLoop), U8(49), I8(0),
B(LdaUndefined),
B(Star), R(4),
B(LdaTrue),
B(Star), R(5),
B(Mov), R(0), R(3),
/* 49 E> */ B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(3), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(3), U8(3),
/* 61 S> */ B(Return),
B(Star), R(3),
B(CreateCatchContext), R(3), U8(1),
......@@ -475,7 +475,7 @@ bytecodes: [
/* 61 S> */ B(Return),
]
constant pool: [
Smi [45],
Smi [44],
SCOPE_INFO_TYPE,
]
handlers: [
......
......@@ -91,7 +91,7 @@ snippet: "
"
frame size: 11
parameter count: 1
bytecode array length: 118
bytecode array length: 119
bytecodes: [
/* 128 E> */ B(CreateRestParameter),
B(Star), R(3),
......@@ -120,13 +120,14 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(LdaNamedProperty), R(10), U8(1), U8(16),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(20),
B(LdaNamedProperty), R(10), U8(2), U8(10),
B(StaInArrayLiteral), R(7), R(6), U8(1),
B(Ldar), R(6),
B(Inc), U8(3),
B(Star), R(6),
B(JumpLoop), U8(33), I8(0),
B(StackCheck),
B(JumpLoop), U8(34), I8(0),
B(LdaSmi), I8(1),
B(StaInArrayLiteral), R(7), R(6), U8(1),
B(Mov), R(5), R(6),
......
......@@ -22,10 +22,10 @@ bytecodes: [
/* 54 S> */ B(LdaSmi), I8(10),
/* 54 E> */ B(TestEqual), R(0), U8(0),
B(JumpIfTrue), U8(13),
/* 45 E> */ B(StackCheck),
/* 65 S> */ B(Ldar), R(0),
/* 71 E> */ B(AddSmi), I8(10), U8(1),
B(Star), R(0),
/* 45 E> */ B(StackCheck),
B(JumpLoop), U8(15), I8(0),
/* 79 S> */ B(Ldar), R(0),
/* 88 S> */ B(Return),
......@@ -49,13 +49,13 @@ bytecode array length: 21
bytecodes: [
/* 42 S> */ B(LdaFalse),
B(Star), R(0),
/* 49 E> */ B(StackCheck),
/* 56 S> */ B(Ldar), R(0),
B(ToBooleanLogicalNot),
B(Star), R(0),
/* 74 S> */ B(LdaFalse),
/* 74 E> */ B(TestEqual), R(0), U8(0),
B(JumpIfFalse), U8(5),
B(JumpIfFalse), U8(6),
/* 49 E> */ B(StackCheck),
B(JumpLoop), U8(12), I8(0),
/* 85 S> */ B(Ldar), R(0),
/* 94 S> */ B(Return),
......
......@@ -2468,7 +2468,6 @@ bytecodes: [
/* 2166 S> */ B(LdaSmi), I8(64),
/* 2166 E> */ B(Wide), B(TestLessThan), R16(128), U16(0),
B(JumpIfFalse), U8(31),
/* 2146 E> */ B(StackCheck),
/* 2183 S> */ B(Wide), B(Ldar), R16(128),
/* 2189 E> */ B(Add), R(1), U8(1),
B(Wide), B(Mov), R16(1), R16(157),
......@@ -2476,6 +2475,7 @@ bytecodes: [
/* 2176 S> */ B(Wide), B(Ldar), R16(128),
B(Inc), U8(2),
B(Wide), B(Star), R16(128),
/* 2146 E> */ B(StackCheck),
B(JumpLoop), U8(36), I8(0),
/* 2195 S> */ B(Wide), B(Ldar), R16(128),
/* 2207 S> */ B(Return),
......@@ -2980,15 +2980,15 @@ bytecodes: [
/* 2154 S> */ B(Wide), B(ForInContinue), R16(161), R16(160),
B(JumpIfFalse), U8(45),
B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(0),
B(JumpIfUndefined), U8(22),
B(JumpIfUndefined), U8(21),
B(Wide), B(Star), R16(128),
/* 2149 E> */ B(StackCheck),
/* 2169 S> */ B(Wide), B(Ldar), R16(128),
/* 2175 E> */ B(Add), R(1), U8(1),
B(Wide), B(Mov), R16(1), R16(162),
B(Star), R(1),
/* 2172 E> */ B(Wide), B(ForInStep), R16(161),
B(Wide), B(Star), R16(161),
/* 2149 E> */ B(StackCheck),
B(JumpLoop), U8(48), I8(0),
/* 2181 S> */ B(Ldar), R(1),
/* 2191 S> */ B(Return),
......
......@@ -257,6 +257,9 @@ TEST_F(BytecodeAnalysisTest, SimpleLoop) {
loop_builder.BindContinueTarget();
loop_builder.JumpToHeader(0, nullptr);
// TODO(solanes): Remove the liveness of the Stack Check once it is
// implicit.
expected_liveness.emplace_back("L.L.", "L.L.");
expected_liveness.emplace_back("L.L.", "L.L.");
}
......@@ -362,6 +365,9 @@ TEST_F(BytecodeAnalysisTest, DiamondInLoop) {
loop_builder.BindContinueTarget();
loop_builder.JumpToHeader(0, nullptr);
// TODO(solanes): Remove the liveness of the Stack Check once it is
// implicit.
expected_liveness.emplace_back("L...", "L...");
expected_liveness.emplace_back("L...", "L...");
}
......@@ -434,11 +440,17 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
inner_loop_builder.BindContinueTarget();
inner_loop_builder.JumpToHeader(1, &loop_builder);
// TODO(solanes): Remove the liveness of the Stack Check once it is
// implicit.
expected_liveness.emplace_back(".L..", ".L..");
expected_liveness.emplace_back(".L..", ".L..");
}
loop_builder.BindContinueTarget();
loop_builder.JumpToHeader(0, nullptr);
// TODO(solanes): Remove the liveness of the Stack Check once it is
// implicit.
expected_liveness.emplace_back("LL..", "LL..");
expected_liveness.emplace_back("LL..", "LL..");
}
......
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