summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-03 20:20:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-03 20:20:12 (GMT)
commit46880aeb57e56eadf65fc6aba4c1240513456458 (patch)
treee60f199f37db157823e71a143e6bfd0f0def76ba /generic
parente500dec9fd8fb77231632352b45d2b0b715cdc22 (diff)
parentae02ceb3de605244211918465b4e4662fe14bc98 (diff)
downloadtcl-46880aeb57e56eadf65fc6aba4c1240513456458.zip
tcl-46880aeb57e56eadf65fc6aba4c1240513456458.tar.gz
tcl-46880aeb57e56eadf65fc6aba4c1240513456458.tar.bz2
fix [bc1a96407a]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c8
-rw-r--r--generic/tclTrace.c3
2 files changed, 8 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);
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index c0cde49..6184a89 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -2511,6 +2511,9 @@ TclObjCallVarTraces(
if (!part1Ptr) {
part1Ptr = localName(iPtr->varFramePtr, index);
}
+ if (!part1Ptr) {
+ Tcl_Panic("Cannot trace a variable with no name");
+ }
part1 = TclGetString(part1Ptr);
part2 = part2Ptr? TclGetString(part2Ptr) : NULL;