Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index 12a5d29d21770df1c39b691df66c3654c3f27946..ed11f1090bcc2eec8499ca5eb7159b312dd88765 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -1665,6 +1665,22 @@ void BytecodeGraphBuilder::VisitTestUndetectable() { |
environment()->BindAccumulator(node); |
} |
+void BytecodeGraphBuilder::VisitTestNull() { |
+ Node* object = |
+ environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
+ Node* result = NewNode(javascript()->StrictEqual(CompareOperationHint::kAny), |
+ object, jsgraph()->NullConstant()); |
+ environment()->BindAccumulator(result); |
+} |
+ |
+void BytecodeGraphBuilder::VisitTestUndefined() { |
+ Node* object = |
+ environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
+ Node* result = NewNode(javascript()->StrictEqual(CompareOperationHint::kAny), |
+ object, jsgraph()->UndefinedConstant()); |
+ environment()->BindAccumulator(result); |
+} |
+ |
void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { |
PrepareEagerCheckpoint(); |
Node* value = NewNode(js_op, environment()->LookupAccumulator()); |