summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-11-14 23:05:00 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-11-14 23:05:00 (GMT)
commite9dca7fbd88ce6c7cc5afc264a2c667f5f0d98b6 (patch)
treed61de78a8293a7d2a188189329afca632e2de56d /generic/tclNamesp.c
parent9bdde7aa4d7b94e1801005fcc63f1fe9953d216a (diff)
downloadtcl-e9dca7fbd88ce6c7cc5afc264a2c667f5f0d98b6.zip
tcl-e9dca7fbd88ce6c7cc5afc264a2c667f5f0d98b6.tar.gz
tcl-e9dca7fbd88ce6c7cc5afc264a2c667f5f0d98b6.tar.bz2
Compile [info exists] into bytecode. Includes new instructions to support it.
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index a6f89cf..df5fb56 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -23,7 +23,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.152 2007/11/11 19:32:16 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.153 2007/11/14 23:05:03 dkf Exp $
*/
#include "tclInt.h"
@@ -5352,6 +5352,18 @@ Tcl_SetEnsembleSubcommandList(
ensemblePtr->nsPtr->exportLookupEpoch++;
+ /*
+ * Special hack to make compiling of [info exists] work when the
+ * dictionary is modified.
+ */
+
+ if (cmdPtr->compileProc != NULL) {
+ ((Interp *)interp)->compileEpoch++;
+ if (subcmdList != NULL) {
+ cmdPtr->compileProc = NULL;
+ }
+ }
+
return TCL_OK;
}
@@ -5417,6 +5429,18 @@ Tcl_SetEnsembleMappingDict(
ensemblePtr->nsPtr->exportLookupEpoch++;
+ /*
+ * Special hack to make compiling of [info exists] work when the
+ * dictionary is modified.
+ */
+
+ if (cmdPtr->compileProc != NULL) {
+ ((Interp *)interp)->compileEpoch++;
+ if (mapDict == NULL) {
+ cmdPtr->compileProc = NULL;
+ }
+ }
+
return TCL_OK;
}