Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 7c3f28f1615c98edf721ccdbe82d6b15f8b2f41a..14d4f144bf0bea73f7f75e94596141f62445ca88 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -5524,7 +5524,8 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
// register. |
Condition final_branch_condition = kNoCondition; |
Register scratch = scratch0(); |
- if (type_name->Equals(heap()->number_string())) { |
+ Factory* factory = isolate()->factory();facto |
+ if (String::Equals(type_name, factory->number_string())) { |
__ JumpIfSmi(input, true_label); |
__ lw(input, FieldMemOperand(input, HeapObject::kMapOffset)); |
__ LoadRoot(at, Heap::kHeapNumberMapRootIndex); |
@@ -5532,7 +5533,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
cmp2 = Operand(at); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->string_string())) { |
+ } else if (String::Equals(type_name, factory->string_string())) { |
__ JumpIfSmi(input, false_label); |
__ GetObjectType(input, input, scratch); |
__ Branch(USE_DELAY_SLOT, false_label, |
@@ -5545,14 +5546,14 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
cmp2 = Operand(zero_reg); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->symbol_string())) { |
+ } else if (String::Equals(type_name, factory->symbol_string())) { |
__ JumpIfSmi(input, false_label); |
__ GetObjectType(input, input, scratch); |
cmp1 = scratch; |
cmp2 = Operand(SYMBOL_TYPE); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->boolean_string())) { |
+ } else if (String::Equals(type_name, factory->boolean_string())) { |
__ LoadRoot(at, Heap::kTrueValueRootIndex); |
__ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); |
__ LoadRoot(at, Heap::kFalseValueRootIndex); |
@@ -5560,13 +5561,14 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
cmp2 = Operand(input); |
final_branch_condition = eq; |
- } else if (FLAG_harmony_typeof && type_name->Equals(heap()->null_string())) { |
+ } else if (FLAG_harmony_typeof && |
+ String::Equals(type_name, factory->null_string())) { |
__ LoadRoot(at, Heap::kNullValueRootIndex); |
cmp1 = at; |
cmp2 = Operand(input); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->undefined_string())) { |
+ } else if (String::Equals(type_name, factory->undefined_string())) { |
__ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
__ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); |
// The first instruction of JumpIfSmi is an And - it is safe in the delay |
@@ -5580,7 +5582,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
cmp2 = Operand(zero_reg); |
final_branch_condition = ne; |
- } else if (type_name->Equals(heap()->function_string())) { |
+ } else if (String::Equals(type_name, factory->function_string())) { |
STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
__ JumpIfSmi(input, false_label); |
__ GetObjectType(input, scratch, input); |
@@ -5589,7 +5591,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
cmp2 = Operand(JS_FUNCTION_PROXY_TYPE); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->object_string())) { |
+ } else if (String::Equals(type_name, factory->object_string())) { |
__ JumpIfSmi(input, false_label); |
if (!FLAG_harmony_typeof) { |
__ LoadRoot(at, Heap::kNullValueRootIndex); |