| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index f71bf38e42a0ecae4453f12dd29b9a018c5c550d..002b7108f6a4f3a58cb98e032acc7eba5135bbbe 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -2290,13 +2290,13 @@ void LCodeGen::EmitClassOfTest(Label* is_true,
|
| __ movq(temp, FieldOperand(temp, JSFunction::kSharedFunctionInfoOffset));
|
| __ movq(temp, FieldOperand(temp,
|
| SharedFunctionInfo::kInstanceClassNameOffset));
|
| - // The class name we are testing against is a symbol because it's a literal.
|
| - // The name in the constructor is a symbol because of the way the context is
|
| - // booted. This routine isn't expected to work for random API-created
|
| + // The class name we are testing against is internalized since it's a literal.
|
| + // The name in the constructor is internalized because of the way the context
|
| + // is booted. This routine isn't expected to work for random API-created
|
| // classes and it doesn't have to because you can't access it with natives
|
| - // syntax. Since both sides are symbols it is sufficient to use an identity
|
| - // comparison.
|
| - ASSERT(class_name->IsSymbol());
|
| + // syntax. Since both sides are internalized it is sufficient to use an
|
| + // identity comparison.
|
| + ASSERT(class_name->IsInternalizedString());
|
| __ Cmp(temp, class_name);
|
| // End with the answer in the z flag.
|
| }
|
| @@ -5423,14 +5423,14 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| Register input,
|
| Handle<String> type_name) {
|
| Condition final_branch_condition = no_condition;
|
| - if (type_name->Equals(heap()->number_symbol())) {
|
| + if (type_name->Equals(heap()->number_string())) {
|
| __ JumpIfSmi(input, true_label);
|
| __ CompareRoot(FieldOperand(input, HeapObject::kMapOffset),
|
| Heap::kHeapNumberMapRootIndex);
|
|
|
| final_branch_condition = equal;
|
|
|
| - } else if (type_name->Equals(heap()->string_symbol())) {
|
| + } else if (type_name->Equals(heap()->string_string())) {
|
| __ JumpIfSmi(input, false_label);
|
| __ CmpObjectType(input, FIRST_NONSTRING_TYPE, input);
|
| __ j(above_equal, false_label);
|
| @@ -5438,17 +5438,17 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| Immediate(1 << Map::kIsUndetectable));
|
| final_branch_condition = zero;
|
|
|
| - } else if (type_name->Equals(heap()->boolean_symbol())) {
|
| + } else if (type_name->Equals(heap()->boolean_string())) {
|
| __ CompareRoot(input, Heap::kTrueValueRootIndex);
|
| __ j(equal, true_label);
|
| __ CompareRoot(input, Heap::kFalseValueRootIndex);
|
| final_branch_condition = equal;
|
|
|
| - } else if (FLAG_harmony_typeof && type_name->Equals(heap()->null_symbol())) {
|
| + } else if (FLAG_harmony_typeof && type_name->Equals(heap()->null_string())) {
|
| __ CompareRoot(input, Heap::kNullValueRootIndex);
|
| final_branch_condition = equal;
|
|
|
| - } else if (type_name->Equals(heap()->undefined_symbol())) {
|
| + } else if (type_name->Equals(heap()->undefined_string())) {
|
| __ CompareRoot(input, Heap::kUndefinedValueRootIndex);
|
| __ j(equal, true_label);
|
| __ JumpIfSmi(input, false_label);
|
| @@ -5458,7 +5458,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| Immediate(1 << Map::kIsUndetectable));
|
| final_branch_condition = not_zero;
|
|
|
| - } else if (type_name->Equals(heap()->function_symbol())) {
|
| + } else if (type_name->Equals(heap()->function_string())) {
|
| STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
|
| __ JumpIfSmi(input, false_label);
|
| __ CmpObjectType(input, JS_FUNCTION_TYPE, input);
|
| @@ -5466,7 +5466,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| __ CmpInstanceType(input, JS_FUNCTION_PROXY_TYPE);
|
| final_branch_condition = equal;
|
|
|
| - } else if (type_name->Equals(heap()->object_symbol())) {
|
| + } else if (type_name->Equals(heap()->object_string())) {
|
| __ JumpIfSmi(input, false_label);
|
| if (!FLAG_harmony_typeof) {
|
| __ CompareRoot(input, Heap::kNullValueRootIndex);
|
|
|