Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 3c92afa33a669446afd1dec29fb4e12077f08f02..c8101b16bbf46e273e02e6932b8782ee283abc77 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -977,6 +977,16 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
Handle<Code> ic = CompareIC::GetUninitialized(isolate(), Token::EQ_STRICT); |
CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); |
patch_site.EmitPatchInfo(); |
+ |
+ Label skip; |
+ __ jmp(&skip, Label::kNear); |
+ PrepareForBailout(clause, TOS_REG); |
+ __ cmp(eax, isolate()->factory()->true_value()); |
+ __ j(not_equal, &next_test); |
+ __ Drop(1); |
+ __ jmp(clause->body_target()); |
+ __ bind(&skip); |
+ |
__ test(eax, eax); |
__ j(not_equal, &next_test); |
__ Drop(1); // Switch value is no longer needed. |