summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-05-05 15:32:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-05-05 15:32:17 (GMT)
commit96349207cbe89f0e0d78bd3dff7a294bcc588c84 (patch)
tree6b13f676396eac36308dfc4b9dd0d1e7b714d1f1 /generic/tclCompile.c
parent8f1d72dfe0e08b09f9985440a5e4f682804224ed (diff)
downloadtcl-96349207cbe89f0e0d78bd3dff7a294bcc588c84.zip
tcl-96349207cbe89f0e0d78bd3dff7a294bcc588c84.tar.gz
tcl-96349207cbe89f0e0d78bd3dff7a294bcc588c84.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.
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");
}
}