Index: test/unittests/interpreter/bytecode-array-builder-unittest.cc |
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
index be834e419776fd6f067edc396b1b2b0416927032..14fd54e9bb322a41c2ae18f979b671243918cf34 100644 |
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc |
@@ -252,6 +252,21 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { |
.CreateArrayLiteral(factory->NewFixedArray(2), 0, 0) |
.CreateObjectLiteral(factory->NewFixedArray(2), 0, 0); |
+ // Longer jumps requiring ConstantWide operand |
+ builder.Jump(&start).JumpIfNull(&start).JumpIfUndefined(&start); |
+ // Perform an operation that returns boolean value to |
+ // generate JumpIfTrue/False |
+ builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) |
+ .JumpIfTrue(&start) |
+ .CompareOperation(Token::Value::EQ, reg, Strength::WEAK) |
+ .JumpIfFalse(&start); |
+ // Perform an operation that returns a non-boolean operation to |
+ // generate JumpIfToBooleanTrue/False. |
+ builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
+ .JumpIfTrue(&start) |
+ .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
+ .JumpIfFalse(&start); |
+ |
builder.Return(); |
// Generate BytecodeArray. |
@@ -685,6 +700,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelAddressReuse) { |
CHECK(iterator.done()); |
} |
+ |
} // namespace interpreter |
} // namespace internal |
} // namespace v8 |