summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-01-30 23:34:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-01-30 23:34:28 (GMT)
commitf2e09cfe50b25523b6ada8256594673c818c69c1 (patch)
tree4f315c94bb06be616a0434286b5028fa627757c3
parent84edc366a514da71f1b7e88a4984ea45cf2b6bc2 (diff)
downloadtcl-f2e09cfe50b25523b6ada8256594673c818c69c1.zip
tcl-f2e09cfe50b25523b6ada8256594673c818c69c1.tar.gz
tcl-f2e09cfe50b25523b6ada8256594673c818c69c1.tar.bz2
Minor: make comments accurate in [catch] compiler.
-rw-r--r--generic/tclCompCmds.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 1edb56b..57a5370 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -352,8 +352,8 @@ TclCompileCatchCmd(
}
/*
- * We will compile the catch command. Declare the exception range
- * that it uses.
+ * We will compile the catch command. Declare the exception range that it
+ * uses.
*/
range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE);
@@ -362,10 +362,10 @@ TclCompileCatchCmd(
* 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
- * starting the catch, then BEGIN_CATCH, and then EVAL_STK to
- * evaluate the substituted body.
- * Care has to be taken to make sure that substitution happens outside
- * the catch range so that errors in the substitution are not caught.
+ * starting the catch, then BEGIN_CATCH, and then EVAL_STK to evaluate the
+ * substituted body.
+ * Care has to be taken to make sure that substitution happens outside the
+ * catch range so that errors in the substitution are not caught.
* [Bug 219184]
* The reason for duplicating the script is that EVAL_STK would otherwise
* begin by undeflowing the stack below the mark set by BEGIN_CATCH4.
@@ -417,8 +417,8 @@ TclCompileCatchCmd(
}
/*
- * Emit the "no errors" epilogue: push "0" (TCL_OK) as the catch
- * result, and jump around the "error case" code.
+ * Emit the "no errors" epilogue: push "0" (TCL_OK) as the catch result,
+ * and jump around the "error case" code.
*/
PushLiteral(envPtr, "0", 1);
@@ -426,8 +426,8 @@ TclCompileCatchCmd(
/* Stack at this point: ?script? <mark> result TCL_OK */
/*
- * Emit the "error case" epilogue. Push the interpreter result
- * and the return code.
+ * Emit the "error case" epilogue. Push the interpreter result and the
+ * return code.
*/
envPtr->currStackDepth = savedStackDepth;
@@ -446,7 +446,9 @@ TclCompileCatchCmd(
(int)(CurrentOffset(envPtr) - jumpFixup.codeOffset));
}
- /* Push the return options if the caller wants them */
+ /*
+ * Push the return options if the caller wants them.
+ */
if (optsIndex != -1) {
TclEmitOpcode( INST_PUSH_RETURN_OPTIONS, envPtr);
@@ -472,19 +474,17 @@ TclCompileCatchCmd(
}
/*
- * Store the result if requested, and remove it from the stack
+ * Store the result and remove it from the stack.
*/
- if (resultIndex != -1) {
- Emit14Inst( INST_STORE_SCALAR, resultIndex, envPtr);
- }
+ Emit14Inst( INST_STORE_SCALAR, resultIndex, envPtr);
TclEmitOpcode( INST_POP, envPtr);
/*
* Stack is now ?script? ?returnOptions? returnCode.
- * If the options dict has been requested, it is buried on the stack
- * under the return code. Reverse the stack to bring it to the top,
- * store it and remove it from the stack.
+ * If the options dict has been requested, it is buried on the stack under
+ * the return code. Reverse the stack to bring it to the top, store it and
+ * remove it from the stack.
*/
if (optsIndex != -1) {
@@ -496,8 +496,8 @@ TclCompileCatchCmd(
dropScriptAtEnd:
/*
- * Stack is now ?script? result. Get rid of the subst'ed script
- * if it's hanging arond.
+ * Stack is now ?script? result. Get rid of the subst'ed script if it's
+ * hanging arond.
*/
if (cmdTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) {
@@ -506,8 +506,8 @@ TclCompileCatchCmd(
}
/*
- * Result of all this, on either branch, should have been to leave
- * one operand -- the return code -- on the stack.
+ * 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) {