summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsSZ.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCompCmdsSZ.c')
-rw-r--r--generic/tclCompCmdsSZ.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 9c93fb2..71a1dfc 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -836,6 +836,21 @@ TclSubstCompile(
TclEmitPush(literal, envPtr);
count++;
continue;
+ case TCL_TOKEN_VARIABLE:
+ /*
+ * Simple variable access; can only generate TCL_OK or TCL_ERROR
+ * so no need to generate elaborate exception-management code.
+ */
+
+ if (tokenPtr->numComponents == 1 || (tokenPtr->numComponents == 2
+ && tokenPtr[2].type == TCL_TOKEN_TEXT)) {
+ envPtr->line = bline;
+ TclCompileVarSubst(interp, tokenPtr, envPtr);
+ bline = envPtr->line;
+ count++;
+ continue;
+ }
+ break;
}
while (count > 255) {