summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-11-01 18:06:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-11-01 18:06:09 (GMT)
commita7dc229d16889c9f6f66d197d4e0bf1afbec5578 (patch)
tree73c6e63a58a37fcfd2efd533ae233d19a6aa0f0b /generic/tclCompile.c
parent08ba0e902fe194be25319468633409bc90daaf87 (diff)
downloadtcl-a7dc229d16889c9f6f66d197d4e0bf1afbec5578.zip
tcl-a7dc229d16889c9f6f66d197d4e0bf1afbec5578.tar.gz
tcl-a7dc229d16889c9f6f66d197d4e0bf1afbec5578.tar.bz2
Added compilation of [tailcall]. Not a particularly efficient compilation though; it does not detect tailcall-of-self as a special case.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index f979fa3..ee8511c 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -464,6 +464,10 @@ InstructionDesc const tclInstructionTable[] = {
{"coroName", 1, +1, 0, {OPERAND_NONE}},
/* Push the name of the interpreter's current coroutine as an object
* on the stack. */
+ {"tailcall", 2, INT_MIN, 1, {OPERAND_UINT1}},
+ /* Do a tailcall with the opnd items on the stack as the thing to
+ * tailcall to; opnd must be greater than 0 for the semantics to work
+ * right. */
{"currentNamespace", 1, +1, 0, {OPERAND_NONE}},
/* Push the name of the interpreter's current namespace as an object