Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 319eb01457a080cc44c02bb92b67f9da3c6abc17..811dcc9ce8ee551104c7a0f461506495509f00e3 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -5903,7 +5903,13 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
__ cmp(input, factory()->null_value()); |
__ 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); |