summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2014-07-18 12:18:44 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2014-07-18 12:18:44 (GMT)
commit1bd8f407a5fc44a8b7a54bb78d8d29a2e5b0358f (patch)
tree7890c00992d3108408334969e5732ec921ecca15 /generic/tclCompile.c
parent0cb480df70afc69c2a1637894dddd3f0b4e6d351 (diff)
downloadtcl-1bd8f407a5fc44a8b7a54bb78d8d29a2e5b0358f.zip
tcl-1bd8f407a5fc44a8b7a54bb78d8d29a2e5b0358f.tar.gz
tcl-1bd8f407a5fc44a8b7a54bb78d8d29a2e5b0358f.tar.bz2
[b43f2b49f7] New compilation strategy for lappend that allows multi-value
lappend to not have quadratic performance (through better reference management).
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 347e3f0..838b195 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -650,6 +650,19 @@ InstructionDesc const tclInstructionTable[] = {
* satisfy the class check (standard definition of "all").
* Stack: ... stringValue => ... boolean */
+ {"lappendList", 5, 0, 1, {OPERAND_LVT4}},
+ /* Lappend list to scalar variable at op4 in frame.
+ * Stack: ... list => ... listVarContents */
+ {"lappendListArray", 5, -1, 1, {OPERAND_LVT4}},
+ /* Lappend list to array element; array at op4.
+ * Stack: ... elem list => ... listVarContents */
+ {"lappendListArrayStk", 1, -2, 0, {OPERAND_NONE}},
+ /* Lappend list to array element.
+ * Stack: ... arrayName elem list => ... listVarContents */
+ {"lappendListStk", 1, -1, 0, {OPERAND_NONE}},
+ /* Lappend list to general variable.
+ * Stack: ... varName list => ... listVarContents */
+
{NULL, 0, 0, 0, {OPERAND_NONE}}
};