Subject: Stop checking stack depth in [catch] compiler. Stack depth is checked in compiles of *all* Tcl commands/scripts/bodies in debug builds already.

From: dgp <[email-masked]>
Date: Tue, 23 Jul 2013 18:01:36 +0000

---
 generic/tclCompCmds.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 7fe0728..bde6f96 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -544,7 +544,6 @@ TclCompileCatchCmd(
     JumpFixup jumpFixup;
     Tcl_Token *cmdTokenPtr, *resultNameTokenPtr, *optsNameTokenPtr;
     int resultIndex, optsIndex, range;
-    int initStackDepth = envPtr->currStackDepth;
     DefineLineInformation;	/* TIP #280 */
 
     /*
@@ -742,15 +741,6 @@ TclCompileCatchCmd(
 	TclEmitOpcode(		INST_POP,			envPtr);
     }
 
-    /* 
-     * Result of all this, on either branch, should have been to leave one
-     * operand -- the return code -- on the stack.
-     */
-
-    if (envPtr->currStackDepth != initStackDepth + 1) {
-	Tcl_Panic("in TclCompileCatchCmd, currStackDepth = %d should be %d",
-		  envPtr->currStackDepth, initStackDepth+1);
-    }
     return TCL_OK;
 }
 
-- 
cgit v0.12