From e8976518be1b4f26d965c08e0229d31ed7bcb101 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 5 Jun 2013 14:50:39 +0000 Subject: Stack Depth fixups. --- generic/tclCompCmds.c | 14 ++------------ generic/tclExecute.c | 2 ++ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 365e647..10a789e 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -499,6 +499,7 @@ TclCompileBreakCmd( TclCleanupStackForBreakContinue(envPtr, auxPtr); TclAddLoopBreakFixup(envPtr, auxPtr); + TclAdjustStackDepth(1, envPtr); } else { /* * Emit a real break. @@ -510,12 +511,6 @@ TclCompileBreakCmd( TclEmitInt4(0, envPtr); } - /* - * Instructions that raise exceptions don't really have to follow the - * usual stack management rules, but the cleanup code does. - */ - - TclAdjustStackDepth(1, envPtr); return TCL_OK; } @@ -833,6 +828,7 @@ TclCompileContinueCmd( TclCleanupStackForBreakContinue(envPtr, auxPtr); TclAddLoopContinueFixup(envPtr, auxPtr); + TclAdjustStackDepth(1, envPtr); } else { /* * Emit a real continue. @@ -844,12 +840,6 @@ TclCompileContinueCmd( TclEmitInt4(0, envPtr); } - /* - * Instructions that raise exceptions don't really have to follow the - * usual stack management rules, but the cleanup code does. - */ - - TclAdjustStackDepth(1, envPtr); return TCL_OK; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 98ce51e..6ee3cae 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2728,6 +2728,8 @@ TEBCresume( CLANG_ASSERT(auxObjList); objc = CURR_DEPTH - auxObjList->internalRep.ptrAndLongRep.value; POP_TAUX_OBJ(); + /* Ugly abuse! */ + starting = 1; NEXT_INST_V(1, objc, 0); case INST_EXPAND_STKTOP: { -- cgit v0.12