summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-02 21:40:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-02 21:40:13 (GMT)
commit5190862515e3cf2477b403402c70b1c25db282fa (patch)
tree2a0f814d261f0fb221dda504b024bb0214c7e72e /generic/tclCompCmds.c
parentb6d046213b7d8a18051b7b0992c6bc1516e4ed2a (diff)
downloadtcl-5190862515e3cf2477b403402c70b1c25db282fa.zip
tcl-5190862515e3cf2477b403402c70b1c25db282fa.tar.gz
tcl-5190862515e3cf2477b403402c70b1c25db282fa.tar.bz2
Possible fix for testing.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 496d44f..18f4564 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -301,7 +301,8 @@ TclCompileArraySetCmd(
* a proc, we cannot do a better compile than generic.
*/
- if (envPtr->procPtr == NULL && !(isDataEven && len == 0)) {
+ if ((varTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) ||
+ (envPtr->procPtr == NULL && !(isDataEven && len == 0))) {
code = TclCompileBasic2ArgCmd(interp, parsePtr, cmdPtr, envPtr);
goto done;
}
@@ -342,8 +343,9 @@ TclCompileArraySetCmd(
* a non-local variable: upvar from a local one! This consumes the
* variable name that was left at stacktop.
*/
-
- localIndex = AnonymousLocal(envPtr);
+
+ localIndex = TclFindCompiledLocal(varTokenPtr->start,
+ varTokenPtr->size, 1, envPtr);
PushStringLiteral(envPtr, "0");
TclEmitInstInt4(INST_REVERSE, 2, envPtr);
TclEmitInstInt4(INST_UPVAR, localIndex, envPtr);