summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2013-12-11 16:43:26 (GMT)
committermig <mig>2013-12-11 16:43:26 (GMT)
commitee023de8d6942ebb02809d498f6dd46f634fa98d (patch)
tree10a337c54642959ae15207f9ba7d28cffe5cf4c5
parentd2ffd68c98038a0690f6a6e2f9a32b6439a7fe7e (diff)
downloadtcl-ee023de8d6942ebb02809d498f6dd46f634fa98d.zip
tcl-ee023de8d6942ebb02809d498f6dd46f634fa98d.tar.gz
tcl-ee023de8d6942ebb02809d498f6dd46f634fa98d.tar.bz2
comments
-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