Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 194652562216c6bee905e3adce078794cfd591c8..9fe194aa38ecbbe9983d2086e36bb8d0ebf40623 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -5784,10 +5784,20 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
__ LoadRoot(at, Heap::kNullValueRootIndex); |
__ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); |
} |
- // input is an object, it is safe to use GetObjectType in the delay slot. |
- __ GetObjectType(input, input, scratch); |
- __ Branch(USE_DELAY_SLOT, false_label, |
- lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
+ if (FLAG_harmony_symbols) { |
+ // input is an object, it is safe to use GetObjectType in the delay slot. |
+ __ GetObjectType(input, input, scratch); |
+ __ Branch(USE_DELAY_SLOT, true_label, eq, scratch, Operand(SYMBOL_TYPE)); |
+ // Still an object, so the InstanceType can be loaded. |
+ __ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset)); |
+ __ Branch(USE_DELAY_SLOT, false_label, |
+ lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
+ } else { |
+ // input is an object, it is safe to use GetObjectType in the delay slot. |
+ __ GetObjectType(input, input, scratch); |
+ __ Branch(USE_DELAY_SLOT, false_label, |
+ lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
+ } |
// Still an object, so the InstanceType can be loaded. |
__ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset)); |
__ Branch(USE_DELAY_SLOT, false_label, |