| Index: src/arm64/code-stubs-arm64.cc
|
| diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
|
| index 2d9d7980e36b8ae1e06c85d0d807b73da2a95e85..aab8bfd0e31515b720ee304ce4aed9ac2c767ba6 100644
|
| --- a/src/arm64/code-stubs-arm64.cc
|
| +++ b/src/arm64/code-stubs-arm64.cc
|
| @@ -1557,8 +1557,11 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
|
| __ JumpIfNotObjectType(function, function_map, scratch, JS_FUNCTION_TYPE,
|
| &slow_case);
|
|
|
| - // Ensure that {function} has an instance prototype.
|
| + // Go to the runtime if the function is not a constructor.
|
| __ Ldrb(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
|
| + __ Tbz(scratch, Map::kIsConstructor, &slow_case);
|
| +
|
| + // Ensure that {function} has an instance prototype.
|
| __ Tbnz(scratch, Map::kHasNonInstancePrototype, &slow_case);
|
|
|
| // Get the "prototype" (or initial map) of the {function}.
|
|
|