summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-10-02 16:29:42 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-10-02 16:29:42 (GMT)
commit28efdc8a7830a383b4c27727ce1a879727756958 (patch)
tree78ba81a5aec65786bae802dffe6380b52637f19e /generic/tclCompile.c
parent9f6d7b9f3e4e3b2920f51e94c6444e6e41c8e195 (diff)
downloadtcl-28efdc8a7830a383b4c27727ce1a879727756958.zip
tcl-28efdc8a7830a383b4c27727ce1a879727756958.tar.gz
tcl-28efdc8a7830a383b4c27727ce1a879727756958.tar.bz2
Experimental compilation of the [dict with] subcommand. No tests yet, and not
yet certain that the added bytecode opcodes are correct; evaluation is still needed (but the test suite does pass...)
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 026503b..4b5d2bb 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -421,6 +421,16 @@ InstructionDesc const tclInstructionTable[] = {
/* Make general variable cease to exist; unparsed variable name is
* stktop; op1 is 1 for errors on problems, 0 otherwise */
+ {"dictExpand", 1, -1, 0, {OPERAND_NONE}},
+ /* Probe into a dict and extract it (or a subdict of it) into
+ * variables with matched names. Produces list of keys bound as
+ * result. Part of [dict with].
+ * Stack: ... dict path => ... keyList */
+ {"dictRecombine", 1, -3, 0, {OPERAND_NONE}},
+ /* Map variable contents back into a dictionary in a variable. Part of
+ * [dict with].
+ * Stack: ... dictVarName path keyList => ... */
+
{NULL, 0, 0, 0, {OPERAND_NONE}}
};