Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index e4fa4d9bda99aa0b82ce4bc93ed3efcba934cbb5..66e437f4b80455c71074a6809428efbc375da312 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -4531,12 +4531,13 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
} |
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- if (check->Equals(isolate()->heap()->number_string())) { |
+ Factory* factory = isolate()->factory(); |
+ if (String::Equals(check, factory->number_string())) { |
__ JumpIfSmi(rax, if_true); |
__ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
__ CompareRoot(rax, Heap::kHeapNumberMapRootIndex); |
Split(equal, if_true, if_false, fall_through); |
- } else if (check->Equals(isolate()->heap()->string_string())) { |
+ } else if (String::Equals(check, factory->string_string())) { |
__ JumpIfSmi(rax, if_false); |
// Check for undetectable objects => false. |
__ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdx); |
@@ -4544,20 +4545,20 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
__ testb(FieldOperand(rdx, Map::kBitFieldOffset), |
Immediate(1 << Map::kIsUndetectable)); |
Split(zero, if_true, if_false, fall_through); |
- } else if (check->Equals(isolate()->heap()->symbol_string())) { |
+ } else if (String::Equals(check, factory->symbol_string())) { |
__ JumpIfSmi(rax, if_false); |
__ CmpObjectType(rax, SYMBOL_TYPE, rdx); |
Split(equal, if_true, if_false, fall_through); |
- } else if (check->Equals(isolate()->heap()->boolean_string())) { |
+ } else if (String::Equals(check, factory->boolean_string())) { |
__ CompareRoot(rax, Heap::kTrueValueRootIndex); |
__ j(equal, if_true); |
__ CompareRoot(rax, Heap::kFalseValueRootIndex); |
Split(equal, if_true, if_false, fall_through); |
} else if (FLAG_harmony_typeof && |
- check->Equals(isolate()->heap()->null_string())) { |
+ String::Equals(check, factory->null_string())) { |
__ CompareRoot(rax, Heap::kNullValueRootIndex); |
Split(equal, if_true, if_false, fall_through); |
- } else if (check->Equals(isolate()->heap()->undefined_string())) { |
+ } else if (String::Equals(check, factory->undefined_string())) { |
__ CompareRoot(rax, Heap::kUndefinedValueRootIndex); |
__ j(equal, if_true); |
__ JumpIfSmi(rax, if_false); |
@@ -4566,14 +4567,14 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
__ testb(FieldOperand(rdx, Map::kBitFieldOffset), |
Immediate(1 << Map::kIsUndetectable)); |
Split(not_zero, if_true, if_false, fall_through); |
- } else if (check->Equals(isolate()->heap()->function_string())) { |
+ } else if (String::Equals(check, factory->function_string())) { |
__ JumpIfSmi(rax, if_false); |
STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
__ CmpObjectType(rax, JS_FUNCTION_TYPE, rdx); |
__ j(equal, if_true); |
__ CmpInstanceType(rdx, JS_FUNCTION_PROXY_TYPE); |
Split(equal, if_true, if_false, fall_through); |
- } else if (check->Equals(isolate()->heap()->object_string())) { |
+ } else if (String::Equals(check, factory->object_string())) { |
__ JumpIfSmi(rax, if_false); |
if (!FLAG_harmony_typeof) { |
__ CompareRoot(rax, Heap::kNullValueRootIndex); |