Index: src/crankshaft/ppc/lithium-codegen-ppc.cc |
diff --git a/src/crankshaft/ppc/lithium-codegen-ppc.cc b/src/crankshaft/ppc/lithium-codegen-ppc.cc |
index 6e260e8628f01109361b872f17cdf0fa23401eaf..e163af229cc5f5b5d679f3b8d4b58ac02acd4cce 100644 |
--- a/src/crankshaft/ppc/lithium-codegen-ppc.cc |
+++ b/src/crankshaft/ppc/lithium-codegen-ppc.cc |
@@ -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, |