diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-10-30 18:20:28 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-10-30 18:20:28 (GMT) |
commit | f33e163df8aba6bc58d84fc11c3c487e6874ae32 (patch) | |
tree | fbe68dcfedfe80e6188afe653fa790c24ed4e415 /generic/tclCompile.c | |
parent | a0eff2e10d8d67a7d2a9ed66aec116ebf483dfc8 (diff) | |
download | tcl-f33e163df8aba6bc58d84fc11c3c487e6874ae32.zip tcl-f33e163df8aba6bc58d84fc11c3c487e6874ae32.tar.gz tcl-f33e163df8aba6bc58d84fc11c3c487e6874ae32.tar.bz2 |
Compilation of [string first] and [string range] (with constant indices).
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 8b98746..6e2cfae 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -438,7 +438,13 @@ InstructionDesc const tclInstructionTable[] = { {"strmap", 1, -2, 0, {OPERAND_NONE}}, /* Simplified version of [string map] that only applies one change * string, and only case-sensitively. - * Stack: ... from to string => changedString */ + * Stack: ... from to string => ... changedString */ + {"strfind", 1, -1, 0, {OPERAND_NONE}}, + /* 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 */ + {"strrangeImm", 9, 0, 2, {OPERAND_IDX4, OPERAND_IDX4}}, + /* String Range: push (string range stktop op4 op4) */ {"yield", 1, 0, 0, {OPERAND_NONE}}, /* Makes the current coroutine yield the value at the top of the |