| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index 3ac065cf8689cac410c0cdafcfe7e69c61898f39..d4878fde74803f2626990075f32b8a6849fbfb24 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -1499,8 +1499,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
|
| __ GetObjectType(function, function_map, scratch);
|
| __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE));
|
|
|
| - // Ensure that {function} has an instance prototype.
|
| + // Go to the runtime if the function is not a constructor.
|
| __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
|
| + __ And(at, scratch, Operand(1 << Map::kIsConstructor));
|
| + __ Branch(&slow_case, eq, at, Operand(zero_reg));
|
| +
|
| + // Ensure that {function} has an instance prototype.
|
| __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype));
|
| __ Branch(&slow_case, ne, at, Operand(zero_reg));
|
|
|
|
|