Reviewers: fschneider,

Description:
Fix excessive stack usage by compiler due to local in recursive scope.

Please review this at http://codereview.chromium.org/1019006

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/ia32/codegen-ia32.cc


Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc    (revision 4148)
+++ src/ia32/codegen-ia32.cc    (working copy)
@@ -560,7 +560,6 @@
   int original_height = frame_->height();
 #endif
   ASSERT(!in_spilled_code());
-  JumpTarget done;

   // If the expression should be a side-effect-free 32-bit int computation,
   // compile that SafeInt32 path, and a bailout path.
@@ -570,6 +569,7 @@
       expr->num_bit_ops() > 2 &&
       CpuFeatures::IsSupported(SSE2)) {
     BreakTarget unsafe_bailout;
+    JumpTarget done;
     unsafe_bailout.set_expected_height(frame_->height());
     LoadInSafeInt32Mode(expr, &unsafe_bailout);
     done.Jump();
@@ -578,6 +578,7 @@
       unsafe_bailout.Bind();
       LoadWithSafeInt32ModeDisabled(expr);
     }
+    done.Bind();
   } else {
     JumpTarget true_target;
     JumpTarget false_target;
@@ -633,7 +634,6 @@
       }
     }
   }
-  done.Bind();
   ASSERT(has_valid_frame());
   ASSERT(frame_->height() == original_height + 1);
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to