diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2012-10-30 18:20:28 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2012-10-30 18:20:28 (GMT) |
| commit | b9ad6bcb39478b669d9edea8671909159766476f (patch) | |
| tree | fbe68dcfedfe80e6188afe653fa790c24ed4e415 /generic/tclCompile.c | |
| parent | 490eafc54d420e306ca0cee33b9430bfd19feb31 (diff) | |
| download | tcl-b9ad6bcb39478b669d9edea8671909159766476f.zip tcl-b9ad6bcb39478b669d9edea8671909159766476f.tar.gz tcl-b9ad6bcb39478b669d9edea8671909159766476f.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 |
