Index: src/crankshaft/mips64/lithium-codegen-mips64.cc |
diff --git a/src/crankshaft/mips64/lithium-codegen-mips64.cc b/src/crankshaft/mips64/lithium-codegen-mips64.cc |
index 59476e6cb3ee427b6e60ac9f24ffc2f142173643..afec004714ca5a24b6342a47d58912c77076f2e2 100644 |
--- a/src/crankshaft/mips64/lithium-codegen-mips64.cc |
+++ b/src/crankshaft/mips64/lithium-codegen-mips64.cc |
@@ -2674,10 +2674,19 @@ void LCodeGen::DoHasInPrototypeChainAndBranch( |
__ ld(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); |
Label loop; |
__ bind(&loop); |
+ |
+ // Deoptimize if the object needs to be access checked. |
+ __ lbu(object_instance_type, |
+ FieldMemOperand(object_map, Map::kBitFieldOffset)); |
+ __ And(object_instance_type, object_instance_type, |
+ Operand(1 << Map::kIsAccessCheckNeeded)); |
+ DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, object_instance_type, |
+ Operand(zero_reg)); |
__ lbu(object_instance_type, |
FieldMemOperand(object_map, Map::kInstanceTypeOffset)); |
DeoptimizeIf(eq, instr, Deoptimizer::kProxy, object_instance_type, |
Operand(JS_PROXY_TYPE)); |
+ |
__ ld(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); |
EmitTrueBranch(instr, eq, object_prototype, Operand(prototype)); |
__ LoadRoot(at, Heap::kNullValueRootIndex); |