Index: src/x64/full-codegen-x64.cc |
=================================================================== |
--- src/x64/full-codegen-x64.cc (revision 8931) |
+++ src/x64/full-codegen-x64.cc (working copy) |
@@ -3971,6 +3971,10 @@ |
__ j(equal, if_true); |
__ CompareRoot(rax, Heap::kFalseValueRootIndex); |
Split(equal, if_true, if_false, fall_through); |
+ } else if (FLAG_harmony_typeof && |
+ check->Equals(isolate()->heap()->null_symbol())) { |
+ __ CompareRoot(rax, Heap::kNullValueRootIndex); |
+ Split(equal, if_true, if_false, fall_through); |
} else if (check->Equals(isolate()->heap()->undefined_symbol())) { |
__ CompareRoot(rax, Heap::kUndefinedValueRootIndex); |
__ j(equal, if_true); |
@@ -3987,8 +3991,10 @@ |
Split(above_equal, if_true, if_false, fall_through); |
} else if (check->Equals(isolate()->heap()->object_symbol())) { |
__ JumpIfSmi(rax, if_false); |
- __ CompareRoot(rax, Heap::kNullValueRootIndex); |
- __ j(equal, if_true); |
+ if (!FLAG_harmony_typeof) { |
+ __ CompareRoot(rax, Heap::kNullValueRootIndex); |
+ __ j(equal, if_true); |
+ } |
__ CmpObjectType(rax, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, rdx); |
__ j(below, if_false); |
__ CmpInstanceType(rdx, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |