Index: src/crankshaft/arm/lithium-codegen-arm.cc |
diff --git a/src/crankshaft/arm/lithium-codegen-arm.cc b/src/crankshaft/arm/lithium-codegen-arm.cc |
index 7b05ab40d39df1da42714e7ac0d488b216c3ca6c..2781e6e7a0f96b8f89059797b09545dd9191ea16 100644 |
--- a/src/crankshaft/arm/lithium-codegen-arm.cc |
+++ b/src/crankshaft/arm/lithium-codegen-arm.cc |
@@ -2683,6 +2683,7 @@ void LCodeGen::DoHasInPrototypeChainAndBranch( |
LHasInPrototypeChainAndBranch* instr) { |
Register const object = ToRegister(instr->object()); |
Register const object_map = scratch0(); |
+ Register const object_instance_type = ip; |
Register const object_prototype = object_map; |
Register const prototype = ToRegister(instr->prototype()); |
@@ -2698,6 +2699,8 @@ void LCodeGen::DoHasInPrototypeChainAndBranch( |
__ ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); |
Label loop; |
__ bind(&loop); |
+ __ 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); |
EmitTrueBranch(instr, eq); |