| Index: src/ppc/code-stubs-ppc.cc
|
| diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
|
| index b194258da641a41b0c9489696cec145686735c5d..d89bbd1e9620ef245b79418ac47f5619a3fca9a3 100644
|
| --- a/src/ppc/code-stubs-ppc.cc
|
| +++ b/src/ppc/code-stubs-ppc.cc
|
| @@ -1421,8 +1421,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
|
| __ CompareObjectType(function, function_map, scratch, JS_FUNCTION_TYPE);
|
| __ bne(&slow_case);
|
|
|
| - // Ensure that {function} has an instance prototype.
|
| + // Go to the runtime if the function is not a constructor.
|
| __ lbz(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
|
| + __ TestBit(scratch, Map::kIsConstructor, r0);
|
| + __ beq(&slow_case, cr0);
|
| +
|
| + // Ensure that {function} has an instance prototype.
|
| __ TestBit(scratch, Map::kHasNonInstancePrototype, r0);
|
| __ bne(&slow_case, cr0);
|
|
|
|
|