summaryrefslogtreecommitdiffstats
path: root/generic/tclAssembly.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-10-02 16:51:40 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-10-02 16:51:40 (GMT)
commit571863bdcf20b914cd9320617621672f3a691a3a (patch)
treed946038bd3684c281b5dc824e92f51452830f12d /generic/tclAssembly.c
parent53c93358cf3e60f1bf7b3d5756836d961007213f (diff)
downloadtcl-571863bdcf20b914cd9320617621672f3a691a3a.zip
tcl-571863bdcf20b914cd9320617621672f3a691a3a.tar.gz
tcl-571863bdcf20b914cd9320617621672f3a691a3a.tar.bz2
nop and regexp
Diffstat (limited to 'generic/tclAssembly.c')
-rw-r--r--generic/tclAssembly.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 4797cc8..71e7412 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -228,10 +228,12 @@ TalInstDesc TalInstructionTable[] = {
{"mod", ASSEM_1BYTE, INST_MOD, 2, 1},
{"mult", ASSEM_1BYTE , INST_MULT , 2 , 1},
{"neq", ASSEM_1BYTE , INST_NEQ , 2 , 1},
+ {"nop", ASSEM_1BYTE, INST_NOP, 0, 0},
{"not", ASSEM_1BYTE, INST_LNOT, 1, 1},
{"nsupvar", ASSEM_LVT4, INST_NSUPVAR, 2, 1},
{"over", ASSEM_OVER, INST_OVER, INT_MIN, -1-1},
{"pop", ASSEM_1BYTE , INST_POP , 1 , 0},
+ {"regexp", ASSEM_REGEXP, INST_REGEXP, 2, 1},
{"reverse", ASSEM_REVERSE, INST_REVERSE, INT_MIN, -1-0},
{"rshift", ASSEM_1BYTE , INST_RSHIFT , 2 , 1},
{"store", ASSEM_LVT, (INST_STORE_SCALAR1<<8
@@ -1308,6 +1310,20 @@ AssembleOneLine(AssembleEnv* assemEnvPtr)
BBEmitInstInt4(assemEnvPtr, tblind, opnd, opnd+1);
break;
+ case ASSEM_REGEXP:
+ if (parsePtr->numWords != 2) {
+ Tcl_WrongNumArgs(interp, 1, &instNameObj, "boolean");
+ goto cleanup;
+ }
+ if (GetBooleanOperand(assemEnvPtr, &tokenPtr, &opnd) != TCL_OK) {
+ goto cleanup;
+ }
+ {
+ int flags = TCL_REG_ADVANCED | (opnd ? TCL_REG_NOCASE : 0);
+ BBEmitInstInt1(assemEnvPtr, tblind, flags, 0);
+ }
+ break;
+
case ASSEM_REVERSE:
if (parsePtr->numWords != 2) {
Tcl_WrongNumArgs(interp, 1, &instNameObj, "count");