| Index: src/x87/code-stubs-x87.cc
|
| diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
|
| index 8bc78fd9bd913bf89c77d867d0f7bbe6dff022ef..9eef0536b3e1825843e8b53271c504f2dfeea774 100644
|
| --- a/src/x87/code-stubs-x87.cc
|
| +++ b/src/x87/code-stubs-x87.cc
|
| @@ -2276,11 +2276,16 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
|
|
|
| // Loop through the prototype chain looking for the {function} prototype.
|
| // Assume true, and change to false if not found.
|
| - Label done, loop, proxy_case;
|
| + Label done, loop, fast_runtime_fallback;
|
| __ mov(eax, isolate()->factory()->true_value());
|
| __ bind(&loop);
|
| +
|
| + __ test_b(FieldOperand(object_map, Map::kBitFieldOffset),
|
| + 1 << Map::kIsAccessCheckNeeded);
|
| + __ j(not_zero, &fast_runtime_fallback, Label::kNear);
|
| __ CmpInstanceType(object_map, JS_PROXY_TYPE);
|
| - __ j(equal, &proxy_case, Label::kNear);
|
| + __ j(equal, &fast_runtime_fallback, Label::kNear);
|
| +
|
| __ mov(object, FieldOperand(object_map, Map::kPrototypeOffset));
|
| __ cmp(object, function_prototype);
|
| __ j(equal, &done, Label::kNear);
|
| @@ -2292,8 +2297,8 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
|
| __ StoreRoot(eax, scratch, Heap::kInstanceofCacheAnswerRootIndex);
|
| __ ret(0);
|
|
|
| - // Proxy-case: Call the %HasInPrototypeChain runtime function.
|
| - __ bind(&proxy_case);
|
| + // Found Proxy or access check needed: Call the runtime.
|
| + __ bind(&fast_runtime_fallback);
|
| __ PopReturnAddressTo(scratch);
|
| __ Push(object);
|
| __ Push(function_prototype);
|
|
|