summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-11-03 20:21:13 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-11-03 20:21:13 (GMT)
commit259635cd9b7b5e6be9e1bc44a5d2a7d3a2536743 (patch)
treea93fafd75fa76aa22a3b7253e2ce2f08ee98af7b /generic/tclCompile.c
parentecb5e9981dc6a833c08ccd3c8a2aba31db07061d (diff)
downloadtcl-259635cd9b7b5e6be9e1bc44a5d2a7d3a2536743.zip
tcl-259635cd9b7b5e6be9e1bc44a5d2a7d3a2536743.tar.gz
tcl-259635cd9b7b5e6be9e1bc44a5d2a7d3a2536743.tar.bz2
Added compilation of [string last] and improved the compilation of [string range]. This in turn enables compilation of [namespace qualifiers] and [namespace tail] (also done).
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 475a85e..2c87b34 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -453,8 +453,15 @@ InstructionDesc const tclInstructionTable[] = {
/* Find the first index of a needle string in a haystack string,
* producing the index (integer) or -1 if nothing found.
* Stack: ... needle haystack => ... index */
+ {"strrfind", 1, -1, 0, {OPERAND_NONE}},
+ /* Find the last index of a needle string in a haystack string,
+ * producing the index (integer) or -1 if nothing found.
+ * Stack: ... needle haystack => ... index */
{"strrangeImm", 9, 0, 2, {OPERAND_IDX4, OPERAND_IDX4}},
/* String Range: push (string range stktop op4 op4) */
+ {"strrange", 1, -2, 0, {OPERAND_NONE}},
+ /* String Range with non-constant arguments.
+ * Stack: ... string idxA idxB => ... substring */
{"yield", 1, 0, 0, {OPERAND_NONE}},
/* Makes the current coroutine yield the value at the top of the