diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-02-02 16:01:21 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-02-02 16:01:21 (GMT) |
commit | 6376a7f056624dfca2cce996a6ffc44cf931fe45 (patch) | |
tree | 3f87a56a73d52bfcc21f03f1894519de5ba04799 /generic/tclCompile.c | |
parent | eda259d471f64cbaaad3d7cf2dd4da598deaaf37 (diff) | |
parent | 89b7e244580eb2f40d062a73485bff16682d8027 (diff) | |
download | tcl-6376a7f056624dfca2cce996a6ffc44cf931fe45.zip tcl-6376a7f056624dfca2cce996a6ffc44cf931fe45.tar.gz tcl-6376a7f056624dfca2cce996a6ffc44cf931fe45.tar.bz2 |
add compilation of [string is]
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index f75ac83..c5d0107 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -638,6 +638,18 @@ InstructionDesc const tclInstructionTable[] = { * that are the response back on top of the stack when it resumes. * Stack: ... [list ns cmd arg1 ... argN] => ... resumeList */ + {"numericType", 1, 0, 0, {OPERAND_NONE}}, + /* Pushes the numeric type code of the word at the top of the stack. + * Stack: ... value => ... typeCode */ + {"tryCvtToBoolean", 1, +1, 0, {OPERAND_NONE}}, + /* Try converting stktop to boolean if possible. No errors. + * Stack: ... value => ... value isStrictBool */ + {"strclass", 2, 0, 1, {OPERAND_SCLS1}}, + /* See if all the characters of the given string are a member of the + * specified (by opnd) character class. Note that an empty string will + * satisfy the class check (standard definition of "all"). + * Stack: ... stringValue => ... boolean */ + {NULL, 0, 0, 0, {OPERAND_NONE}} }; @@ -5085,6 +5097,11 @@ FormatInstruction( } Tcl_AppendPrintfToObj(bufferObj, "%%v%u ", (unsigned) opnd); break; + case OPERAND_SCLS1: + opnd = TclGetUInt1AtPtr(pc+numBytes); numBytes++; + Tcl_AppendPrintfToObj(bufferObj, "%s ", + tclStringClassTable[opnd].name); + break; case OPERAND_NONE: default: break; |