Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index 90e654addb55f94d4aa723a7ab5a21a874db89b1..9e8e2b53dbdd22447f3997554248d62e7b9ee079 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -1943,23 +1943,20 @@ void BytecodeGraphBuilder::VisitTestInstanceOf() { |
} |
void BytecodeGraphBuilder::VisitTestUndetectable() { |
- Node* object = |
- environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
+ Node* object = environment()->LookupAccumulator(); |
Node* node = NewNode(jsgraph()->simplified()->ObjectIsUndetectable(), object); |
environment()->BindAccumulator(node); |
} |
void BytecodeGraphBuilder::VisitTestNull() { |
- Node* object = |
- environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
+ Node* object = environment()->LookupAccumulator(); |
Node* result = NewNode(simplified()->ReferenceEqual(), object, |
jsgraph()->NullConstant()); |
environment()->BindAccumulator(result); |
} |
void BytecodeGraphBuilder::VisitTestUndefined() { |
- Node* object = |
- environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
+ Node* object = environment()->LookupAccumulator(); |
Node* result = NewNode(simplified()->ReferenceEqual(), object, |
jsgraph()->UndefinedConstant()); |
environment()->BindAccumulator(result); |
@@ -2082,6 +2079,14 @@ void BytecodeGraphBuilder::VisitJumpIfNullConstant() { |
BuildJumpIfEqual(jsgraph()->NullConstant()); |
} |
+void BytecodeGraphBuilder::VisitJumpIfNotNull() { |
+ BuildJumpIfNotEqual(jsgraph()->NullConstant()); |
+} |
+ |
+void BytecodeGraphBuilder::VisitJumpIfNotNullConstant() { |
+ BuildJumpIfNotEqual(jsgraph()->NullConstant()); |
+} |
+ |
void BytecodeGraphBuilder::VisitJumpIfUndefined() { |
BuildJumpIfEqual(jsgraph()->UndefinedConstant()); |
} |
@@ -2090,6 +2095,14 @@ void BytecodeGraphBuilder::VisitJumpIfUndefinedConstant() { |
BuildJumpIfEqual(jsgraph()->UndefinedConstant()); |
} |
+void BytecodeGraphBuilder::VisitJumpIfNotUndefined() { |
+ BuildJumpIfNotEqual(jsgraph()->UndefinedConstant()); |
+} |
+ |
+void BytecodeGraphBuilder::VisitJumpIfNotUndefinedConstant() { |
+ BuildJumpIfNotEqual(jsgraph()->UndefinedConstant()); |
+} |
+ |
void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } |
void BytecodeGraphBuilder::VisitStackCheck() { |
@@ -2365,6 +2378,13 @@ void BytecodeGraphBuilder::BuildJumpIfEqual(Node* comperand) { |
BuildJumpIf(condition); |
} |
+void BytecodeGraphBuilder::BuildJumpIfNotEqual(Node* comperand) { |
+ Node* accumulator = environment()->LookupAccumulator(); |
+ Node* condition = |
+ NewNode(simplified()->ReferenceEqual(), accumulator, comperand); |
+ BuildJumpIfNot(condition); |
+} |
+ |
void BytecodeGraphBuilder::BuildJumpIfFalse() { |
NewBranch(environment()->LookupAccumulator()); |
Environment* if_true_environment = environment()->Copy(); |