| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 0244e7ee0d5a3391a50948ec1668f628ee844eed..3be283de831ad40240e83daafb6c1cf5044f8cc9 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -2657,14 +2657,16 @@ void LCodeGen::EmitClassOfTest(Label* is_true,
|
|
|
| // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
|
| // Check if the constructor in the map is a function.
|
| - __ lw(temp, FieldMemOperand(temp, Map::kConstructorOffset));
|
| + Register instance_type = scratch1();
|
| + DCHECK(!instance_type.is(temp));
|
| + DCHECK(!instance_type.is(temp2));
|
| + __ GetMapConstructor(temp, temp, temp2, instance_type);
|
|
|
| // Objects with a non-function constructor have class 'Object'.
|
| - __ GetObjectType(temp, temp2, temp2);
|
| if (String::Equals(class_name, isolate()->factory()->Object_string())) {
|
| - __ Branch(is_true, ne, temp2, Operand(JS_FUNCTION_TYPE));
|
| + __ Branch(is_true, ne, instance_type, Operand(JS_FUNCTION_TYPE));
|
| } else {
|
| - __ Branch(is_false, ne, temp2, Operand(JS_FUNCTION_TYPE));
|
| + __ Branch(is_false, ne, instance_type, Operand(JS_FUNCTION_TYPE));
|
| }
|
|
|
| // temp now contains the constructor function. Grab the
|
|
|