| Index: src/x87/code-stubs-x87.cc
|
| diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
|
| index 85cb9174a75218c0e0ecd900e3be2e42a100ba9e..baf3d845d5fad93256c76b6abbfaf7aa0d8ecb53 100644
|
| --- a/src/x87/code-stubs-x87.cc
|
| +++ b/src/x87/code-stubs-x87.cc
|
| @@ -1862,6 +1862,11 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
|
| __ CmpObjectType(function, JS_FUNCTION_TYPE, function_map);
|
| __ j(not_equal, &slow_case);
|
|
|
| + // Go to the runtime if the function is not a constructor.
|
| + __ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
|
| + static_cast<uint8_t>(1 << Map::kIsConstructor));
|
| + __ j(zero, &slow_case);
|
| +
|
| // Ensure that {function} has an instance prototype.
|
| __ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
|
| static_cast<uint8_t>(1 << Map::kHasNonInstancePrototype));
|
|
|