Index: src/crankshaft/arm64/lithium-codegen-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
index b4c3da411215febd8ca33cad31cf18206387b0e4..d656acedda2cf9c8f2305607051bf2d7bfa69759 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -2916,8 +2916,16 @@ void LCodeGen::DoHasInPrototypeChainAndBranch( |
__ Ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); |
Label loop; |
__ Bind(&loop); |
+ |
+ // Deoptimize if the object needs to be access checked. |
+ __ Ldrb(object_instance_type, |
+ FieldMemOperand(object_map, Map::kBitFieldOffset)); |
+ __ Tst(object_instance_type, Operand(1 << Map::kIsAccessCheckNeeded)); |
+ DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck); |
+ // Deoptimize for proxies. |
__ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE); |
DeoptimizeIf(eq, instr, Deoptimizer::kProxy); |
+ |
__ Ldr(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); |
__ Cmp(object_prototype, prototype); |
__ B(eq, instr->TrueLabel(chunk_)); |