Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 002b7108f6a4f3a58cb98e032acc7eba5135bbbe..2f7c7f89984af10948e559885a8c40d21c9b2b79 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -5472,7 +5472,13 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
__ CompareRoot(input, Heap::kNullValueRootIndex); |
__ j(equal, true_label); |
} |
- __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); |
+ if (FLAG_harmony_symbols) { |
+ __ CmpObjectType(input, SYMBOL_TYPE, input); |
+ __ j(equal, true_label); |
+ __ CmpInstanceType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); |
+ } else { |
+ __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); |
+ } |
__ j(below, false_label); |
__ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
__ j(above, false_label); |