summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authormig <mig>2013-12-11 16:43:26 (GMT)
committermig <mig>2013-12-11 16:43:26 (GMT)
commit3ad596b1a514f2048e1de737443824218c2ac3d9 (patch)
tree10a337c54642959ae15207f9ba7d28cffe5cf4c5 /generic/tclCompCmds.c
parentac531cc46362695ecb32cdb5e6c9a797133235a8 (diff)
downloadtcl-3ad596b1a514f2048e1de737443824218c2ac3d9.zip
tcl-3ad596b1a514f2048e1de737443824218c2ac3d9.tar.gz
tcl-3ad596b1a514f2048e1de737443824218c2ac3d9.tar.bz2
comments
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 43504bf..72b338c 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -582,11 +582,7 @@ TclCompileCatchCmd(
/*
* We will compile the catch command. Declare the exception range that it
* uses.
- */
-
- range = TclCreateExceptRange(CATCH_EXCEPTION_RANGE, envPtr);
-
- /*
+ *
* If the body is a simple word, compile a BEGIN_CATCH instruction,
* followed by the instructions to eval the body.
* Otherwise, compile instructions to substitute the body text before
@@ -599,6 +595,7 @@ TclCompileCatchCmd(
* begin by undeflowing the stack below the mark set by BEGIN_CATCH4.
*/
+ range = TclCreateExceptRange(CATCH_EXCEPTION_RANGE, envPtr);
if (cmdTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr);
ExceptionRangeStarts(envPtr, range);
@@ -635,13 +632,13 @@ TclCompileCatchCmd(
TclEmitOpcode( INST_PUSH_RESULT, envPtr);
TclEmitOpcode( INST_PUSH_RETURN_CODE, envPtr);
+ /* Stack at this point on both branches: result returnCode */
+
if (TclFixupForwardJumpToHere(envPtr, &jumpFixup, 127)) {
Tcl_Panic("TclCompileCatchCmd: bad jump distance %d",
(int)(CurrentOffset(envPtr) - jumpFixup.codeOffset));
}
- /* Stack at this point: result returnCode */
-
/*
* Push the return options if the caller wants them. This needs to happen
* before INST_END_CATCH