| Index: src/full-codegen.cc
|
| ===================================================================
|
| --- src/full-codegen.cc (revision 6071)
|
| +++ src/full-codegen.cc (working copy)
|
| @@ -799,6 +799,11 @@
|
| SetStatementPosition(stmt);
|
| NestedStatement* current = nesting_stack_;
|
| int stack_depth = 0;
|
| + // When continuing, we clobber the unpredictable value in the accumulator
|
| + // with one that's safe for GC. If we hit an exit from the try block of
|
| + // try...finally on our way out, we will unconditionally preserve the
|
| + // accumulator on the stack.
|
| + ClearAccumulator();
|
| while (!current->IsContinueTarget(stmt->target())) {
|
| stack_depth = current->Exit(stack_depth);
|
| current = current->outer();
|
| @@ -815,6 +820,11 @@
|
| SetStatementPosition(stmt);
|
| NestedStatement* current = nesting_stack_;
|
| int stack_depth = 0;
|
| + // When breaking, we clobber the unpredictable value in the accumulator
|
| + // with one that's safe for GC. If we hit an exit from the try block of
|
| + // try...finally on our way out, we will unconditionally preserve the
|
| + // accumulator on the stack.
|
| + ClearAccumulator();
|
| while (!current->IsBreakTarget(stmt->target())) {
|
| stack_depth = current->Exit(stack_depth);
|
| current = current->outer();
|
| @@ -1104,7 +1114,10 @@
|
| Visit(stmt->try_block());
|
| __ PopTryHandler();
|
| }
|
| - // Execute the finally block on the way out.
|
| + // Execute the finally block on the way out. Clobber the unpredictable
|
| + // value in the accumulator with one that's safe for GC. The finally
|
| + // block will unconditionally preserve the accumulator on the stack.
|
| + ClearAccumulator();
|
| __ Call(&finally_entry);
|
| }
|
|
|
|
|