Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index f337a57c66209d75696e37dacc1796db8c4abaa2..042e0cbc730908b3205b89c508615799bdbe6f17 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -1513,6 +1513,20 @@ void BytecodeGraphBuilder::VisitStackCheck() { |
environment()->RecordAfterState(node, &states); |
} |
+void BytecodeGraphBuilder::VisitJumpIfHole() { |
+ BuildJumpIfEqual(jsgraph()->TheHoleConstant()); |
+} |
+ |
+void BytecodeGraphBuilder::VisitJumpIfNotHole() { |
+ Node* accumulator = environment()->LookupAccumulator(); |
+ Node* condition = NewNode(javascript()->StrictEqual(), accumulator, |
Michael Starzinger
2016/02/08 11:54:08
Can we use javascript()->StrictNotEqual() here? Or
mythria
2016/02/08 13:22:33
StrictNotEqual causes an assert fail here: https:/
Michael Starzinger
2016/02/08 13:57:45
Acknowledged. Ah, yeah, I have seen this before. I
|
+ jsgraph()->TheHoleConstant()); |
+ Node* node = |
+ NewNode(common()->Select(MachineRepresentation::kTagged), condition, |
+ jsgraph()->FalseConstant(), jsgraph()->TrueConstant()); |
+ BuildConditionalJump(node); |
+} |
+ |
void BytecodeGraphBuilder::VisitReturn() { |
Node* control = |
NewNode(common()->Return(), environment()->LookupAccumulator()); |