Chromium Code Reviews| Index: src/crankshaft/x87/lithium-codegen-x87.cc |
| diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc |
| index cdcb31d98ec770d748c36c927566f2857b0bdefd..3de29fc40e0c581d8a84c51e3080673e9c0aef3d 100644 |
| --- a/src/crankshaft/x87/lithium-codegen-x87.cc |
| +++ b/src/crankshaft/x87/lithium-codegen-x87.cc |
| @@ -2728,14 +2728,11 @@ void LCodeGen::EmitClassOfTest(Label* is_true, |
| // Assuming the following assertions, we can use the same compares to test |
| // for both being a function type and being in the object type range. |
| STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
| - STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| - FIRST_JS_RECEIVER_TYPE + 1); |
| STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| LAST_JS_RECEIVER_TYPE - 1); |
| STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
|
Camillo Bruni
2015/12/11 12:37:27
It would probably make some things easier by havin
|
| __ CmpObjectType(input, FIRST_JS_RECEIVER_TYPE, temp); |
| __ j(below, is_false); |
| - __ j(equal, is_true); |
| __ CmpInstanceType(temp, LAST_JS_RECEIVER_TYPE); |
|
Camillo Bruni
2015/12/11 12:37:27
Why don't we compare directly with JS_FUNCTION_TYP
|
| __ j(equal, is_true); |
| } else { |
| @@ -2743,9 +2740,9 @@ void LCodeGen::EmitClassOfTest(Label* is_true, |
| // actual type and do a signed compare with the width of the type range. |
| __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); |
| __ movzx_b(temp2, FieldOperand(temp, Map::kInstanceTypeOffset)); |
| - __ sub(Operand(temp2), Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| + __ sub(Operand(temp2), Immediate(FIRST_JS_RECEIVER_TYPE)); |
| __ cmp(Operand(temp2), Immediate(LAST_NONCALLABLE_SPEC_OBJECT_TYPE - |
| - FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| + FIRST_JS_RECEIVER_TYPE)); |
| __ j(above, is_false); |
| } |