summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2014-01-22 09:11:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2014-01-22 09:11:07 (GMT)
commit3a8a86bb0ac1f0fdacfe168f40f02bd6f2137b35 (patch)
tree03b33f1323fd08527a41a77d8b05f1cb85346131 /generic/tclCompile.c
parent440580a4ca2cafdfea33b72268105d19cba4098c (diff)
parent78a75740ae5c82cc161e49e5e28a306fa9f2a580 (diff)
downloadtcl-3a8a86bb0ac1f0fdacfe168f40f02bd6f2137b35.zip
tcl-3a8a86bb0ac1f0fdacfe168f40f02bd6f2137b35.tar.gz
tcl-3a8a86bb0ac1f0fdacfe168f40f02bd6f2137b35.tar.bz2
add compilation for [nextto] and [yieldto]; fix [a90d9331bc]
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index ee67e24..f75ac83 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -618,8 +618,25 @@ InstructionDesc const tclInstructionTable[] = {
* Stack: ... cmdName => ... fullOriginalCmdName */
{"tclooNext", 2, INT_MIN, 1, {OPERAND_UINT1}},
- /* Push the identity of the current TclOO object (i.e., the name of
- * its current public access command) on the stack. */
+ /* Call the next item on the TclOO call chain, passing opnd arguments
+ * (min 1, max 255, *includes* "next"). The result of the invoked
+ * method implementation will be pushed on the stack in place of the
+ * arguments (similar to invokeStk).
+ * Stack: ... "next" arg2 arg3 -- argN => ... result */
+ {"tclooNextClass", 2, INT_MIN, 1, {OPERAND_UINT1}},
+ /* Call the following item on the TclOO call chain defined by class
+ * className, passing opnd arguments (min 2, max 255, *includes*
+ * "nextto" and the class name). The result of the invoked method
+ * implementation will be pushed on the stack in place of the
+ * arguments (similar to invokeStk).
+ * Stack: ... "nextto" className arg3 arg4 -- argN => ... result */
+
+ {"yieldToInvoke", 1, 0, 0, {OPERAND_NONE}},
+ /* Makes the current coroutine yield the value at the top of the
+ * stack, invoking the given command/args with resolution in the given
+ * namespace (all packed into a list), and places the list of values
+ * that are the response back on top of the stack when it resumes.
+ * Stack: ... [list ns cmd arg1 ... argN] => ... resumeList */
{NULL, 0, 0, 0, {OPERAND_NONE}}
};