Fix excessive stack usage by compiler due to local in recursive scope.
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 17 Mar 2010 12:27:32 +0000 (12:27 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 17 Mar 2010 12:27:32 +0000 (12:27 +0000)
Review URL: http://codereview.chromium.org/1019006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ia32/codegen-ia32.cc

index b0793b65f7ace9dfe2ca1119c5dcbc5c7e70f7b0..2b3d4d99bd0a052218ad4c6e0451e077ef9396e3 100644 (file)
@@ -560,7 +560,6 @@ void CodeGenerator::Load(Expression* expr) {
   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 @@ void CodeGenerator::Load(Expression* expr) {
       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 @@ void CodeGenerator::Load(Expression* expr) {
       unsafe_bailout.Bind();
       LoadWithSafeInt32ModeDisabled(expr);
     }
+    done.Bind();
   } else {
     JumpTarget true_target;
     JumpTarget false_target;
@@ -633,7 +634,6 @@ void CodeGenerator::Load(Expression* expr) {
       }
     }
   }
-  done.Bind();
   ASSERT(has_valid_frame());
   ASSERT(frame_->height() == original_height + 1);
 }