summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-05-15 20:32:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-05-15 20:32:49 (GMT)
commit55e73ff44afabd27feca562bf4a350d4d85cd380 (patch)
tree423a15397c0883844ee4a1f50efdfc6a31d18a25 /generic
parenta9dd569f8e5f2c3485e48f6314f03200876e0c2d (diff)
downloadtcl-dgp_compile_list_shimmer.zip
tcl-dgp_compile_list_shimmer.tar.gz
tcl-dgp_compile_list_shimmer.tar.bz2
Unless I'm missing something, this patch to TclCompileListCmd() shoulddgp_compile_list_shimmer
eliminate pointless, wasteful shimmering, and generate simpler bytecode.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index a5678bf..d0a8349 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -4498,6 +4498,7 @@ TclCompileListCmd(
valueTokenPtr = TokenAfter(valueTokenPtr);
}
if (listObj != NULL) {
+#if 0
int len;
const char *bytes = Tcl_GetStringFromObj(listObj, &len);
@@ -4512,6 +4513,9 @@ TclCompileListCmd(
TclEmitOpcode( INST_LIST_LENGTH, envPtr);
TclEmitOpcode( INST_POP, envPtr);
}
+#else
+ TclEmitPush(TclAddLiteralObj(envPtr, listObj, NULL), envPtr);
+#endif
return TCL_OK;
}