summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2000-01-21 02:25:24 (GMT)
committerhobbs <hobbs@noemail.net>2000-01-21 02:25:24 (GMT)
commita2f64449e64de862c9657ac5534b2283a1ae7b32 (patch)
tree3f8bc62d1bca80a5df23cb59d2c23105866f2dae /generic/tclBasic.c
parent053b1056da28eb1faadfde0fdc8a6c2162e7f4cd (diff)
downloadtcl-a2f64449e64de862c9657ac5534b2283a1ae7b32.zip
tcl-a2f64449e64de862c9657ac5534b2283a1ae7b32.tar.gz
tcl-a2f64449e64de862c9657ac5534b2283a1ae7b32.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] FossilOrigin-Name: 15c9a98cc96085c2df465b9c553c1108074cf44d
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c13
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) {