diff options
author | hobbs <hobbs> | 2000-01-21 02:25:25 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-01-21 02:25:25 (GMT) |
commit | df05056e3fba1a1d7b9cde6fc893514f18c6c5c5 (patch) | |
tree | 3f8bc62d1bca80a5df23cb59d2c23105866f2dae /generic/tclBasic.c | |
parent | df89ccaf7788364be35910a9f84ba16a854d1643 (diff) | |
download | tcl-df05056e3fba1a1d7b9cde6fc893514f18c6c5c5.zip tcl-df05056e3fba1a1d7b9cde6fc893514f18c6c5c5.tar.gz tcl-df05056e3fba1a1d7b9cde6fc893514f18c6c5c5.tar.bz2 |
* generic/tclCmdIL.c (InfoBodyCmd): made [info body] return a
string if the body has been bytecompiled.
* generic/tclBasic.c (Tcl_EvalObjEx): added pedantic check for
originating proc body of bytecompiled code, #def'd out as the
change for [info body] should make it unnecessary
* tests/set.test: added test for complex array elem name compiling
* generic/tclCompCmds.c (TclCompileSetCmd): Fixed parsing of array
elements during compiling, and slightly optimised same [Bug: 3889]
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9691459..9968614 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.23 1999/12/12 02:26:40 hobbs Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.24 2000/01/21 02:25:25 hobbs Exp $ */ #include "tclInt.h" @@ -2642,6 +2642,13 @@ Tcl_EvalObjEx(interp, objPtr, flags) * * Precompiled objects, however, are immutable and therefore * they are not recompiled, even if the epoch has changed. + * + * To be pedantically correct, we should also check that the + * originating procPtr is the same as the current context procPtr + * (assuming one exists at all - none for global level). This + * code is #def'ed out because [info body] was changed to never + * return a bytecode type object, which should obviate us from + * the extra checks here. */ if (iPtr->varFramePtr != NULL) { @@ -2655,6 +2662,10 @@ Tcl_EvalObjEx(interp, objPtr, flags) if (((Interp *) *codePtr->interpHandle != iPtr) || (codePtr->compileEpoch != iPtr->compileEpoch) +#ifdef CHECK_PROC_ORIGINATION /* [Bug: 3412 Pedantic] */ + || (codePtr->procPtr != NULL && !(iPtr->varFramePtr && + iPtr->varFramePtr->procPtr == codePtr->procPtr)) +#endif || (codePtr->nsPtr != namespacePtr) || (codePtr->nsEpoch != namespacePtr->resolverEpoch)) { if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { |