Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index d9bbbc08b3e83b3f00bcab762b94be3bf84193bb..5ca37f7e678c2a11bb5326f188c58ea5d3265161 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -537,7 +537,7 @@ void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
true, |
true_label_, |
false_label_); |
- DCHECK(!lit->IsUndetectableObject()); // There are no undetectable literals. |
+ DCHECK(lit->IsNull() || lit->IsUndefined() || !lit->IsUndetectableObject()); |
if (lit->IsUndefined() || lit->IsNull() || lit->IsFalse()) { |
if (false_label_ != fall_through_) __ b(false_label_); |
} else if (lit->IsTrue() || lit->IsJSObject()) { |
@@ -4299,8 +4299,8 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
__ CompareRoot(r0, Heap::kFalseValueRootIndex); |
Split(eq, if_true, if_false, fall_through); |
} else if (String::Equals(check, factory->undefined_string())) { |
- __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); |
- __ b(eq, if_true); |
+ __ CompareRoot(r0, Heap::kNullValueRootIndex); |
+ __ b(eq, if_false); |
__ JumpIfSmi(r0, if_false); |
// Check for undetectable objects => true. |
__ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |