Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 680c65e5145857ebcbc434f413a579a1509d750f..b9280ba361d1e05b63b3cbc6ffdfbc048a7acc25 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -485,7 +485,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_) __ jmp(false_label_); |
} else if (lit->IsTrue() || lit->IsJSObject()) { |
@@ -4227,8 +4227,8 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
__ cmp(eax, isolate()->factory()->false_value()); |
Split(equal, if_true, if_false, fall_through); |
} else if (String::Equals(check, factory->undefined_string())) { |
- __ cmp(eax, isolate()->factory()->undefined_value()); |
- __ j(equal, if_true); |
+ __ cmp(eax, isolate()->factory()->null_value()); |
+ __ j(equal, if_false); |
__ JumpIfSmi(eax, if_false); |
// Check for undetectable objects => true. |
__ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); |