Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index f6d3ea36ab8ce6e0ce21759ce369e8be34db2666..6585b55a05cfa09094acfb12baccaa3cf46d6d36 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -1025,6 +1025,16 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); |
patch_site.EmitPatchInfo(); |
+ Label skip; |
+ __ b(&skip); |
+ PrepareForBailout(clause, TOS_REG); |
+ __ LoadRoot(ip, Heap::kTrueValueRootIndex); |
+ __ cmp(r0, ip); |
+ __ b(ne, &next_test); |
+ __ Drop(1); |
+ __ jmp(clause->body_target()); |
+ __ bind(&skip); |
+ |
__ cmp(r0, Operand::Zero()); |
__ b(ne, &next_test); |
__ Drop(1); // Switch value is no longer needed. |