summaryrefslogtreecommitdiffstats
path: root/generic/tclAssembly.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-10-29 20:07:56 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-10-29 20:07:56 (GMT)
commit3b3f0179aee2dce77bfef12308c53429523675bc (patch)
tree828b7eec987390366fbae9386dc035934b7918a3 /generic/tclAssembly.c
parent03ed211908f92573618b54bcd46c162367b1d13d (diff)
downloadtcl-3b3f0179aee2dce77bfef12308c53429523675bc.zip
tcl-3b3f0179aee2dce77bfef12308c53429523675bc.tar.gz
tcl-3b3f0179aee2dce77bfef12308c53429523675bc.tar.bz2
Now do [string toupper], [string tolower] and [string totitle]. Only handles the no-indices case; that's the only case anyone actually commonly uses.
Diffstat (limited to 'generic/tclAssembly.c')
-rw-r--r--generic/tclAssembly.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index b805c63..cd0a42d 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -453,6 +453,9 @@ static const TalInstDesc TalInstructionTable[] = {
| INST_STORE_ARRAY4), 2, 1},
{"storeArrayStk", ASSEM_1BYTE, INST_STORE_ARRAY_STK, 3, 1},
{"storeStk", ASSEM_1BYTE, INST_STORE_STK, 2, 1},
+ {"strLower", ASSEM_1BYTE, INST_STR_LOWER, 1, 1},
+ {"strTitle", ASSEM_1BYTE, INST_STR_TITLE, 1, 1},
+ {"strUpper", ASSEM_1BYTE, INST_STR_UPPER, 1, 1},
{"strcmp", ASSEM_1BYTE, INST_STR_CMP, 2, 1},
{"strcat", ASSEM_CONCAT1, INST_STR_CONCAT1, INT_MIN,1},
{"streq", ASSEM_1BYTE, INST_STR_EQ, 2, 1},
@@ -464,9 +467,9 @@ static const TalInstDesc TalInstructionTable[] = {
{"strneq", ASSEM_1BYTE, INST_STR_NEQ, 2, 1},
{"strrange", ASSEM_1BYTE, INST_STR_RANGE, 3, 1},
{"strrfind", ASSEM_1BYTE, INST_STR_FIND_LAST, 2, 1},
- {"strtrim", ASSEM_1BYTE, INST_STRTRIM, 2, 1},
- {"strtrimLeft", ASSEM_1BYTE, INST_STRTRIM_LEFT, 2, 1},
- {"strtrimRight", ASSEM_1BYTE, INST_STRTRIM_RIGHT, 2, 1},
+ {"strtrim", ASSEM_1BYTE, INST_STR_TRIM, 2, 1},
+ {"strtrimLeft", ASSEM_1BYTE, INST_STR_TRIM_LEFT, 2, 1},
+ {"strtrimRight", ASSEM_1BYTE, INST_STR_TRIM_RIGHT, 2, 1},
{"sub", ASSEM_1BYTE, INST_SUB, 2, 1},
{"tclooClass", ASSEM_1BYTE, INST_TCLOO_CLASS, 1, 1},
{"tclooIsObject", ASSEM_1BYTE, INST_TCLOO_IS_OBJECT, 1, 1},
@@ -509,8 +512,9 @@ static const unsigned char NonThrowingByteCodes[] = {
INST_NS_CURRENT, /* 151 */
INST_INFO_LEVEL_NUM, /* 152 */
INST_RESOLVE_COMMAND, /* 154 */
- INST_STRTRIM, INST_STRTRIM_LEFT, INST_STRTRIM_RIGHT, /* 166-168 */
- INST_CONCAT_STK /* 169 */
+ INST_STR_TRIM, INST_STR_TRIM_LEFT, INST_STR_TRIM_RIGHT, /* 166-168 */
+ INST_CONCAT_STK, /* 169 */
+ INST_STR_UPPER, INST_STR_LOWER, INST_STR_TITLE /* 170-172 */
};
/*