Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index b20c0e557de0da3ffef1ea2c910ee07e5c959c50..34d98b7ddf7a1779f90f9cef19809b0664bf6e79 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -5496,13 +5496,14 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
Handle<String> type_name) { |
Condition final_branch_condition = kNoCondition; |
Register scratch = scratch0(); |
- if (type_name->Equals(heap()->number_string())) { |
+ Factory* factory = isolate()->factory(); |
+ if (String::Equals(type_name, factory->number_string())) { |
__ JumpIfSmi(input, true_label); |
__ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); |
__ CompareRoot(scratch, Heap::kHeapNumberMapRootIndex); |
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); |
__ CompareObjectType(input, scratch, no_reg, FIRST_NONSTRING_TYPE); |
__ b(ge, false_label); |
@@ -5510,22 +5511,23 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
__ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
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); |
__ CompareObjectType(input, scratch, no_reg, SYMBOL_TYPE); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->boolean_string())) { |
+ } else if (String::Equals(type_name, factory->boolean_string())) { |
__ CompareRoot(input, Heap::kTrueValueRootIndex); |
__ b(eq, true_label); |
__ CompareRoot(input, Heap::kFalseValueRootIndex); |
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())) { |
__ CompareRoot(input, Heap::kNullValueRootIndex); |
final_branch_condition = eq; |
- } else if (type_name->Equals(heap()->undefined_string())) { |
+ } else if (String::Equals(type_name, factory->undefined_string())) { |
__ CompareRoot(input, Heap::kUndefinedValueRootIndex); |
__ b(eq, true_label); |
__ JumpIfSmi(input, false_label); |
@@ -5535,7 +5537,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
__ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
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); |
Register type_reg = scratch; |
__ JumpIfSmi(input, false_label); |
@@ -5544,7 +5546,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, |
__ cmp(type_reg, 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())) { |
Register map = scratch; |
__ JumpIfSmi(input, false_label); |
if (!FLAG_harmony_typeof) { |