Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index c49c2ae1525f0ea30167f20e35a6b7266b8db16b..3d59a8a2e1cd84591de4687bdb3b6a879c8dd0f7 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1606,8 +1606,7 @@ void Interpreter::DoJumpIfNullConstantWide( |
DoJumpIfNullConstant(assembler); |
} |
- |
-// jumpifundefined <imm8> |
+// JumpIfUndefined <imm8> |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is the undefined constant. |
@@ -1645,6 +1644,27 @@ void Interpreter::DoJumpIfUndefinedConstantWide( |
DoJumpIfUndefinedConstant(assembler); |
} |
+// JumpIfHole <imm8> |
+// |
+// Jump by number of bytes represented by an immediate operand if the object |
+// referenced by the accumulator is the hole. |
+void Interpreter::DoJumpIfHole(compiler::InterpreterAssembler* assembler) { |
+ Node* accumulator = __ GetAccumulator(); |
+ Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
+ Node* relative_jump = __ BytecodeOperandImm(0); |
+ __ JumpIfWordEqual(accumulator, the_hole_value, relative_jump); |
+} |
+ |
+// JumpIfNotHole <imm8> |
+// |
+// Jump by number of bytes represented by an immediate operand if the object |
+// referenced by the accumulator is not the hole. |
+void Interpreter::DoJumpIfNotHole(compiler::InterpreterAssembler* assembler) { |
+ Node* accumulator = __ GetAccumulator(); |
+ Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
+ Node* relative_jump = __ BytecodeOperandImm(0); |
+ __ JumpIfWordNotEqual(accumulator, the_hole_value, relative_jump); |
+} |
void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id, |
compiler::InterpreterAssembler* assembler) { |