Index: src/mips64/lithium-codegen-mips64.cc |
diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc |
index 8e5278499efe5c9797dc93a56637cb6bf34c1401..bb256bff3cf89cb0bdfa30fc6583438eb2a60ec8 100644 |
--- a/src/mips64/lithium-codegen-mips64.cc |
+++ b/src/mips64/lithium-codegen-mips64.cc |
@@ -2618,14 +2618,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. |
- __ ld(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 |