Commit 7c06eaf4 authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: Fix "[proxies] fix access issue when having proxies on the prototype-chain of global objects."

Port 2c75e3d2

R=cbruni@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1530233003

Cr-Commit-Position: refs/heads/master@{#32915}
parent 99b8e7c8
......@@ -2714,6 +2714,13 @@ void LCodeGen::DoHasInPrototypeChainAndBranch(
__ LoadP(object_map, FieldMemOperand(object, HeapObject::kMapOffset));
Label loop;
__ bind(&loop);
// Deoptimize if the object needs to be access checked.
__ lbz(object_instance_type,
FieldMemOperand(object_map, Map::kBitFieldOffset));
__ TestBit(object_instance_type, Map::kIsAccessCheckNeeded, r0);
DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, cr0);
// Deoptimize for proxies.
__ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE);
DeoptimizeIf(eq, instr, Deoptimizer::kProxy);
__ LoadP(object_prototype,
......
......@@ -1469,7 +1469,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Check if the object needs to be access checked.
__ lbz(map_bit_field, FieldMemOperand(object_map, Map::kBitFieldOffset));
__ TestBit(map_bit_field, Map::kIsCallable, r0);
__ TestBit(map_bit_field, Map::kIsAccessCheckNeeded, r0);
__ bne(&fast_runtime_fallback, cr0);
// Check if the current object is a Proxy.
__ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment