summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2005-05-05 15:32:16 (GMT)
committerdgp <dgp@noemail.net>2005-05-05 15:32:16 (GMT)
commitd069f639c6d6fd1058ac7d490809e68f03425e80 (patch)
tree6b13f676396eac36308dfc4b9dd0d1e7b714d1f1 /generic/tclCompile.c
parent75342426b3d9fbf5be1a5a0ce82d15e8241cea7b (diff)
downloadtcl-d069f639c6d6fd1058ac7d490809e68f03425e80.zip
tcl-d069f639c6d6fd1058ac7d490809e68f03425e80.tar.gz
tcl-d069f639c6d6fd1058ac7d490809e68f03425e80.tar.bz2
* generic/tclCompCmds.c: Replaced all instance of
* generic/tclCompile.c: TCL_OUT_LINE_COMPILE with TCL_ERROR. * generic/tclInt.h: Now that we've eradicated the mistaken * tests/appendComp.test: notion of a "compile-time error", we can use the TCL_ERROR return code to signal any failure to produce bytecode. FossilOrigin-Name: 2f2f477a0587c716702f86c5d307b10b39844f25
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 259e42f..47b6831 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.83 2005/04/13 09:39:30 msofer Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.84 2005/05/05 15:32:20 dgp Exp $
*/
#include "tclInt.h"
@@ -1128,18 +1128,17 @@ TclCompileScript(interp, script, numBytes, envPtr)
TclStoreInt4AtPtr(fixLen, fixPtr);
}
goto finishCommand;
- } else if (code == TCL_OUT_LINE_COMPILE) {
+ } else {
/*
* Restore numCommands and codeNext to their
* correct values, removing any commands
- * compiled before TCL_OUT_LINE_COMPILE
+ * compiled before the failure to produce
+ * bytecode got reported.
* [Bugs 705406 and 735055]
*/
envPtr->numCommands = savedNumCmds;
envPtr->codeNext = envPtr->codeStart
+ savedCodeNext;
- } else { /* an error */
- Tcl_Panic("TclCompileScript: compileProc returned TCL_ERROR\n");
}
}