Index: src/full-codegen.cc |
=================================================================== |
--- src/full-codegen.cc (revision 9827) |
+++ src/full-codegen.cc (working copy) |
@@ -410,7 +410,6 @@ |
void FullCodeGenerator::StackValueContext::Plug(Register reg) const { |
__ push(reg); |
- codegen()->increment_stack_height(); |
} |
@@ -424,13 +423,11 @@ |
void FullCodeGenerator::EffectContext::PlugTOS() const { |
__ Drop(1); |
- codegen()->decrement_stack_height(); |
} |
void FullCodeGenerator::AccumulatorValueContext::PlugTOS() const { |
__ pop(result_register()); |
- codegen()->decrement_stack_height(); |
} |
@@ -441,7 +438,6 @@ |
void FullCodeGenerator::TestContext::PlugTOS() const { |
// For simplicity we always test the accumulator register. |
__ pop(result_register()); |
- codegen()->decrement_stack_height(); |
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); |
codegen()->DoTest(this); |
} |
@@ -979,7 +975,6 @@ |
VisitForStackValue(stmt->expression()); |
PushFunctionArgumentForContextAllocation(); |
__ CallRuntime(Runtime::kPushWithContext, 2); |
- decrement_stack_height(); |
StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
{ WithOrCatch body(this); |
@@ -1149,13 +1144,10 @@ |
// Try block code. Sets up the exception handler chain. |
__ bind(&try_handler_setup); |
{ |
- const int delta = StackHandlerConstants::kSize / kPointerSize; |
TryCatch try_block(this); |
__ PushTryHandler(IN_JAVASCRIPT, TRY_CATCH_HANDLER); |
- increment_stack_height(delta); |
Visit(stmt->try_block()); |
__ PopTryHandler(); |
- decrement_stack_height(delta); |
} |
__ bind(&done); |
} |
@@ -1187,7 +1179,6 @@ |
// cooked before GC. |
Label finally_entry; |
Label try_handler_setup; |
- const int original_stack_height = stack_height(); |
// Setup the try-handler chain. Use a call to |
// Jump to try-handler setup and try-block code. Use call to put try-handler |
@@ -1209,7 +1200,6 @@ |
// Finally block implementation. |
Finally finally_block(this); |
EnterFinallyBlock(); |
- set_stack_height(original_stack_height + Finally::kElementCount); |
Visit(stmt->finally_block()); |
ExitFinallyBlock(); // Return to the calling code. |
} |
@@ -1217,13 +1207,10 @@ |
__ bind(&try_handler_setup); |
{ |
// Setup try handler (stack pointer registers). |
- const int delta = StackHandlerConstants::kSize / kPointerSize; |
TryFinally try_block(this, &finally_entry); |
__ PushTryHandler(IN_JAVASCRIPT, TRY_FINALLY_HANDLER); |
- set_stack_height(original_stack_height + delta); |
Visit(stmt->try_block()); |
__ PopTryHandler(); |
- set_stack_height(original_stack_height); |
} |
// Execute the finally block on the way out. Clobber the unpredictable |
// value in the accumulator with one that's safe for GC. The finally |
@@ -1253,7 +1240,6 @@ |
__ bind(&true_case); |
SetExpressionPosition(expr->then_expression(), |
expr->then_expression_position()); |
- int start_stack_height = stack_height(); |
if (context()->IsTest()) { |
const TestContext* for_test = TestContext::cast(context()); |
VisitForControl(expr->then_expression(), |
@@ -1267,7 +1253,6 @@ |
PrepareForBailoutForId(expr->ElseId(), NO_REGISTERS); |
__ bind(&false_case); |
- set_stack_height(start_stack_height); |
if (context()->IsTest()) ForwardBailoutToChild(expr); |
SetExpressionPosition(expr->else_expression(), |
expr->else_expression_position()); |
@@ -1308,11 +1293,8 @@ |
void FullCodeGenerator::VisitThrow(Throw* expr) { |
Comment cmnt(masm_, "[ Throw"); |
- // Throw has no effect on the stack height or the current expression context. |
- // Usually the expression context is null, because throw is a statement. |
VisitForStackValue(expr->exception()); |
__ CallRuntime(Runtime::kThrow, 1); |
- decrement_stack_height(); |
// Never returns here. |
} |