summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-03 16:46:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-03 16:46:05 (GMT)
commit98270c527f79d108bd22e4a8fab70496ff169902 (patch)
treefafb358419276b05930a559f2dcc6d3e63d24381
parent18f17ff4b787b7183764a21bc157390857b95d5f (diff)
downloadtcl-98270c527f79d108bd22e4a8fab70496ff169902.zip
tcl-98270c527f79d108bd22e4a8fab70496ff169902.tar.gz
tcl-98270c527f79d108bd22e4a8fab70496ff169902.tar.bz2
* generic/tclCompCmds.c (TclCompileReturnCmd): Now that [return]
compiles to INST_RETURN, it is safe to compile even outside a proc.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCompCmds.c10
2 files changed, 6 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 375ed6d..d8ab4d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-03 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclCompCmds.c (TclCompileReturnCmd): Now that [return]
+ compiles to INST_RETURN, it is safe to compile even outside a proc.
+
2003-04-02 Mo DeJong <mdejong@users.sourceforge.net>
* win/configure: Regen.
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 0596927..47b3b1a 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.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: tclCompCmds.c,v 1.44 2003/03/20 10:03:42 dkf Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.45 2003/04/03 16:46:43 dgp Exp $
*/
#include "tclInt.h"
@@ -2372,14 +2372,6 @@ TclCompileReturnCmd(interp, parsePtr, envPtr)
Tcl_Token *varTokenPtr;
int code;
- /*
- * If we're not in a procedure, don't compile.
- */
-
- if (envPtr->procPtr == NULL) {
- return TCL_OUT_LINE_COMPILE;
- }
-
switch (parsePtr->numWords) {
case 1: {
/*