| Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| index d656acedda2cf9c8f2305607051bf2d7bfa69759..bd6a7075186dc8b40d41c1ddc437c16f57441fe4 100644
|
| --- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| +++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| @@ -2259,24 +2259,13 @@ void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) {
|
| __ JumpIfSmi(input, false_label);
|
|
|
| Register map = scratch2;
|
| + __ CompareObjectType(input, map, scratch1, JS_FUNCTION_TYPE);
|
| if (String::Equals(isolate()->factory()->Function_string(), class_name)) {
|
| - // 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(LAST_NONCALLABLE_SPEC_OBJECT_TYPE ==
|
| - LAST_JS_RECEIVER_TYPE - 1);
|
| - STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
| -
|
| - // We expect CompareObjectType to load the object instance type in scratch1.
|
| - __ CompareObjectType(input, map, scratch1, FIRST_JS_RECEIVER_TYPE);
|
| - __ B(lt, false_label);
|
| - __ Cmp(scratch1, LAST_JS_RECEIVER_TYPE);
|
| __ B(eq, true_label);
|
| } else {
|
| - __ IsObjectJSObjectType(input, map, scratch1, false_label);
|
| + __ B(eq, false_label);
|
| }
|
|
|
| - // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
|
| // Check if the constructor in the map is a function.
|
| {
|
| UseScratchRegisterScope temps(masm());
|
|
|