Commit 447bf33d authored by Jakob Gruber's avatar Jakob Gruber Committed by V8 LUCI CQ

[osr] Add JumpLoop feedback slot operand

.. which points back at the corresponding feedback vector slot for each
JumpLoop bytecode.

Bug: v8:12161
Change-Id: I95f4d013544a69e088314655af7eb1dc504a8657
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596166Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80048}
parent 4f7d37a5
...@@ -378,8 +378,8 @@ BYTECODE_LIST(DEFINE_BYTECODE_OUTPUT) ...@@ -378,8 +378,8 @@ BYTECODE_LIST(DEFINE_BYTECODE_OUTPUT)
#undef DEFINE_BYTECODE_OUTPUT #undef DEFINE_BYTECODE_OUTPUT
void BytecodeArrayBuilder::OutputJumpLoop(BytecodeLoopHeader* loop_header, void BytecodeArrayBuilder::OutputJumpLoop(BytecodeLoopHeader* loop_header,
int loop_depth) { int loop_depth, int feedback_slot) {
BytecodeNode node(CreateJumpLoopNode(0, loop_depth)); BytecodeNode node(CreateJumpLoopNode(0, loop_depth, feedback_slot));
WriteJumpLoop(&node, loop_header); WriteJumpLoop(&node, loop_header);
} }
...@@ -1257,7 +1257,8 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfJSReceiver( ...@@ -1257,7 +1257,8 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfJSReceiver(
} }
BytecodeArrayBuilder& BytecodeArrayBuilder::JumpLoop( BytecodeArrayBuilder& BytecodeArrayBuilder::JumpLoop(
BytecodeLoopHeader* loop_header, int loop_depth, int position) { BytecodeLoopHeader* loop_header, int loop_depth, int position,
int feedback_slot) {
if (position != kNoSourcePosition) { if (position != kNoSourcePosition) {
// We need to attach a non-breakable source position to JumpLoop for its // We need to attach a non-breakable source position to JumpLoop for its
// implicit stack check, so we simply add it as expression position. There // implicit stack check, so we simply add it as expression position. There
...@@ -1270,7 +1271,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::JumpLoop( ...@@ -1270,7 +1271,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::JumpLoop(
// expression position which eliminates the empty statement's position. // expression position which eliminates the empty statement's position.
latest_source_info_.ForceExpressionPosition(position); latest_source_info_.ForceExpressionPosition(position);
} }
OutputJumpLoop(loop_header, loop_depth); OutputJumpLoop(loop_header, loop_depth, feedback_slot);
return *this; return *this;
} }
......
...@@ -428,7 +428,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final { ...@@ -428,7 +428,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
BytecodeArrayBuilder& Jump(BytecodeLabel* label); BytecodeArrayBuilder& Jump(BytecodeLabel* label);
BytecodeArrayBuilder& JumpLoop(BytecodeLoopHeader* loop_header, BytecodeArrayBuilder& JumpLoop(BytecodeLoopHeader* loop_header,
int loop_depth, int position); int loop_depth, int position,
int feedback_slot);
BytecodeArrayBuilder& JumpIfTrue(ToBooleanMode mode, BytecodeLabel* label); BytecodeArrayBuilder& JumpIfTrue(ToBooleanMode mode, BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfFalse(ToBooleanMode mode, BytecodeLabel* label); BytecodeArrayBuilder& JumpIfFalse(ToBooleanMode mode, BytecodeLabel* label);
...@@ -594,8 +595,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final { ...@@ -594,8 +595,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
BYTECODE_LIST(DECLARE_BYTECODE_OUTPUT) BYTECODE_LIST(DECLARE_BYTECODE_OUTPUT)
#undef DECLARE_OPERAND_TYPE_INFO #undef DECLARE_OPERAND_TYPE_INFO
V8_INLINE void OutputJumpLoop(BytecodeLoopHeader* loop_header, V8_INLINE void OutputJumpLoop(BytecodeLoopHeader* loop_header, int loop_depth,
int loop_depth); int feedback_slot);
V8_INLINE void OutputSwitchOnSmiNoFeedback(BytecodeJumpTable* jump_table); V8_INLINE void OutputSwitchOnSmiNoFeedback(BytecodeJumpTable* jump_table);
bool RegisterIsValid(Register reg) const; bool RegisterIsValid(Register reg) const;
......
...@@ -467,15 +467,32 @@ void BytecodeArrayWriter::EmitJumpLoop(BytecodeNode* node, ...@@ -467,15 +467,32 @@ void BytecodeArrayWriter::EmitJumpLoop(BytecodeNode* node,
CHECK_GE(current_offset, loop_header->offset()); CHECK_GE(current_offset, loop_header->offset());
CHECK_LE(current_offset, static_cast<size_t>(kMaxUInt32)); CHECK_LE(current_offset, static_cast<size_t>(kMaxUInt32));
// Label has been bound already so this is a backwards jump.
// Update the actual jump offset now that we know the bytecode offset of both
// the target loop header and this JumpLoop bytecode.
//
// The label has been bound already so this is a backwards jump.
uint32_t delta = uint32_t delta =
static_cast<uint32_t>(current_offset - loop_header->offset()); static_cast<uint32_t>(current_offset - loop_header->offset());
OperandScale operand_scale = Bytecodes::ScaleForUnsignedOperand(delta); // This JumpLoop bytecode itself may have a kWide or kExtraWide prefix; if
if (operand_scale > OperandScale::kSingle) { // so, bump the delta to account for it.
// Adjust for scaling byte prefix for wide jump offset. const bool emits_prefix_bytecode =
delta += 1; Bytecodes::OperandScaleRequiresPrefixBytecode(node->operand_scale()) ||
Bytecodes::OperandScaleRequiresPrefixBytecode(
Bytecodes::ScaleForUnsignedOperand(delta));
if (emits_prefix_bytecode) {
static constexpr int kPrefixBytecodeSize = 1;
delta += kPrefixBytecodeSize;
DCHECK_EQ(Bytecodes::Size(Bytecode::kWide, OperandScale::kSingle),
kPrefixBytecodeSize);
DCHECK_EQ(Bytecodes::Size(Bytecode::kExtraWide, OperandScale::kSingle),
kPrefixBytecodeSize);
} }
node->update_operand0(delta); node->update_operand0(delta);
DCHECK_EQ(
Bytecodes::OperandScaleRequiresPrefixBytecode(node->operand_scale()),
emits_prefix_bytecode);
EmitBytecode(node); EmitBytecode(node);
} }
......
...@@ -2246,7 +2246,8 @@ void BytecodeGenerator::VisitIterationBody(IterationStatement* stmt, ...@@ -2246,7 +2246,8 @@ void BytecodeGenerator::VisitIterationBody(IterationStatement* stmt,
} }
void BytecodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { void BytecodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt); LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt,
feedback_spec());
if (stmt->cond()->ToBooleanIsFalse()) { if (stmt->cond()->ToBooleanIsFalse()) {
// Since we know that the condition is false, we don't create a loop. // Since we know that the condition is false, we don't create a loop.
// Therefore, we don't create a LoopScope (and thus we don't create a header // Therefore, we don't create a LoopScope (and thus we don't create a header
...@@ -2268,7 +2269,8 @@ void BytecodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { ...@@ -2268,7 +2269,8 @@ void BytecodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
} }
void BytecodeGenerator::VisitWhileStatement(WhileStatement* stmt) { void BytecodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt); LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt,
feedback_spec());
if (stmt->cond()->ToBooleanIsFalse()) { if (stmt->cond()->ToBooleanIsFalse()) {
// If the condition is false there is no need to generate the loop. // If the condition is false there is no need to generate the loop.
...@@ -2291,7 +2293,8 @@ void BytecodeGenerator::VisitForStatement(ForStatement* stmt) { ...@@ -2291,7 +2293,8 @@ void BytecodeGenerator::VisitForStatement(ForStatement* stmt) {
Visit(stmt->init()); Visit(stmt->init());
} }
LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt); LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt,
feedback_spec());
if (stmt->cond() && stmt->cond()->ToBooleanIsFalse()) { if (stmt->cond() && stmt->cond()->ToBooleanIsFalse()) {
// If the condition is known to be false there is no need to generate // If the condition is known to be false there is no need to generate
// body, next or condition blocks. Init block should be generated. // body, next or condition blocks. Init block should be generated.
...@@ -2343,7 +2346,8 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) { ...@@ -2343,7 +2346,8 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// The loop // The loop
{ {
LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt); LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt,
feedback_spec());
LoopScope loop_scope(this, &loop_builder); LoopScope loop_scope(this, &loop_builder);
builder()->SetExpressionAsStatementPosition(stmt->each()); builder()->SetExpressionAsStatementPosition(stmt->each());
builder()->ForInContinue(index, cache_length); builder()->ForInContinue(index, cache_length);
...@@ -2416,7 +2420,8 @@ void BytecodeGenerator::VisitForOfStatement(ForOfStatement* stmt) { ...@@ -2416,7 +2420,8 @@ void BytecodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
[&]() { [&]() {
Register next_result = register_allocator()->NewRegister(); Register next_result = register_allocator()->NewRegister();
LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt); LoopBuilder loop_builder(builder(), block_coverage_builder_, stmt,
feedback_spec());
LoopScope loop_scope(this, &loop_builder); LoopScope loop_scope(this, &loop_builder);
builder()->LoadTrue().StoreAccumulatorInRegister(done); builder()->LoadTrue().StoreAccumulatorInRegister(done);
...@@ -3322,7 +3327,7 @@ void BytecodeGenerator::BuildFillArrayWithIterator( ...@@ -3322,7 +3327,7 @@ void BytecodeGenerator::BuildFillArrayWithIterator(
DCHECK(index.is_valid()); DCHECK(index.is_valid());
DCHECK(value.is_valid()); DCHECK(value.is_valid());
LoopBuilder loop_builder(builder(), nullptr, nullptr); LoopBuilder loop_builder(builder(), nullptr, nullptr, feedback_spec());
LoopScope loop_scope(this, &loop_builder); LoopScope loop_scope(this, &loop_builder);
// Call the iterator's .next() method. Break from the loop if the `done` // Call the iterator's .next() method. Break from the loop if the `done`
...@@ -4853,7 +4858,7 @@ void BytecodeGenerator::VisitYieldStar(YieldStar* expr) { ...@@ -4853,7 +4858,7 @@ void BytecodeGenerator::VisitYieldStar(YieldStar* expr) {
// - One for awaiting the iterator result yielded by the delegated // - One for awaiting the iterator result yielded by the delegated
// iterator // iterator
LoopBuilder loop_builder(builder(), nullptr, nullptr); LoopBuilder loop_builder(builder(), nullptr, nullptr, feedback_spec());
LoopScope loop_scope(this, &loop_builder); LoopScope loop_scope(this, &loop_builder);
{ {
......
...@@ -340,7 +340,7 @@ namespace interpreter { ...@@ -340,7 +340,7 @@ namespace interpreter {
/* Control Flow -- carefully ordered for efficient checks */ \ /* Control Flow -- carefully ordered for efficient checks */ \
/* - [Unconditional jumps] */ \ /* - [Unconditional jumps] */ \
V(JumpLoop, ImplicitRegisterUse::kNone, OperandType::kUImm, \ V(JumpLoop, ImplicitRegisterUse::kNone, OperandType::kUImm, \
OperandType::kImm) \ OperandType::kImm, OperandType::kIdx) \
/* - [Forward jumps] */ \ /* - [Forward jumps] */ \
V(Jump, ImplicitRegisterUse::kNone, OperandType::kUImm) \ V(Jump, ImplicitRegisterUse::kNone, OperandType::kUImm) \
/* - [Start constant jumps] */ \ /* - [Start constant jumps] */ \
......
...@@ -83,9 +83,10 @@ void LoopBuilder::JumpToHeader(int loop_depth, LoopBuilder* const parent_loop) { ...@@ -83,9 +83,10 @@ void LoopBuilder::JumpToHeader(int loop_depth, LoopBuilder* const parent_loop) {
// //
// The loop must have closed form, i.e. all loop elements are within the // The loop must have closed form, i.e. all loop elements are within the
// loop, the loop header precedes the body and next elements in the loop. // loop, the loop header precedes the body and next elements in the loop.
int slot_index = feedback_vector_spec_->AddJumpLoopSlot().ToInt();
builder()->JumpLoop(&loop_header_, builder()->JumpLoop(&loop_header_,
std::min(loop_depth, BytecodeArray::kMaxOsrUrgency - 1), std::min(loop_depth, BytecodeArray::kMaxOsrUrgency - 1),
source_position_); source_position_, slot_index);
} }
} }
......
...@@ -98,10 +98,12 @@ class V8_EXPORT_PRIVATE BlockBuilder final ...@@ -98,10 +98,12 @@ class V8_EXPORT_PRIVATE BlockBuilder final
class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder { class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder {
public: public:
LoopBuilder(BytecodeArrayBuilder* builder, LoopBuilder(BytecodeArrayBuilder* builder,
BlockCoverageBuilder* block_coverage_builder, AstNode* node) BlockCoverageBuilder* block_coverage_builder, AstNode* node,
FeedbackVectorSpec* feedback_vector_spec)
: BreakableControlFlowBuilder(builder, block_coverage_builder, node), : BreakableControlFlowBuilder(builder, block_coverage_builder, node),
continue_labels_(builder->zone()), continue_labels_(builder->zone()),
end_labels_(builder->zone()) { end_labels_(builder->zone()),
feedback_vector_spec_(feedback_vector_spec) {
if (block_coverage_builder_ != nullptr) { if (block_coverage_builder_ != nullptr) {
block_coverage_body_slot_ = block_coverage_body_slot_ =
block_coverage_builder_->AllocateBlockCoverageSlot( block_coverage_builder_->AllocateBlockCoverageSlot(
...@@ -143,8 +145,8 @@ class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder { ...@@ -143,8 +145,8 @@ class V8_EXPORT_PRIVATE LoopBuilder final : public BreakableControlFlowBuilder {
BytecodeLabels end_labels_; BytecodeLabels end_labels_;
int block_coverage_body_slot_; int block_coverage_body_slot_;
int source_position_; int source_position_;
FeedbackVectorSpec* const feedback_vector_spec_;
}; };
// A class to help with co-ordinating break statements with their switch. // A class to help with co-ordinating break statements with their switch.
......
...@@ -138,7 +138,7 @@ snippet: " ...@@ -138,7 +138,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 1 parameter count: 1
bytecode array length: 67 bytecode array length: 68
bytecodes: [ bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37), /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star0), B(Star0),
...@@ -157,13 +157,13 @@ bytecodes: [ ...@@ -157,13 +157,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(GetNamedProperty), R(5), U8(3), U8(17), B(GetNamedProperty), R(5), U8(3), U8(17),
B(JumpIfToBooleanTrue), U8(18), B(JumpIfToBooleanTrue), U8(19),
B(GetNamedProperty), R(5), U8(4), U8(8), B(GetNamedProperty), R(5), U8(4), U8(8),
B(StaInArrayLiteral), R(2), R(1), U8(13), B(StaInArrayLiteral), R(2), R(1), U8(13),
B(Ldar), R(1), B(Ldar), R(1),
B(Inc), U8(12), B(Inc), U8(12),
B(Star1), B(Star1),
B(JumpLoop), U8(31), I8(0), B(JumpLoop), U8(31), I8(0), U8(19),
B(Ldar), R(2), B(Ldar), R(2),
/* 71 S> */ B(Return), /* 71 S> */ B(Return),
] ]
......
...@@ -210,7 +210,7 @@ snippet: " ...@@ -210,7 +210,7 @@ snippet: "
" "
frame size: 18 frame size: 18
parameter count: 1 parameter count: 1
bytecode array length: 310 bytecode array length: 311
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
...@@ -230,7 +230,7 @@ bytecodes: [ ...@@ -230,7 +230,7 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star4), B(Star4),
B(Mov), R(8), R(5), B(Mov), R(8), R(5),
B(Jump), U8(221), B(Jump), U8(222),
/* 36 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37), /* 36 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
B(Star10), B(Star10),
B(GetIterator), R(10), U8(1), U8(3), B(GetIterator), R(10), U8(1), U8(3),
...@@ -249,7 +249,7 @@ bytecodes: [ ...@@ -249,7 +249,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
B(GetNamedProperty), R(14), U8(6), U8(9), B(GetNamedProperty), R(14), U8(6), U8(9),
B(JumpIfToBooleanTrue), U8(62), B(JumpIfToBooleanTrue), U8(63),
B(GetNamedProperty), R(14), U8(7), U8(11), B(GetNamedProperty), R(14), U8(7), U8(11),
B(Star14), B(Star14),
B(LdaFalse), B(LdaFalse),
...@@ -271,9 +271,9 @@ bytecodes: [ ...@@ -271,9 +271,9 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star11), B(Star11),
B(Mov), R(15), R(12), B(Mov), R(15), R(12),
B(Jump), U8(16), B(Jump), U8(17),
B(Ldar), R(15), B(Ldar), R(15),
/* 22 E> */ B(JumpLoop), U8(77), I8(0), /* 22 E> */ B(JumpLoop), U8(77), I8(0), U8(13),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star12), B(Star12),
B(Star11), B(Star11),
...@@ -287,10 +287,10 @@ bytecodes: [ ...@@ -287,10 +287,10 @@ bytecodes: [
B(Ldar), R(10), B(Ldar), R(10),
B(JumpIfToBooleanTrue), U8(37), B(JumpIfToBooleanTrue), U8(37),
B(Mov), R(context), R(15), B(Mov), R(context), R(15),
B(GetNamedProperty), R(9), U8(10), U8(13), B(GetNamedProperty), R(9), U8(10), U8(14),
B(JumpIfUndefinedOrNull), U8(28), B(JumpIfUndefinedOrNull), U8(28),
B(Star), R(16), B(Star), R(16),
B(CallProperty0), R(16), R(9), U8(15), B(CallProperty0), R(16), R(9), U8(16),
B(JumpIfJSReceiver), U8(20), B(JumpIfJSReceiver), U8(20),
B(Star), R(17), B(Star), R(17),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(17), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(17), U8(1),
...@@ -378,10 +378,10 @@ constant pool: [ ...@@ -378,10 +378,10 @@ constant pool: [
Smi [22], Smi [22],
] ]
handlers: [ handlers: [
[18, 268, 268], [18, 269, 269],
[21, 239, 239], [21, 240, 240],
[79, 159, 165], [79, 160, 166],
[178, 199, 201], [179, 200, 202],
] ]
--- ---
...@@ -392,7 +392,7 @@ snippet: " ...@@ -392,7 +392,7 @@ snippet: "
" "
frame size: 17 frame size: 17
parameter count: 1 parameter count: 1
bytecode array length: 422 bytecode array length: 423
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(5), B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
B(Mov), R(closure), R(1), B(Mov), R(closure), R(1),
...@@ -460,7 +460,7 @@ bytecodes: [ ...@@ -460,7 +460,7 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star1), B(Star1),
B(Mov), R(10), R(2), B(Mov), R(10), R(2),
B(Jump), U8(215), B(Jump), U8(216),
B(GetNamedProperty), R(7), U8(14), U8(20), B(GetNamedProperty), R(7), U8(14), U8(20),
B(JumpIfUndefinedOrNull), U8(10), B(JumpIfUndefinedOrNull), U8(10),
B(Star12), B(Star12),
...@@ -507,7 +507,7 @@ bytecodes: [ ...@@ -507,7 +507,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(GetNamedProperty), R(5), U8(15), U8(28), B(GetNamedProperty), R(5), U8(15), U8(28),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(36),
B(GetNamedProperty), R(5), U8(16), U8(30), B(GetNamedProperty), R(5), U8(16), U8(30),
B(Star15), B(Star15),
B(LdaFalse), B(LdaFalse),
...@@ -519,8 +519,8 @@ bytecodes: [ ...@@ -519,8 +519,8 @@ bytecodes: [
B(Star8), B(Star8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star6), B(Star6),
B(JumpLoop), U8(220), I8(0), B(JumpLoop), U8(220), I8(0), U8(32),
B(GetNamedProperty), R(5), U8(16), U8(32), B(GetNamedProperty), R(5), U8(16), U8(33),
B(Star7), B(Star7),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestReferenceEqual), R(6), B(TestReferenceEqual), R(6),
...@@ -594,13 +594,13 @@ constant pool: [ ...@@ -594,13 +594,13 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
Smi [333], Smi [334],
Smi [6], Smi [6],
Smi [9], Smi [9],
Smi [22], Smi [22],
] ]
handlers: [ handlers: [
[18, 380, 380], [18, 381, 381],
[21, 351, 351], [21, 352, 352],
] ]
...@@ -47,7 +47,7 @@ snippet: " ...@@ -47,7 +47,7 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 1 parameter count: 1
bytecode array length: 59 bytecode array length: 61
bytecodes: [ bytecodes: [
/* 44 S> */ B(LdaZero), /* 44 S> */ B(LdaZero),
B(Star0), B(Star0),
...@@ -55,12 +55,12 @@ bytecodes: [ ...@@ -55,12 +55,12 @@ bytecodes: [
B(Star1), B(Star1),
/* 76 S> */ B(LdaSmi), I8(10), /* 76 S> */ B(LdaSmi), I8(10),
/* 76 E> */ B(TestLessThan), R(1), U8(0), /* 76 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(47), B(JumpIfFalse), U8(49),
/* 106 S> */ B(LdaZero), /* 106 S> */ B(LdaZero),
B(Star2), B(Star2),
/* 111 S> */ B(LdaSmi), I8(3), /* 111 S> */ B(LdaSmi), I8(3),
/* 111 E> */ B(TestLessThan), R(2), U8(1), /* 111 E> */ B(TestLessThan), R(2), U8(1),
B(JumpIfFalse), U8(30), B(JumpIfFalse), U8(31),
/* 129 S> */ B(Ldar), R(0), /* 129 S> */ B(Ldar), R(0),
B(Inc), U8(2), B(Inc), U8(2),
B(Star0), B(Star0),
...@@ -70,15 +70,15 @@ bytecodes: [ ...@@ -70,15 +70,15 @@ bytecodes: [
B(LdaSmi), I8(12), B(LdaSmi), I8(12),
/* 152 E> */ B(TestEqual), R(3), U8(4), /* 152 E> */ B(TestEqual), R(3), U8(4),
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
/* 161 S> */ B(Jump), U8(18), /* 161 S> */ B(Jump), U8(20),
/* 118 S> */ B(Ldar), R(2), /* 118 S> */ B(Ldar), R(2),
B(Inc), U8(5), B(Inc), U8(5),
B(Star2), B(Star2),
/* 93 E> */ B(JumpLoop), U8(32), I8(1), /* 93 E> */ B(JumpLoop), U8(32), I8(1), U8(6),
/* 84 S> */ B(Ldar), R(1), /* 84 S> */ B(Ldar), R(1),
B(Inc), U8(6), B(Inc), U8(7),
B(Star1), B(Star1),
/* 58 E> */ B(JumpLoop), U8(49), I8(0), /* 58 E> */ B(JumpLoop), U8(50), I8(0), U8(8),
/* 188 S> */ B(Ldar), R(0), /* 188 S> */ B(Ldar), R(0),
/* 199 S> */ B(Return), /* 199 S> */ B(Return),
] ]
......
...@@ -65,7 +65,7 @@ snippet: " ...@@ -65,7 +65,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 1 parameter count: 1
bytecode array length: 88 bytecode array length: 89
bytecodes: [ bytecodes: [
/* 34 S> */ B(LdaGlobal), U8(0), U8(0), /* 34 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star1), B(Star1),
...@@ -88,13 +88,13 @@ bytecodes: [ ...@@ -88,13 +88,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(GetNamedProperty), R(6), U8(5), U8(21), B(GetNamedProperty), R(6), U8(5), U8(21),
B(JumpIfToBooleanTrue), U8(18), B(JumpIfToBooleanTrue), U8(19),
B(GetNamedProperty), R(6), U8(6), U8(12), B(GetNamedProperty), R(6), U8(6), U8(12),
B(StaInArrayLiteral), R(3), R(2), U8(17), B(StaInArrayLiteral), R(3), R(2), U8(17),
B(Ldar), R(2), B(Ldar), R(2),
B(Inc), U8(16), B(Inc), U8(16),
B(Star2), B(Star2),
B(JumpLoop), U8(31), I8(0), B(JumpLoop), U8(31), I8(0), U8(23),
B(LdaSmi), I8(4), B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(3), R(2), U8(17), B(StaInArrayLiteral), R(3), R(2), U8(17),
B(Mov), R(3), R(2), B(Mov), R(3), R(2),
......
...@@ -252,18 +252,18 @@ snippet: " ...@@ -252,18 +252,18 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 1 parameter count: 1
bytecode array length: 18 bytecode array length: 19
bytecodes: [ bytecodes: [
/* 42 S> */ B(LdaUndefined), /* 42 S> */ B(LdaUndefined),
B(Star0), B(Star0),
/* 61 S> */ B(LdaZero), /* 61 S> */ B(LdaZero),
B(Star1), B(Star1),
/* 73 S> */ B(Ldar), R(0), /* 73 S> */ B(Ldar), R(0),
B(JumpIfUndefined), U8(10), B(JumpIfUndefined), U8(11),
/* 92 S> */ B(Ldar), R(1), /* 92 S> */ B(Ldar), R(1),
B(Inc), U8(0), B(Inc), U8(0),
B(Star1), B(Star1),
/* 64 E> */ B(JumpLoop), U8(9), I8(0), /* 64 E> */ B(JumpLoop), U8(9), I8(0), U8(1),
B(LdaUndefined), B(LdaUndefined),
/* 99 S> */ B(Return), /* 99 S> */ B(Return),
] ]
......
...@@ -100,7 +100,7 @@ snippet: " ...@@ -100,7 +100,7 @@ snippet: "
" "
frame size: 14 frame size: 14
parameter count: 1 parameter count: 1
bytecode array length: 203 bytecode array length: 204
bytecodes: [ bytecodes: [
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37), /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star2), B(Star2),
...@@ -147,7 +147,7 @@ bytecodes: [ ...@@ -147,7 +147,7 @@ bytecodes: [
/* 63 S> */ B(CreateEmptyArrayLiteral), U8(15), /* 63 S> */ B(CreateEmptyArrayLiteral), U8(15),
B(Star11), B(Star11),
B(Ldar), R(6), B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(40), B(JumpIfToBooleanTrue), U8(41),
B(LdaZero), B(LdaZero),
B(Star12), B(Star12),
B(LdaTrue), B(LdaTrue),
...@@ -157,13 +157,13 @@ bytecodes: [ ...@@ -157,13 +157,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(2), U8(21), B(GetNamedProperty), R(10), U8(2), U8(21),
B(JumpIfToBooleanTrue), U8(18), B(JumpIfToBooleanTrue), U8(19),
B(GetNamedProperty), R(10), U8(3), U8(7), B(GetNamedProperty), R(10), U8(3), U8(7),
B(StaInArrayLiteral), R(11), R(12), U8(16), B(StaInArrayLiteral), R(11), R(12), U8(16),
B(Ldar), R(12), B(Ldar), R(12),
B(Inc), U8(18), B(Inc), U8(18),
B(Star12), B(Star12),
B(JumpLoop), U8(31), I8(0), B(JumpLoop), U8(31), I8(0), U8(23),
B(Mov), R(11), R(1), B(Mov), R(11), R(1),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star8), B(Star8),
...@@ -178,10 +178,10 @@ bytecodes: [ ...@@ -178,10 +178,10 @@ bytecodes: [
B(Ldar), R(6), B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11), B(Mov), R(context), R(11),
B(GetNamedProperty), R(5), U8(4), U8(23), B(GetNamedProperty), R(5), U8(4), U8(24),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star12), B(Star12),
B(CallProperty0), R(12), R(5), U8(25), B(CallProperty0), R(12), R(5), U8(26),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star13), B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
...@@ -210,8 +210,8 @@ constant pool: [ ...@@ -210,8 +210,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
] ]
handlers: [ handlers: [
[30, 141, 147], [30, 142, 148],
[160, 179, 181], [161, 180, 182],
] ]
--- ---
......
...@@ -16,7 +16,7 @@ snippet: " ...@@ -16,7 +16,7 @@ snippet: "
" "
frame size: 19 frame size: 19
parameter count: 1 parameter count: 1
bytecode array length: 268 bytecode array length: 269
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
...@@ -64,7 +64,7 @@ bytecodes: [ ...@@ -64,7 +64,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(GetNamedProperty), R(11), U8(6), U8(13), B(GetNamedProperty), R(11), U8(6), U8(13),
B(JumpIfToBooleanTrue), U8(20), B(JumpIfToBooleanTrue), U8(21),
B(GetNamedProperty), R(11), U8(7), U8(15), B(GetNamedProperty), R(11), U8(7), U8(15),
B(Star11), B(Star11),
B(LdaFalse), B(LdaFalse),
...@@ -72,7 +72,7 @@ bytecodes: [ ...@@ -72,7 +72,7 @@ bytecodes: [
B(Mov), R(11), R(1), B(Mov), R(11), R(1),
/* 38 S> */ B(Mov), R(1), R(3), /* 38 S> */ B(Mov), R(1), R(3),
B(Ldar), R(11), B(Ldar), R(11),
/* 23 E> */ B(JumpLoop), U8(70), I8(0), /* 23 E> */ B(JumpLoop), U8(70), I8(0), U8(17),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star9), B(Star9),
B(Star8), B(Star8),
...@@ -86,10 +86,10 @@ bytecodes: [ ...@@ -86,10 +86,10 @@ bytecodes: [
B(Ldar), R(7), B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(72), B(JumpIfToBooleanTrue), U8(72),
B(Mov), R(context), R(14), B(Mov), R(context), R(14),
B(GetNamedProperty), R(6), U8(8), U8(17), B(GetNamedProperty), R(6), U8(8), U8(18),
B(JumpIfUndefinedOrNull), U8(63), B(JumpIfUndefinedOrNull), U8(63),
B(Star15), B(Star15),
B(CallProperty0), R(15), R(6), U8(19), B(CallProperty0), R(15), R(6), U8(20),
B(Star), R(17), B(Star), R(17),
B(Mov), R(0), R(16), B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2), B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
...@@ -141,7 +141,7 @@ bytecodes: [ ...@@ -141,7 +141,7 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [85], Smi [85],
Smi [183], Smi [184],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE, ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE, SYMBOL_TYPE,
SYMBOL_TYPE, SYMBOL_TYPE,
...@@ -152,9 +152,9 @@ constant pool: [ ...@@ -152,9 +152,9 @@ constant pool: [
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
] ]
handlers: [ handlers: [
[18, 246, 246], [18, 247, 247],
[66, 139, 145], [66, 140, 146],
[158, 214, 216], [159, 215, 217],
] ]
--- ---
...@@ -238,10 +238,10 @@ bytecodes: [ ...@@ -238,10 +238,10 @@ bytecodes: [
B(Ldar), R(7), B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(72), B(JumpIfToBooleanTrue), U8(72),
B(Mov), R(context), R(14), B(Mov), R(context), R(14),
B(GetNamedProperty), R(6), U8(8), U8(17), B(GetNamedProperty), R(6), U8(8), U8(18),
B(JumpIfUndefinedOrNull), U8(63), B(JumpIfUndefinedOrNull), U8(63),
B(Star15), B(Star15),
B(CallProperty0), R(15), R(6), U8(19), B(CallProperty0), R(15), R(6), U8(20),
B(Star), R(17), B(Star), R(17),
B(Mov), R(0), R(16), B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2), B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
...@@ -327,7 +327,7 @@ snippet: " ...@@ -327,7 +327,7 @@ snippet: "
" "
frame size: 19 frame size: 19
parameter count: 1 parameter count: 1
bytecode array length: 284 bytecode array length: 285
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
...@@ -375,7 +375,7 @@ bytecodes: [ ...@@ -375,7 +375,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(GetNamedProperty), R(11), U8(6), U8(13), B(GetNamedProperty), R(11), U8(6), U8(13),
B(JumpIfToBooleanTrue), U8(36), B(JumpIfToBooleanTrue), U8(37),
B(GetNamedProperty), R(11), U8(7), U8(15), B(GetNamedProperty), R(11), U8(7), U8(15),
B(Star11), B(Star11),
B(LdaFalse), B(LdaFalse),
...@@ -389,8 +389,8 @@ bytecodes: [ ...@@ -389,8 +389,8 @@ bytecodes: [
/* 90 S> */ B(LdaSmi), I8(20), /* 90 S> */ B(LdaSmi), I8(20),
/* 96 E> */ B(TestEqual), R(3), U8(18), /* 96 E> */ B(TestEqual), R(3), U8(18),
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
/* 103 S> */ B(Jump), U8(5), /* 103 S> */ B(Jump), U8(6),
/* 23 E> */ B(JumpLoop), U8(86), I8(0), /* 23 E> */ B(JumpLoop), U8(86), I8(0), U8(19),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star9), B(Star9),
B(Star8), B(Star8),
...@@ -404,10 +404,10 @@ bytecodes: [ ...@@ -404,10 +404,10 @@ bytecodes: [
B(Ldar), R(7), B(Ldar), R(7),
B(JumpIfToBooleanTrue), U8(72), B(JumpIfToBooleanTrue), U8(72),
B(Mov), R(context), R(14), B(Mov), R(context), R(14),
B(GetNamedProperty), R(6), U8(8), U8(19), B(GetNamedProperty), R(6), U8(8), U8(20),
B(JumpIfUndefinedOrNull), U8(63), B(JumpIfUndefinedOrNull), U8(63),
B(Star15), B(Star15),
B(CallProperty0), R(15), R(6), U8(21), B(CallProperty0), R(15), R(6), U8(22),
B(Star), R(17), B(Star), R(17),
B(Mov), R(0), R(16), B(Mov), R(0), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2), B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
...@@ -459,7 +459,7 @@ bytecodes: [ ...@@ -459,7 +459,7 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [85], Smi [85],
Smi [199], Smi [200],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE, ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE, SYMBOL_TYPE,
SYMBOL_TYPE, SYMBOL_TYPE,
...@@ -470,9 +470,9 @@ constant pool: [ ...@@ -470,9 +470,9 @@ constant pool: [
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
] ]
handlers: [ handlers: [
[18, 262, 262], [18, 263, 263],
[66, 155, 161], [66, 156, 162],
[174, 230, 232], [175, 231, 233],
] ]
--- ---
...@@ -538,10 +538,10 @@ bytecodes: [ ...@@ -538,10 +538,10 @@ bytecodes: [
B(Ldar), R(5), B(Ldar), R(5),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11), B(Mov), R(context), R(11),
B(GetNamedProperty), R(4), U8(6), U8(18), B(GetNamedProperty), R(4), U8(6), U8(19),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star12), B(Star12),
B(CallProperty0), R(12), R(4), U8(20), B(CallProperty0), R(12), R(4), U8(21),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star13), B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
......
...@@ -60,18 +60,18 @@ snippet: " ...@@ -60,18 +60,18 @@ snippet: "
" "
frame size: 8 frame size: 8
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 38
bytecodes: [ bytecodes: [
/* 42 S> */ B(LdaConstant), U8(0), /* 42 S> */ B(LdaConstant), U8(0),
B(Star0), B(Star0),
/* 68 S> */ B(JumpIfUndefinedOrNull), U8(32), /* 68 S> */ B(JumpIfUndefinedOrNull), U8(33),
B(ToObject), R(3), B(ToObject), R(3),
B(ForInEnumerate), R(3), B(ForInEnumerate), R(3),
B(ForInPrepare), R(4), U8(0), B(ForInPrepare), R(4), U8(0),
B(LdaZero), B(LdaZero),
B(Star7), B(Star7),
/* 63 S> */ B(ForInContinue), R(7), R(6), /* 63 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(18), B(JumpIfFalse), U8(19),
B(ForInNext), R(3), R(7), R(4), U8(0), B(ForInNext), R(3), R(7), R(4), U8(0),
B(JumpIfUndefined), U8(5), B(JumpIfUndefined), U8(5),
B(Star2), B(Star2),
...@@ -79,7 +79,7 @@ bytecodes: [ ...@@ -79,7 +79,7 @@ bytecodes: [
/* 82 S> */ B(Return), /* 82 S> */ B(Return),
B(ForInStep), R(7), B(ForInStep), R(7),
B(Star7), B(Star7),
/* 54 E> */ B(JumpLoop), U8(18), I8(0), /* 54 E> */ B(JumpLoop), U8(18), I8(0), U8(1),
B(LdaUndefined), B(LdaUndefined),
/* 85 S> */ B(Return), /* 85 S> */ B(Return),
] ]
...@@ -96,19 +96,19 @@ snippet: " ...@@ -96,19 +96,19 @@ snippet: "
" "
frame size: 9 frame size: 9
parameter count: 1 parameter count: 1
bytecode array length: 48 bytecode array length: 49
bytecodes: [ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star0), B(Star0),
/* 59 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37), /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37),
B(JumpIfUndefinedOrNull), U8(40), B(JumpIfUndefinedOrNull), U8(41),
B(ToObject), R(3), B(ToObject), R(3),
B(ForInEnumerate), R(3), B(ForInEnumerate), R(3),
B(ForInPrepare), R(4), U8(0), B(ForInPrepare), R(4), U8(0),
B(LdaZero), B(LdaZero),
B(Star7), B(Star7),
/* 54 S> */ B(ForInContinue), R(7), R(6), /* 54 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(26), B(JumpIfFalse), U8(27),
B(ForInNext), R(3), R(7), R(4), U8(0), B(ForInNext), R(3), R(7), R(4), U8(0),
B(JumpIfUndefined), U8(13), B(JumpIfUndefined), U8(13),
B(Star2), B(Star2),
...@@ -119,7 +119,7 @@ bytecodes: [ ...@@ -119,7 +119,7 @@ bytecodes: [
B(Star0), B(Star0),
/* 72 E> */ B(ForInStep), R(7), /* 72 E> */ B(ForInStep), R(7),
B(Star7), B(Star7),
/* 45 E> */ B(JumpLoop), U8(26), I8(0), /* 45 E> */ B(JumpLoop), U8(26), I8(0), U8(3),
B(LdaUndefined), B(LdaUndefined),
/* 80 S> */ B(Return), /* 80 S> */ B(Return),
] ]
...@@ -139,19 +139,19 @@ snippet: " ...@@ -139,19 +139,19 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 1 parameter count: 1
bytecode array length: 75 bytecode array length: 76
bytecodes: [ bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star0), B(Star0),
/* 77 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37), /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
B(JumpIfUndefinedOrNull), U8(64), B(JumpIfUndefinedOrNull), U8(65),
B(ToObject), R(1), B(ToObject), R(1),
B(ForInEnumerate), R(1), B(ForInEnumerate), R(1),
B(ForInPrepare), R(2), U8(1), B(ForInPrepare), R(2), U8(1),
B(LdaZero), B(LdaZero),
B(Star5), B(Star5),
/* 68 S> */ B(ForInContinue), R(5), R(4), /* 68 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(50), B(JumpIfFalse), U8(51),
B(ForInNext), R(1), R(5), R(2), U8(1), B(ForInNext), R(1), R(5), R(2), U8(1),
B(JumpIfUndefined), U8(37), B(JumpIfUndefined), U8(37),
B(Star6), B(Star6),
...@@ -168,10 +168,10 @@ bytecodes: [ ...@@ -168,10 +168,10 @@ bytecodes: [
B(LdaSmi), I8(20), B(LdaSmi), I8(20),
/* 136 E> */ B(TestEqual), R(6), U8(8), /* 136 E> */ B(TestEqual), R(6), U8(8),
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
/* 143 S> */ B(Jump), U8(8), /* 143 S> */ B(Jump), U8(9),
B(ForInStep), R(5), B(ForInStep), R(5),
B(Star5), B(Star5),
/* 62 E> */ B(JumpLoop), U8(50), I8(0), /* 62 E> */ B(JumpLoop), U8(50), I8(0), U8(9),
B(LdaUndefined), B(LdaUndefined),
/* 152 S> */ B(Return), /* 152 S> */ B(Return),
] ]
...@@ -190,19 +190,19 @@ snippet: " ...@@ -190,19 +190,19 @@ snippet: "
" "
frame size: 9 frame size: 9
parameter count: 1 parameter count: 1
bytecode array length: 55 bytecode array length: 56
bytecodes: [ bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37), /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star0), B(Star0),
/* 72 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37), /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
B(JumpIfUndefinedOrNull), U8(44), B(JumpIfUndefinedOrNull), U8(45),
B(ToObject), R(1), B(ToObject), R(1),
B(ForInEnumerate), R(1), B(ForInEnumerate), R(1),
B(ForInPrepare), R(2), U8(1), B(ForInPrepare), R(2), U8(1),
B(LdaZero), B(LdaZero),
B(Star5), B(Star5),
/* 65 S> */ B(ForInContinue), R(5), R(4), /* 65 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(30), B(JumpIfFalse), U8(31),
B(ForInNext), R(1), R(5), R(2), U8(1), B(ForInNext), R(1), R(5), R(2), U8(1),
B(JumpIfUndefined), U8(17), B(JumpIfUndefined), U8(17),
B(Star6), B(Star6),
...@@ -215,7 +215,7 @@ bytecodes: [ ...@@ -215,7 +215,7 @@ bytecodes: [
/* 95 S> */ B(Return), /* 95 S> */ B(Return),
B(ForInStep), R(5), B(ForInStep), R(5),
B(Star5), B(Star5),
/* 59 E> */ B(JumpLoop), U8(30), I8(0), /* 59 E> */ B(JumpLoop), U8(30), I8(0), U8(7),
B(LdaUndefined), B(LdaUndefined),
/* 98 S> */ B(Return), /* 98 S> */ B(Return),
] ]
......
...@@ -11,7 +11,7 @@ snippet: " ...@@ -11,7 +11,7 @@ snippet: "
" "
frame size: 12 frame size: 12
parameter count: 1 parameter count: 1
bytecode array length: 127 bytecode array length: 128
bytecodes: [ bytecodes: [
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37), /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star4), B(Star4),
...@@ -31,7 +31,7 @@ bytecodes: [ ...@@ -31,7 +31,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
B(GetNamedProperty), R(8), U8(2), U8(9), B(GetNamedProperty), R(8), U8(2), U8(9),
B(JumpIfToBooleanTrue), U8(20), B(JumpIfToBooleanTrue), U8(21),
B(GetNamedProperty), R(8), U8(3), U8(11), B(GetNamedProperty), R(8), U8(3), U8(11),
B(Star8), B(Star8),
B(LdaFalse), B(LdaFalse),
...@@ -39,7 +39,7 @@ bytecodes: [ ...@@ -39,7 +39,7 @@ bytecodes: [
B(Mov), R(8), R(1), B(Mov), R(8), R(1),
/* 43 S> */ B(Mov), R(1), R(0), /* 43 S> */ B(Mov), R(1), R(0),
B(Ldar), R(8), B(Ldar), R(8),
/* 34 E> */ B(JumpLoop), U8(35), I8(0), /* 34 E> */ B(JumpLoop), U8(35), I8(0), U8(13),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star6), B(Star6),
B(Star5), B(Star5),
...@@ -53,10 +53,10 @@ bytecodes: [ ...@@ -53,10 +53,10 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(9), B(Mov), R(context), R(9),
B(GetNamedProperty), R(3), U8(4), U8(13), B(GetNamedProperty), R(3), U8(4), U8(14),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star10), B(Star10),
B(CallProperty0), R(10), R(3), U8(15), B(CallProperty0), R(10), R(3), U8(16),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star11), B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
...@@ -85,8 +85,8 @@ constant pool: [ ...@@ -85,8 +85,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
] ]
handlers: [ handlers: [
[27, 65, 71], [27, 66, 72],
[84, 103, 105], [85, 104, 106],
] ]
--- ---
...@@ -140,10 +140,10 @@ bytecodes: [ ...@@ -140,10 +140,10 @@ bytecodes: [
B(Ldar), R(5), B(Ldar), R(5),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(10), B(Mov), R(context), R(10),
B(GetNamedProperty), R(4), U8(4), U8(12), B(GetNamedProperty), R(4), U8(4), U8(13),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star11), B(Star11),
B(CallProperty0), R(11), R(4), U8(14), B(CallProperty0), R(11), R(4), U8(15),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star12), B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
...@@ -189,7 +189,7 @@ snippet: " ...@@ -189,7 +189,7 @@ snippet: "
" "
frame size: 12 frame size: 12
parameter count: 1 parameter count: 1
bytecode array length: 143 bytecode array length: 144
bytecodes: [ bytecodes: [
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37), /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star4), B(Star4),
...@@ -209,7 +209,7 @@ bytecodes: [ ...@@ -209,7 +209,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
B(GetNamedProperty), R(8), U8(2), U8(9), B(GetNamedProperty), R(8), U8(2), U8(9),
B(JumpIfToBooleanTrue), U8(36), B(JumpIfToBooleanTrue), U8(37),
B(GetNamedProperty), R(8), U8(3), U8(11), B(GetNamedProperty), R(8), U8(3), U8(11),
B(Star8), B(Star8),
B(LdaFalse), B(LdaFalse),
...@@ -223,8 +223,8 @@ bytecodes: [ ...@@ -223,8 +223,8 @@ bytecodes: [
/* 91 S> */ B(LdaSmi), I8(20), /* 91 S> */ B(LdaSmi), I8(20),
/* 97 E> */ B(TestEqual), R(0), U8(14), /* 97 E> */ B(TestEqual), R(0), U8(14),
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
/* 104 S> */ B(Jump), U8(5), /* 104 S> */ B(Jump), U8(6),
/* 34 E> */ B(JumpLoop), U8(51), I8(0), /* 34 E> */ B(JumpLoop), U8(51), I8(0), U8(15),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star6), B(Star6),
B(Star5), B(Star5),
...@@ -238,10 +238,10 @@ bytecodes: [ ...@@ -238,10 +238,10 @@ bytecodes: [
B(Ldar), R(4), B(Ldar), R(4),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(9), B(Mov), R(context), R(9),
B(GetNamedProperty), R(3), U8(4), U8(15), B(GetNamedProperty), R(3), U8(4), U8(16),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star10), B(Star10),
B(CallProperty0), R(10), R(3), U8(17), B(CallProperty0), R(10), R(3), U8(18),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star11), B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
...@@ -270,8 +270,8 @@ constant pool: [ ...@@ -270,8 +270,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
] ]
handlers: [ handlers: [
[27, 81, 87], [27, 82, 88],
[100, 119, 121], [101, 120, 122],
] ]
--- ---
...@@ -329,10 +329,10 @@ bytecodes: [ ...@@ -329,10 +329,10 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(9), B(Mov), R(context), R(9),
B(GetNamedProperty), R(2), U8(6), U8(18), B(GetNamedProperty), R(2), U8(6), U8(19),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star10), B(Star10),
B(CallProperty0), R(10), R(2), U8(20), B(CallProperty0), R(10), R(2), U8(21),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star11), B(Star11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
......
...@@ -98,7 +98,7 @@ snippet: " ...@@ -98,7 +98,7 @@ snippet: "
" "
frame size: 14 frame size: 14
parameter count: 1 parameter count: 1
bytecode array length: 210 bytecode array length: 211
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
...@@ -132,7 +132,7 @@ bytecodes: [ ...@@ -132,7 +132,7 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(6), U8(9), B(GetNamedProperty), R(10), U8(6), U8(9),
B(JumpIfToBooleanTrue), U8(58), B(JumpIfToBooleanTrue), U8(59),
B(GetNamedProperty), R(10), U8(7), U8(11), B(GetNamedProperty), R(10), U8(7), U8(11),
B(Star10), B(Star10),
B(LdaFalse), B(LdaFalse),
...@@ -153,9 +153,9 @@ bytecodes: [ ...@@ -153,9 +153,9 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star7), B(Star7),
B(Mov), R(11), R(8), B(Mov), R(11), R(8),
B(Jump), U8(16), B(Jump), U8(17),
B(Ldar), R(11), B(Ldar), R(11),
/* 16 E> */ B(JumpLoop), U8(73), I8(0), /* 16 E> */ B(JumpLoop), U8(73), I8(0), U8(13),
B(LdaSmi), I8(-1), B(LdaSmi), I8(-1),
B(Star8), B(Star8),
B(Star7), B(Star7),
...@@ -169,10 +169,10 @@ bytecodes: [ ...@@ -169,10 +169,10 @@ bytecodes: [
B(Ldar), R(6), B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35), B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(11), B(Mov), R(context), R(11),
B(GetNamedProperty), R(5), U8(10), U8(13), B(GetNamedProperty), R(5), U8(10), U8(14),
B(JumpIfUndefinedOrNull), U8(26), B(JumpIfUndefinedOrNull), U8(26),
B(Star12), B(Star12),
B(CallProperty0), R(12), R(5), U8(15), B(CallProperty0), R(12), R(5), U8(16),
B(JumpIfJSReceiver), U8(19), B(JumpIfJSReceiver), U8(19),
B(Star13), B(Star13),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
...@@ -211,8 +211,8 @@ constant pool: [ ...@@ -211,8 +211,8 @@ constant pool: [
Smi [9], Smi [9],
] ]
handlers: [ handlers: [
[66, 142, 148], [66, 143, 149],
[161, 180, 182], [162, 181, 183],
] ]
--- ---
...@@ -223,7 +223,7 @@ snippet: " ...@@ -223,7 +223,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 1 parameter count: 1
bytecode array length: 188 bytecode array length: 189
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1), B(Mov), R(closure), R(1),
...@@ -282,15 +282,15 @@ bytecodes: [ ...@@ -282,15 +282,15 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1),
B(GetNamedProperty), R(1), U8(10), U8(24), B(GetNamedProperty), R(1), U8(10), U8(24),
B(JumpIfToBooleanTrue), U8(22), B(JumpIfToBooleanTrue), U8(23),
B(Ldar), R(1), B(Ldar), R(1),
/* 43 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(1), /* 43 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
B(ResumeGenerator), R(0), R(0), U8(6), B(ResumeGenerator), R(0), R(0), U8(6),
B(Star4), B(Star4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star2), B(Star2),
B(JumpLoop), U8(101), I8(0), B(JumpLoop), U8(101), I8(0), U8(26),
B(GetNamedProperty), R(1), U8(11), U8(26), B(GetNamedProperty), R(1), U8(11), U8(27),
B(Star3), B(Star3),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestReferenceEqual), R(2), B(TestReferenceEqual), R(2),
......
...@@ -90,7 +90,7 @@ snippet: " ...@@ -90,7 +90,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 1 parameter count: 1
bytecode array length: 110 bytecode array length: 111
bytecodes: [ bytecodes: [
B(CreateBlockContext), U8(0), B(CreateBlockContext), U8(0),
B(PushContext), R(1), B(PushContext), R(1),
...@@ -123,13 +123,13 @@ bytecodes: [ ...@@ -123,13 +123,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(GetNamedProperty), R(6), U8(6), U8(17), B(GetNamedProperty), R(6), U8(6), U8(17),
B(JumpIfToBooleanTrue), U8(18), B(JumpIfToBooleanTrue), U8(19),
B(GetNamedProperty), R(6), U8(7), U8(8), B(GetNamedProperty), R(6), U8(7), U8(8),
B(StaInArrayLiteral), R(3), R(2), U8(13), B(StaInArrayLiteral), R(3), R(2), U8(13),
B(Ldar), R(2), B(Ldar), R(2),
B(Inc), U8(12), B(Inc), U8(12),
B(Star2), B(Star2),
B(JumpLoop), U8(31), I8(0), B(JumpLoop), U8(31), I8(0), U8(19),
B(LdaSmi), I8(4), B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(3), R(2), U8(13), B(StaInArrayLiteral), R(3), R(2), U8(13),
B(Mov), R(3), R(2), B(Mov), R(3), R(2),
......
...@@ -16,7 +16,7 @@ snippet: " ...@@ -16,7 +16,7 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 24 bytecode array length: 25
bytecodes: [ bytecodes: [
/* 45 S> */ B(LdaSmi), I8(1), /* 45 S> */ B(LdaSmi), I8(1),
B(Star0), B(Star0),
...@@ -26,8 +26,8 @@ bytecodes: [ ...@@ -26,8 +26,8 @@ bytecodes: [
/* 86 S> */ B(LdaSmi), I8(10), /* 86 S> */ B(LdaSmi), I8(10),
/* 95 E> */ B(TestGreaterThan), R(0), U8(1), /* 95 E> */ B(TestGreaterThan), R(0), U8(1),
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
/* 101 S> */ B(Jump), U8(5), /* 101 S> */ B(Jump), U8(6),
/* 48 E> */ B(JumpLoop), U8(15), I8(0), /* 48 E> */ B(JumpLoop), U8(15), I8(0), U8(2),
/* 110 S> */ B(Ldar), R(0), /* 110 S> */ B(Ldar), R(0),
/* 122 S> */ B(Return), /* 122 S> */ B(Return),
] ]
......
...@@ -15,18 +15,18 @@ snippet: " ...@@ -15,18 +15,18 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 1 parameter count: 1
bytecode array length: 22 bytecode array length: 23
bytecodes: [ bytecodes: [
/* 30 S> */ B(LdaZero), /* 30 S> */ B(LdaZero),
B(Star0), B(Star0),
/* 35 S> */ B(LdaSmi), I8(10), /* 35 S> */ B(LdaSmi), I8(10),
/* 35 E> */ B(TestLessThan), R(0), U8(0), /* 35 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(13), B(JumpIfFalse), U8(14),
/* 56 S> */ B(Mov), R(0), R(1), /* 56 S> */ B(Mov), R(0), R(1),
/* 43 S> */ B(Ldar), R(1), /* 43 S> */ B(Ldar), R(1),
B(Inc), U8(1), B(Inc), U8(1),
B(Star0), B(Star0),
/* 17 E> */ B(JumpLoop), U8(15), I8(0), /* 17 E> */ B(JumpLoop), U8(15), I8(0), U8(2),
B(LdaUndefined), B(LdaUndefined),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
] ]
...@@ -44,7 +44,7 @@ snippet: " ...@@ -44,7 +44,7 @@ snippet: "
" "
frame size: 15 frame size: 15
parameter count: 1 parameter count: 1
bytecode array length: 149 bytecode array length: 151
bytecodes: [ bytecodes: [
/* 10 E> */ B(CreateFunctionContext), U8(0), U8(4), /* 10 E> */ B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(4), B(PushContext), R(4),
...@@ -88,10 +88,10 @@ bytecodes: [ ...@@ -88,10 +88,10 @@ bytecodes: [
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
B(Jump), U8(6), B(Jump), U8(6),
B(PopContext), R(6), B(PopContext), R(6),
B(Jump), U8(68), B(Jump), U8(70),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(3), B(TestEqual), R(2), U8(3),
B(JumpIfFalse), U8(45), B(JumpIfFalse), U8(46),
/* 48 S> */ B(LdaLookupGlobalSlot), U8(3), U8(4), U8(3), /* 48 S> */ B(LdaLookupGlobalSlot), U8(3), U8(4), U8(3),
B(Star7), B(Star7),
B(LdaConstant), U8(4), B(LdaConstant), U8(4),
...@@ -112,14 +112,14 @@ bytecodes: [ ...@@ -112,14 +112,14 @@ bytecodes: [
B(Star2), B(Star2),
B(LdaCurrentContextSlot), U8(2), B(LdaCurrentContextSlot), U8(2),
B(Star0), B(Star0),
/* 17 E> */ B(JumpLoop), U8(47), I8(1), /* 17 E> */ B(JumpLoop), U8(47), I8(1), U8(8),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(8), B(TestEqual), R(2), U8(9),
B(JumpIfFalse), U8(6), B(JumpIfFalse), U8(6),
B(PopContext), R(6), B(PopContext), R(6),
B(Jump), U8(7), B(Jump), U8(8),
B(PopContext), R(6), B(PopContext), R(6),
B(JumpLoop), U8(110), I8(0), B(JumpLoop), U8(111), I8(0), U8(10),
B(PopContext), R(5), B(PopContext), R(5),
B(LdaUndefined), B(LdaUndefined),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
...@@ -143,7 +143,7 @@ snippet: " ...@@ -143,7 +143,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 1 parameter count: 1
bytecode array length: 94 bytecode array length: 96
bytecodes: [ bytecodes: [
/* 30 S> */ B(LdaZero), /* 30 S> */ B(LdaZero),
B(Star3), B(Star3),
...@@ -174,10 +174,10 @@ bytecodes: [ ...@@ -174,10 +174,10 @@ bytecodes: [
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
B(Jump), U8(6), B(Jump), U8(6),
B(PopContext), R(4), B(PopContext), R(4),
B(Jump), U8(41), B(Jump), U8(43),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(3), B(TestEqual), R(2), U8(3),
B(JumpIfFalse), U8(18), B(JumpIfFalse), U8(19),
/* 48 S> */ B(CreateClosure), U8(1), U8(0), U8(2), /* 48 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star5), B(Star5),
/* 74 E> */ B(CallUndefinedReceiver0), R(5), U8(4), /* 74 E> */ B(CallUndefinedReceiver0), R(5), U8(4),
...@@ -185,14 +185,14 @@ bytecodes: [ ...@@ -185,14 +185,14 @@ bytecodes: [
B(Star2), B(Star2),
B(LdaCurrentContextSlot), U8(2), B(LdaCurrentContextSlot), U8(2),
B(Star0), B(Star0),
/* 17 E> */ B(JumpLoop), U8(20), I8(1), /* 17 E> */ B(JumpLoop), U8(20), I8(1), U8(6),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(6), B(TestEqual), R(2), U8(7),
B(JumpIfFalse), U8(6), B(JumpIfFalse), U8(6),
B(PopContext), R(4), B(PopContext), R(4),
B(Jump), U8(7), B(Jump), U8(8),
B(PopContext), R(4), B(PopContext), R(4),
B(JumpLoop), U8(83), I8(0), B(JumpLoop), U8(84), I8(0), U8(8),
B(LdaUndefined), B(LdaUndefined),
/* 80 S> */ B(Return), /* 80 S> */ B(Return),
] ]
...@@ -212,7 +212,7 @@ snippet: " ...@@ -212,7 +212,7 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 38
bytecodes: [ bytecodes: [
/* 37 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), /* 37 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star3), B(Star3),
...@@ -222,14 +222,14 @@ bytecodes: [ ...@@ -222,14 +222,14 @@ bytecodes: [
B(Star1), B(Star1),
/* 55 S> */ B(LdaZero), /* 55 S> */ B(LdaZero),
/* 55 E> */ B(TestGreaterThan), R(1), U8(5), /* 55 E> */ B(TestGreaterThan), R(1), U8(5),
B(JumpIfFalse), U8(16), B(JumpIfFalse), U8(17),
/* 75 S> */ B(Ldar), R(1), /* 75 S> */ B(Ldar), R(1),
/* 77 E> */ B(Add), R(0), U8(6), /* 77 E> */ B(Add), R(0), U8(6),
B(Star2), B(Star2),
/* 62 S> */ B(Ldar), R(1), /* 62 S> */ B(Ldar), R(1),
B(Dec), U8(7), B(Dec), U8(7),
B(Star1), B(Star1),
/* 17 E> */ B(JumpLoop), U8(17), I8(0), /* 17 E> */ B(JumpLoop), U8(17), I8(0), U8(8),
B(LdaUndefined), B(LdaUndefined),
/* 84 S> */ B(Return), /* 84 S> */ B(Return),
] ]
...@@ -250,7 +250,7 @@ snippet: " ...@@ -250,7 +250,7 @@ snippet: "
" "
frame size: 5 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 61 bytecode array length: 62
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1), B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
...@@ -270,12 +270,12 @@ bytecodes: [ ...@@ -270,12 +270,12 @@ bytecodes: [
B(Star1), B(Star1),
/* 36 S> */ B(LdaSmi), I8(10), /* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(1), U8(0), /* 36 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(13), B(JumpIfFalse), U8(14),
/* 57 S> */ B(Mov), R(1), R(2), /* 57 S> */ B(Mov), R(1), R(2),
/* 44 S> */ B(Ldar), R(2), /* 44 S> */ B(Ldar), R(2),
B(Inc), U8(1), B(Inc), U8(1),
B(Star1), B(Star1),
/* 18 E> */ B(JumpLoop), U8(15), I8(0), /* 18 E> */ B(JumpLoop), U8(15), I8(0), U8(2),
B(LdaUndefined), B(LdaUndefined),
/* 62 S> */ B(Return), /* 62 S> */ B(Return),
] ]
...@@ -296,7 +296,7 @@ snippet: " ...@@ -296,7 +296,7 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 1 parameter count: 1
bytecode array length: 91 bytecode array length: 92
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(2), B(Mov), R(closure), R(2),
...@@ -316,7 +316,7 @@ bytecodes: [ ...@@ -316,7 +316,7 @@ bytecodes: [
B(Star1), B(Star1),
/* 36 S> */ B(LdaSmi), I8(10), /* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(1), U8(0), /* 36 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(43), B(JumpIfFalse), U8(44),
/* 47 S> */ B(LdaFalse), /* 47 S> */ B(LdaFalse),
B(Star3), B(Star3),
B(Mov), R(1), R(2), B(Mov), R(1), R(2),
...@@ -333,7 +333,7 @@ bytecodes: [ ...@@ -333,7 +333,7 @@ bytecodes: [
/* 44 S> */ B(Ldar), R(1), /* 44 S> */ B(Ldar), R(1),
B(Inc), U8(1), B(Inc), U8(1),
B(Star1), B(Star1),
/* 18 E> */ B(JumpLoop), U8(45), I8(0), /* 18 E> */ B(JumpLoop), U8(45), I8(0), U8(2),
B(LdaUndefined), B(LdaUndefined),
/* 56 S> */ B(Return), /* 56 S> */ B(Return),
] ]
...@@ -357,7 +357,7 @@ snippet: " ...@@ -357,7 +357,7 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 1 parameter count: 1
bytecode array length: 66 bytecode array length: 67
bytecodes: [ bytecodes: [
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
B(Mov), R(this), R(4), B(Mov), R(this), R(4),
...@@ -368,12 +368,12 @@ bytecodes: [ ...@@ -368,12 +368,12 @@ bytecodes: [
B(Star1), B(Star1),
/* 41 S> */ B(LdaSmi), I8(10), /* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(1), U8(0), /* 41 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(13), B(JumpIfFalse), U8(14),
/* 62 S> */ B(Mov), R(1), R(2), /* 62 S> */ B(Mov), R(1), R(2),
/* 49 S> */ B(Ldar), R(2), /* 49 S> */ B(Ldar), R(2),
B(Inc), U8(1), B(Inc), U8(1),
B(Star1), B(Star1),
/* 23 E> */ B(JumpLoop), U8(15), I8(0), /* 23 E> */ B(JumpLoop), U8(15), I8(0), U8(2),
B(LdaUndefined), B(LdaUndefined),
B(Star5), B(Star5),
B(Mov), R(0), R(4), B(Mov), R(0), R(4),
...@@ -396,7 +396,7 @@ constant pool: [ ...@@ -396,7 +396,7 @@ constant pool: [
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
] ]
handlers: [ handlers: [
[14, 44, 44], [14, 45, 45],
] ]
--- ---
...@@ -408,7 +408,7 @@ snippet: " ...@@ -408,7 +408,7 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 1 parameter count: 1
bytecode array length: 100 bytecode array length: 101
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1), B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(2), B(Mov), R(closure), R(2),
...@@ -420,7 +420,7 @@ bytecodes: [ ...@@ -420,7 +420,7 @@ bytecodes: [
B(Star1), B(Star1),
/* 41 S> */ B(LdaSmi), I8(10), /* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(1), U8(0), /* 41 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(43), B(JumpIfFalse), U8(44),
/* 52 S> */ B(Mov), R(0), R(3), /* 52 S> */ B(Mov), R(0), R(3),
B(Mov), R(1), R(4), B(Mov), R(1), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(3), U8(2), B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(3), U8(2),
...@@ -437,7 +437,7 @@ bytecodes: [ ...@@ -437,7 +437,7 @@ bytecodes: [
/* 49 S> */ B(Ldar), R(1), /* 49 S> */ B(Ldar), R(1),
B(Inc), U8(1), B(Inc), U8(1),
B(Star1), B(Star1),
/* 23 E> */ B(JumpLoop), U8(45), I8(0), /* 23 E> */ B(JumpLoop), U8(45), I8(0), U8(2),
B(LdaUndefined), B(LdaUndefined),
B(Star4), B(Star4),
B(Mov), R(0), R(3), B(Mov), R(0), R(3),
...@@ -461,6 +461,6 @@ constant pool: [ ...@@ -461,6 +461,6 @@ constant pool: [
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
] ]
handlers: [ handlers: [
[18, 78, 78], [18, 79, 79],
] ]
...@@ -93,7 +93,7 @@ snippet: " ...@@ -93,7 +93,7 @@ snippet: "
" "
frame size: 11 frame size: 11
parameter count: 1 parameter count: 1
bytecode array length: 103 bytecode array length: 104
bytecodes: [ bytecodes: [
/* 128 E> */ B(CreateRestParameter), /* 128 E> */ B(CreateRestParameter),
B(Star3), B(Star3),
...@@ -117,13 +117,13 @@ bytecodes: [ ...@@ -117,13 +117,13 @@ bytecodes: [
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(2), U8(16), B(GetNamedProperty), R(10), U8(2), U8(16),
B(JumpIfToBooleanTrue), U8(18), B(JumpIfToBooleanTrue), U8(19),
B(GetNamedProperty), R(10), U8(3), U8(7), B(GetNamedProperty), R(10), U8(3), U8(7),
B(StaInArrayLiteral), R(7), R(6), U8(12), B(StaInArrayLiteral), R(7), R(6), U8(12),
B(Ldar), R(6), B(Ldar), R(6),
B(Inc), U8(11), B(Inc), U8(11),
B(Star6), B(Star6),
B(JumpLoop), U8(31), I8(0), B(JumpLoop), U8(31), I8(0), U8(18),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(StaInArrayLiteral), R(7), R(6), U8(12), B(StaInArrayLiteral), R(7), R(6), U8(12),
B(ThrowIfNotSuperConstructor), R(5), B(ThrowIfNotSuperConstructor), R(5),
......
...@@ -15,17 +15,17 @@ snippet: " ...@@ -15,17 +15,17 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 21 bytecode array length: 22
bytecodes: [ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star0), B(Star0),
/* 54 S> */ B(LdaSmi), I8(10), /* 54 S> */ B(LdaSmi), I8(10),
/* 54 E> */ B(TestEqual), R(0), U8(0), /* 54 E> */ B(TestEqual), R(0), U8(0),
B(JumpIfTrue), U8(11), B(JumpIfTrue), U8(12),
/* 65 S> */ B(Ldar), R(0), /* 65 S> */ B(Ldar), R(0),
/* 71 E> */ B(AddSmi), I8(10), U8(1), /* 71 E> */ B(AddSmi), I8(10), U8(1),
B(Star0), B(Star0),
/* 45 E> */ B(JumpLoop), U8(13), I8(0), /* 45 E> */ B(JumpLoop), U8(13), I8(0), U8(2),
/* 79 S> */ B(Ldar), R(0), /* 79 S> */ B(Ldar), R(0),
/* 88 S> */ B(Return), /* 88 S> */ B(Return),
] ]
...@@ -44,7 +44,7 @@ snippet: " ...@@ -44,7 +44,7 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 18 bytecode array length: 19
bytecodes: [ bytecodes: [
/* 42 S> */ B(LdaFalse), /* 42 S> */ B(LdaFalse),
B(Star0), B(Star0),
...@@ -53,8 +53,8 @@ bytecodes: [ ...@@ -53,8 +53,8 @@ bytecodes: [
B(Star0), B(Star0),
/* 74 S> */ B(LdaFalse), /* 74 S> */ B(LdaFalse),
/* 74 E> */ B(TestEqual), R(0), U8(0), /* 74 E> */ B(TestEqual), R(0), U8(0),
B(JumpIfFalse), U8(5), B(JumpIfFalse), U8(6),
/* 49 E> */ B(JumpLoop), U8(10), I8(0), /* 49 E> */ B(JumpLoop), U8(10), I8(0), U8(1),
/* 85 S> */ B(Ldar), R(0), /* 85 S> */ B(Ldar), R(0),
/* 94 S> */ B(Return), /* 94 S> */ B(Return),
] ]
......
...@@ -2143,7 +2143,7 @@ snippet: " ...@@ -2143,7 +2143,7 @@ snippet: "
" "
frame size: 158 frame size: 158
parameter count: 1 parameter count: 1
bytecode array length: 574 bytecode array length: 575
bytecodes: [ bytecodes: [
/* 43 S> */ B(LdaZero), /* 43 S> */ B(LdaZero),
B(Star0), B(Star0),
...@@ -2467,7 +2467,7 @@ bytecodes: [ ...@@ -2467,7 +2467,7 @@ bytecodes: [
B(Wide), B(Star), R16(128), B(Wide), B(Star), R16(128),
/* 2166 S> */ B(LdaSmi), I8(64), /* 2166 S> */ B(LdaSmi), I8(64),
/* 2166 E> */ B(Wide), B(TestLessThan), R16(128), U16(0), /* 2166 E> */ B(Wide), B(TestLessThan), R16(128), U16(0),
B(JumpIfFalse), U8(29), B(JumpIfFalse), U8(30),
/* 2183 S> */ B(Wide), B(Ldar), R16(128), /* 2183 S> */ B(Wide), B(Ldar), R16(128),
/* 2189 E> */ B(Add), R(1), U8(1), /* 2189 E> */ B(Add), R(1), U8(1),
B(Wide), B(Mov), R16(1), R16(157), B(Wide), B(Mov), R16(1), R16(157),
...@@ -2475,7 +2475,7 @@ bytecodes: [ ...@@ -2475,7 +2475,7 @@ bytecodes: [
/* 2176 S> */ B(Wide), B(Ldar), R16(128), /* 2176 S> */ B(Wide), B(Ldar), R16(128),
B(Inc), U8(2), B(Inc), U8(2),
B(Wide), B(Star), R16(128), B(Wide), B(Star), R16(128),
/* 2146 E> */ B(JumpLoop), U8(34), I8(0), /* 2146 E> */ B(JumpLoop), U8(34), I8(0), U8(3),
/* 2195 S> */ B(Wide), B(Ldar), R16(128), /* 2195 S> */ B(Wide), B(Ldar), R16(128),
/* 2207 S> */ B(Return), /* 2207 S> */ B(Return),
] ]
...@@ -2649,7 +2649,7 @@ snippet: " ...@@ -2649,7 +2649,7 @@ snippet: "
" "
frame size: 163 frame size: 163
parameter count: 1 parameter count: 1
bytecode array length: 605 bytecode array length: 606
bytecodes: [ bytecodes: [
/* 43 S> */ B(LdaZero), /* 43 S> */ B(LdaZero),
B(Star0), B(Star0),
...@@ -2970,14 +2970,14 @@ bytecodes: [ ...@@ -2970,14 +2970,14 @@ bytecodes: [
/* 2146 S> */ B(LdaZero), /* 2146 S> */ B(LdaZero),
B(Star1), B(Star1),
/* 2162 S> */ B(Ldar), R(0), /* 2162 S> */ B(Ldar), R(0),
B(JumpIfUndefinedOrNull), U8(70), B(JumpIfUndefinedOrNull), U8(71),
B(Wide), B(ToObject), R16(157), B(Wide), B(ToObject), R16(157),
B(Wide), B(ForInEnumerate), R16(157), B(Wide), B(ForInEnumerate), R16(157),
B(Wide), B(ForInPrepare), R16(158), U16(0), B(Wide), B(ForInPrepare), R16(158), U16(0),
B(LdaZero), B(LdaZero),
B(Wide), B(Star), R16(161), B(Wide), B(Star), R16(161),
/* 2154 S> */ B(Wide), B(ForInContinue), R16(161), R16(160), /* 2154 S> */ B(Wide), B(ForInContinue), R16(161), R16(160),
B(JumpIfFalse), U8(43), B(JumpIfFalse), U8(44),
B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(0), B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(0),
B(JumpIfUndefined), U8(20), B(JumpIfUndefined), U8(20),
B(Wide), B(Star), R16(128), B(Wide), B(Star), R16(128),
...@@ -2987,7 +2987,7 @@ bytecodes: [ ...@@ -2987,7 +2987,7 @@ bytecodes: [
B(Star1), B(Star1),
/* 2172 E> */ B(Wide), B(ForInStep), R16(161), /* 2172 E> */ B(Wide), B(ForInStep), R16(161),
B(Wide), B(Star), R16(161), B(Wide), B(Star), R16(161),
/* 2149 E> */ B(JumpLoop), U8(46), I8(0), /* 2149 E> */ B(JumpLoop), U8(46), I8(0), U8(2),
/* 2181 S> */ B(Ldar), R(1), /* 2181 S> */ B(Ldar), R(1),
/* 2191 S> */ B(Return), /* 2191 S> */ B(Return),
] ]
......
...@@ -1550,6 +1550,7 @@ TEST(InterpreterJumps) { ...@@ -1550,6 +1550,7 @@ TEST(InterpreterJumps) {
FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot(); FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot(); FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
FeedbackSlot slot2 = feedback_spec.AddJumpLoopSlot();
Handle<i::FeedbackMetadata> metadata = Handle<i::FeedbackMetadata> metadata =
NewFeedbackMetadata(isolate, &feedback_spec); NewFeedbackMetadata(isolate, &feedback_spec);
...@@ -1563,7 +1564,8 @@ TEST(InterpreterJumps) { ...@@ -1563,7 +1564,8 @@ TEST(InterpreterJumps) {
.Jump(&label[0]); .Jump(&label[0]);
SetRegister(&builder, reg, 1024, scratch).Bind(&label[0]).Bind(&loop_header); SetRegister(&builder, reg, 1024, scratch).Bind(&label[0]).Bind(&loop_header);
IncrementRegister(&builder, reg, 1, scratch, GetIndex(slot)).Jump(&label[1]); IncrementRegister(&builder, reg, 1, scratch, GetIndex(slot)).Jump(&label[1]);
SetRegister(&builder, reg, 2048, scratch).JumpLoop(&loop_header, 0, 0); SetRegister(&builder, reg, 2048, scratch)
.JumpLoop(&loop_header, 0, 0, slot2.ToInt());
SetRegister(&builder, reg, 4096, scratch).Bind(&label[1]); SetRegister(&builder, reg, 4096, scratch).Bind(&label[1]);
IncrementRegister(&builder, reg, 2, scratch, GetIndex(slot1)) IncrementRegister(&builder, reg, 2, scratch, GetIndex(slot1))
.LoadAccumulatorWithRegister(reg) .LoadAccumulatorWithRegister(reg)
......
...@@ -211,6 +211,7 @@ TEST_F(BytecodeAnalysisTest, DiamondLookupsAndBinds) { ...@@ -211,6 +211,7 @@ TEST_F(BytecodeAnalysisTest, DiamondLookupsAndBinds) {
TEST_F(BytecodeAnalysisTest, SimpleLoop) { TEST_F(BytecodeAnalysisTest, SimpleLoop) {
interpreter::BytecodeArrayBuilder builder(zone(), 3, 3); interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
FeedbackVectorSpec spec(zone());
std::vector<std::pair<std::string, std::string>> expected_liveness; std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0); interpreter::Register reg_0(0);
...@@ -221,7 +222,7 @@ TEST_F(BytecodeAnalysisTest, SimpleLoop) { ...@@ -221,7 +222,7 @@ TEST_F(BytecodeAnalysisTest, SimpleLoop) {
expected_liveness.emplace_back("..LL", "L.L."); expected_liveness.emplace_back("..LL", "L.L.");
{ {
interpreter::LoopBuilder loop_builder(&builder, nullptr, nullptr); interpreter::LoopBuilder loop_builder(&builder, nullptr, nullptr, &spec);
loop_builder.LoopHeader(); loop_builder.LoopHeader();
builder.LoadUndefined(); builder.LoadUndefined();
...@@ -311,12 +312,13 @@ TEST_F(BytecodeAnalysisTest, DiamondInLoop) { ...@@ -311,12 +312,13 @@ TEST_F(BytecodeAnalysisTest, DiamondInLoop) {
// reprocessed. // reprocessed.
interpreter::BytecodeArrayBuilder builder(zone(), 3, 3); interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
FeedbackVectorSpec spec(zone());
std::vector<std::pair<std::string, std::string>> expected_liveness; std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0); interpreter::Register reg_0(0);
{ {
interpreter::LoopBuilder loop_builder(&builder, nullptr, nullptr); interpreter::LoopBuilder loop_builder(&builder, nullptr, nullptr, &spec);
loop_builder.LoopHeader(); loop_builder.LoopHeader();
builder.LoadUndefined(); builder.LoadUndefined();
...@@ -381,13 +383,14 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) { ...@@ -381,13 +383,14 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
// r1 becomes live in 3 (via 5), but r0 stays dead (because of 4). // r1 becomes live in 3 (via 5), but r0 stays dead (because of 4).
interpreter::BytecodeArrayBuilder builder(zone(), 3, 3); interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
FeedbackVectorSpec spec(zone());
std::vector<std::pair<std::string, std::string>> expected_liveness; std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0); interpreter::Register reg_0(0);
interpreter::Register reg_1(1); interpreter::Register reg_1(1);
{ {
interpreter::LoopBuilder loop_builder(&builder, nullptr, nullptr); interpreter::LoopBuilder loop_builder(&builder, nullptr, nullptr, &spec);
loop_builder.LoopHeader(); loop_builder.LoopHeader();
// Gen r0. // Gen r0.
...@@ -403,7 +406,8 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) { ...@@ -403,7 +406,8 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
expected_liveness.emplace_back(".L.L", ".L.."); expected_liveness.emplace_back(".L.L", ".L..");
{ {
interpreter::LoopBuilder inner_loop_builder(&builder, nullptr, nullptr); interpreter::LoopBuilder inner_loop_builder(&builder, nullptr, nullptr,
&spec);
inner_loop_builder.LoopHeader(); inner_loop_builder.LoopHeader();
// Kill r0. // Kill r0.
......
...@@ -316,7 +316,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -316,7 +316,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.Bind(&after_jump10) .Bind(&after_jump10)
.JumpIfFalse(ToBooleanMode::kAlreadyBoolean, &after_jump11) .JumpIfFalse(ToBooleanMode::kAlreadyBoolean, &after_jump11)
.Bind(&after_jump11) .Bind(&after_jump11)
.JumpLoop(&loop_header, 0, 0) .JumpLoop(&loop_header, 0, 0, 0)
.Bind(&after_loop); .Bind(&after_loop);
} }
...@@ -712,13 +712,13 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) { ...@@ -712,13 +712,13 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
BytecodeLoopHeader loop_header; BytecodeLoopHeader loop_header;
builder.JumpIfNull(&after_loop) builder.JumpIfNull(&after_loop)
.Bind(&loop_header) .Bind(&loop_header)
.JumpLoop(&loop_header, 0, 0) .JumpLoop(&loop_header, 0, 0, 0)
.Bind(&after_loop); .Bind(&after_loop);
for (int i = 0; i < 42; i++) { for (int i = 0; i < 42; i++) {
BytecodeLabel also_after_loop; BytecodeLabel also_after_loop;
// Conditional jump to force the code after the JumpLoop to be live. // Conditional jump to force the code after the JumpLoop to be live.
builder.JumpIfNull(&also_after_loop) builder.JumpIfNull(&also_after_loop)
.JumpLoop(&loop_header, 0, 0) .JumpLoop(&loop_header, 0, 0, 0)
.Bind(&also_after_loop); .Bind(&also_after_loop);
} }
...@@ -727,7 +727,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) { ...@@ -727,7 +727,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
builder.Debugger(); builder.Debugger();
} }
builder.JumpLoop(&loop_header, 0, 0); builder.JumpLoop(&loop_header, 0, 0, 0);
builder.Bind(&end); builder.Bind(&end);
builder.Return(); builder.Return();
...@@ -746,9 +746,10 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) { ...@@ -746,9 +746,10 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJumpLoop); CHECK_EQ(iterator.current_bytecode(), Bytecode::kJumpLoop);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
// offset of 5 (because kJumpLoop takes two immediate operands and // offset of 6 (because kJumpLoop takes three immediate operands and
// JumpIfNull takes 1) // JumpIfNull takes 1)
CHECK_EQ(iterator.GetUnsignedImmediateOperand(0), i * 5 + 5); CHECK_EQ(Bytecodes::NumberOfOperands(Bytecode::kJumpLoop), 3);
CHECK_EQ(iterator.GetUnsignedImmediateOperand(0), i * 6 + 6);
iterator.Advance(); iterator.Advance();
} }
// Check padding to force wide backwards jumps. // Check padding to force wide backwards jumps.
...@@ -758,7 +759,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) { ...@@ -758,7 +759,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
} }
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJumpLoop); CHECK_EQ(iterator.current_bytecode(), Bytecode::kJumpLoop);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kDouble); CHECK_EQ(iterator.current_operand_scale(), OperandScale::kDouble);
CHECK_EQ(iterator.GetUnsignedImmediateOperand(0), 42 * 5 + 256 + 4); CHECK_EQ(iterator.GetUnsignedImmediateOperand(0), 42 * 6 + 1 + 256 + 4);
iterator.Advance(); iterator.Advance();
CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
iterator.Advance(); iterator.Advance();
......
...@@ -50,7 +50,8 @@ class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone { ...@@ -50,7 +50,8 @@ class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone {
void WriteJump(Bytecode bytecode, BytecodeLabel* label, void WriteJump(Bytecode bytecode, BytecodeLabel* label,
BytecodeSourceInfo info = BytecodeSourceInfo()); BytecodeSourceInfo info = BytecodeSourceInfo());
void WriteJumpLoop(Bytecode bytecode, BytecodeLoopHeader* loop_header, void WriteJumpLoop(Bytecode bytecode, BytecodeLoopHeader* loop_header,
int depth, BytecodeSourceInfo info = BytecodeSourceInfo()); int depth, int feedback_index,
BytecodeSourceInfo info = BytecodeSourceInfo());
BytecodeArrayWriter* writer() { return &bytecode_array_writer_; } BytecodeArrayWriter* writer() { return &bytecode_array_writer_; }
ZoneVector<unsigned char>* bytecodes() { return writer()->bytecodes(); } ZoneVector<unsigned char>* bytecodes() { return writer()->bytecodes(); }
...@@ -106,9 +107,9 @@ void BytecodeArrayWriterUnittest::WriteJump(Bytecode bytecode, ...@@ -106,9 +107,9 @@ void BytecodeArrayWriterUnittest::WriteJump(Bytecode bytecode,
void BytecodeArrayWriterUnittest::WriteJumpLoop(Bytecode bytecode, void BytecodeArrayWriterUnittest::WriteJumpLoop(Bytecode bytecode,
BytecodeLoopHeader* loop_header, BytecodeLoopHeader* loop_header,
int depth, int depth, int feedback_index,
BytecodeSourceInfo info) { BytecodeSourceInfo info) {
BytecodeNode node(bytecode, 0, depth, info); BytecodeNode node(bytecode, 0, depth, feedback_index, info);
writer()->WriteJumpLoop(&node, loop_header); writer()->WriteJumpLoop(&node, loop_header);
} }
...@@ -165,14 +166,14 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) { ...@@ -165,14 +166,14 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
// clang-format off // clang-format off
/* 0 42 S> */ B(LdaConstant), U8(0), /* 0 42 S> */ B(LdaConstant), U8(0),
/* 2 42 E> */ B(Add), R8(1), U8(1), /* 2 42 E> */ B(Add), R8(1), U8(1),
/* 4 68 S> */ B(JumpIfUndefined), U8(38), /* 4 68 S> */ B(JumpIfUndefined), U8(39),
/* 6 */ B(JumpIfNull), U8(36), /* 6 */ B(JumpIfNull), U8(37),
/* 8 */ B(ToObject), R8(3), /* 8 */ B(ToObject), R8(3),
/* 10 */ B(ForInPrepare), R8(3), U8(4), /* 10 */ B(ForInPrepare), R8(3), U8(4),
/* 13 */ B(LdaZero), /* 13 */ B(LdaZero),
/* 14 */ B(Star), R8(7), /* 14 */ B(Star), R8(7),
/* 16 63 S> */ B(ForInContinue), R8(7), R8(6), /* 16 63 S> */ B(ForInContinue), R8(7), R8(6),
/* 19 */ B(JumpIfFalse), U8(23), /* 19 */ B(JumpIfFalse), U8(24),
/* 21 */ B(ForInNext), R8(3), R8(7), R8(4), U8(1), /* 21 */ B(ForInNext), R8(3), R8(7), R8(4), U8(1),
/* 26 */ B(JumpIfUndefined), U8(9), /* 26 */ B(JumpIfUndefined), U8(9),
/* 28 */ B(Star), R8(0), /* 28 */ B(Star), R8(0),
...@@ -181,15 +182,15 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) { ...@@ -181,15 +182,15 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
/* 34 85 S> */ B(Return), /* 34 85 S> */ B(Return),
/* 35 */ B(ForInStep), R8(7), /* 35 */ B(ForInStep), R8(7),
/* 37 */ B(Star), R8(7), /* 37 */ B(Star), R8(7),
/* 39 */ B(JumpLoop), U8(23), U8(0), /* 39 */ B(JumpLoop), U8(23), U8(0), U8(0),
/* 42 */ B(LdaUndefined), /* 43 */ B(LdaUndefined),
/* 43 85 S> */ B(Return), /* 44 85 S> */ B(Return),
// clang-format on // clang-format on
}; };
static const PositionTableEntry expected_positions[] = { static const PositionTableEntry expected_positions[] = {
{0, 42, true}, {2, 42, false}, {5, 68, true}, {0, 42, true}, {2, 42, false}, {5, 68, true},
{17, 63, true}, {35, 85, true}, {44, 85, true}}; {17, 63, true}, {35, 85, true}, {45, 85, true}};
BytecodeLoopHeader loop_header; BytecodeLoopHeader loop_header;
BytecodeLabel jump_for_in, jump_end_1, jump_end_2, jump_end_3; BytecodeLabel jump_for_in, jump_end_1, jump_end_2, jump_end_3;
...@@ -214,7 +215,7 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) { ...@@ -214,7 +215,7 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
writer()->BindLabel(&jump_for_in); writer()->BindLabel(&jump_for_in);
Write(Bytecode::kForInStep, R(7)); Write(Bytecode::kForInStep, R(7));
Write(Bytecode::kStar, R(7)); Write(Bytecode::kStar, R(7));
WriteJumpLoop(Bytecode::kJumpLoop, &loop_header, 0); WriteJumpLoop(Bytecode::kJumpLoop, &loop_header, 0, 0);
writer()->BindLabel(&jump_end_1); writer()->BindLabel(&jump_end_1);
writer()->BindLabel(&jump_end_2); writer()->BindLabel(&jump_end_2);
writer()->BindLabel(&jump_end_3); writer()->BindLabel(&jump_end_3);
......
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