| Index: src/arm64/lithium-codegen-arm64.cc
|
| diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc
|
| index a95ae9ef116fa1ca3de44bbfb7f201efb7782bdf..2f9169812a8e0c63059f41b0f46b61e47fbb4411 100644
|
| --- a/src/arm64/lithium-codegen-arm64.cc
|
| +++ b/src/arm64/lithium-codegen-arm64.cc
|
| @@ -2438,15 +2438,17 @@ void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) {
|
|
|
| // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
|
| // Check if the constructor in the map is a function.
|
| - __ Ldr(scratch1, FieldMemOperand(map, Map::kConstructorOffset));
|
| -
|
| + {
|
| + UseScratchRegisterScope temps(masm());
|
| + Register instance_type = temps.AcquireX();
|
| + __ GetMapConstructor(scratch1, map, scratch2, instance_type);
|
| + __ Cmp(instance_type, JS_FUNCTION_TYPE);
|
| + }
|
| // Objects with a non-function constructor have class 'Object'.
|
| if (String::Equals(class_name, isolate()->factory()->Object_string())) {
|
| - __ JumpIfNotObjectType(
|
| - scratch1, scratch2, scratch2, JS_FUNCTION_TYPE, true_label);
|
| + __ B(ne, true_label);
|
| } else {
|
| - __ JumpIfNotObjectType(
|
| - scratch1, scratch2, scratch2, JS_FUNCTION_TYPE, false_label);
|
| + __ B(ne, false_label);
|
| }
|
|
|
| // The constructor function is in scratch1. Get its instance class name.
|
|
|