Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index cdfc0a9acf5cf3813bc42e9225defd0fce7c6b3e..3742d166ca3c23d73e5aad033406e454c2a0bca4 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -4030,6 +4030,10 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
__ b(eq, if_true); |
__ CompareRoot(r0, Heap::kFalseValueRootIndex); |
Split(eq, if_true, if_false, fall_through); |
+ } else if (FLAG_harmony_typeof && |
+ check->Equals(isolate()->heap()->null_symbol())) { |
+ __ CompareRoot(r0, Heap::kNullValueRootIndex); |
+ Split(eq, if_true, if_false, fall_through); |
} else if (check->Equals(isolate()->heap()->undefined_symbol())) { |
__ CompareRoot(r0, Heap::kUndefinedValueRootIndex); |
__ b(eq, if_true); |
@@ -4047,8 +4051,10 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
} else if (check->Equals(isolate()->heap()->object_symbol())) { |
__ JumpIfSmi(r0, if_false); |
- __ CompareRoot(r0, Heap::kNullValueRootIndex); |
- __ b(eq, if_true); |
+ if (!FLAG_harmony_typeof) { |
+ __ CompareRoot(r0, Heap::kNullValueRootIndex); |
+ __ b(eq, if_true); |
+ } |
// Check for JS objects => true. |
__ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); |
__ b(lt, if_false); |