diff options
| -rw-r--r-- | generic/tclAssembly.c | 4 | ||||
| -rw-r--r-- | generic/tclCompile.h | 10 | ||||
| -rw-r--r-- | generic/tclExecute.c | 10 | ||||
| -rw-r--r-- | generic/tclOptimize.c | 4 | ||||
| -rw-r--r-- | tests/assemble.test | 24 |
5 files changed, 29 insertions, 23 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index bdca74c..66a9660 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -406,7 +406,7 @@ static const TalInstDesc TalInstructionTable[] = { {"jumpTrue", ASSEM_JUMP, INST_JUMP_TRUE1, 1, 0}, {"jumpTrue4", ASSEM_JUMP4, INST_JUMP_TRUE4, 1, 0}, {"label", ASSEM_LABEL, 0, 0, 0}, - {"land", ASSEM_1BYTE, INST_LAND, 2, 1}, +// {"land", ASSEM_1BYTE, INST_LAND, 2, 1}, {"lappend", ASSEM_LVT, (INST_LAPPEND_SCALAR1<<8 | INST_LAPPEND_SCALAR4), 1, 1}, @@ -434,7 +434,7 @@ static const TalInstDesc TalInstructionTable[] = { | INST_LOAD_ARRAY4), 1, 1}, {"loadArrayStk", ASSEM_1BYTE, INST_LOAD_ARRAY_STK, 2, 1}, {"loadStk", ASSEM_1BYTE, INST_LOAD_STK, 1, 1}, - {"lor", ASSEM_1BYTE, INST_LOR, 2, 1}, +// {"lor", ASSEM_1BYTE, INST_LOR, 2, 1}, {"lsetFlat", ASSEM_LSET_FLAT,INST_LSET_FLAT, INT_MIN,1}, {"lsetList", ASSEM_1BYTE, INST_LSET_LIST, 3, 1}, {"lshift", ASSEM_1BYTE, INST_LSHIFT, 2, 1}, diff --git a/generic/tclCompile.h b/generic/tclCompile.h index cf9b17c..705b2cd 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -572,8 +572,8 @@ typedef struct ByteCode { #define INST_JUMP_FALSE4 39 /* Opcodes 40 to 64 */ -#define INST_LOR 40 -#define INST_LAND 41 +//#define INST_LOR 40 +//#define INST_LAND 41 #define INST_BITOR 42 #define INST_BITXOR 43 #define INST_BITAND 44 @@ -601,8 +601,8 @@ typedef struct ByteCode { #define INST_CONTINUE 66 /* Opcodes 67 to 68 */ -#define INST_FOREACH_START4 67 /* DEPRECATED */ -#define INST_FOREACH_STEP4 68 /* DEPRECATED */ +//#define INST_FOREACH_START4 67 /* DEPRECATED */ +//#define INST_FOREACH_STEP4 68 /* DEPRECATED */ /* Opcodes 69 to 72 */ #define INST_BEGIN_CATCH4 69 @@ -694,7 +694,7 @@ typedef struct ByteCode { #define INST_DICT_LAPPEND 115 #define INST_DICT_FIRST 116 #define INST_DICT_NEXT 117 -#define INST_DICT_DONE 118 +//#define INST_DICT_DONE 118 #define INST_DICT_UPDATE_START 119 #define INST_DICT_UPDATE_END 120 diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 83a5815..4cd4184 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -77,7 +77,7 @@ int tclTraceExec = 0; */ static const char *const operatorStrings[] = { - "||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", + "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", "+", "-", "*", "/", "%", "+", "-", "~", "!" }; @@ -3825,6 +3825,7 @@ TEBCresume( * This is really an unset operation these days. Do not issue. */ +#if 0 case INST_DICT_DONE: opnd = TclGetUInt4AtPtr(pc+1); TRACE(("%u => OK\n", opnd)); @@ -3844,6 +3845,7 @@ TEBCresume( } NEXT_INST_F(5, 0, 0); } +#endif /* * End of INST_UNSET instructions. @@ -4173,6 +4175,7 @@ TEBCresume( * and LAND is now handled by the expression compiler. */ +#if 0 case INST_LOR: case INST_LAND: { /* @@ -4211,6 +4214,7 @@ TEBCresume( TRACE(("%.20s %.20s => %d\n", O2S(valuePtr),O2S(value2Ptr),iResult)); NEXT_INST_F(1, 2, 1); } +#endif /* * ----------------------------------------------------------------- @@ -6321,6 +6325,7 @@ TEBCresume( TRACE(("=> CONTINUE!\n")); goto processExceptionReturn; +#if 0 { ForeachInfo *infoPtr; Var *iterVarPtr, *listVarPtr; @@ -6485,6 +6490,7 @@ TEBCresume( } } +#endif { ForeachInfo *infoPtr; Tcl_Obj *listPtr, **elements, *tmpPtr; @@ -9118,7 +9124,7 @@ IllegalExprOperandType( if (opcode == INST_EXPON) { operator = "**"; } else if (opcode <= INST_LNOT) { - operator = operatorStrings[opcode - INST_LOR]; + operator = operatorStrings[opcode - INST_BITOR]; } if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) { diff --git a/generic/tclOptimize.c b/generic/tclOptimize.c index 8267a7d..48523d0 100644 --- a/generic/tclOptimize.c +++ b/generic/tclOptimize.c @@ -287,8 +287,8 @@ ConvertZeroEffectToNOP( case INST_INCR_ARRAY_STK: case INST_INCR_SCALAR_STK: case INST_INCR_STK: - case INST_LOR: - case INST_LAND: +// case INST_LOR: +// case INST_LAND: case INST_EQ: case INST_NEQ: case INST_LT: diff --git a/tests/assemble.test b/tests/assemble.test index 004d04d..ab7e923 100644 --- a/tests/assemble.test +++ b/tests/assemble.test @@ -532,18 +532,18 @@ test assemble-7.16 {incrStk} { -result 12 -cleanup {rename x {}} } -test assemble-7.17 {land/lor} { - -body { - proc x {a b} { - list \ - [assemble {load a; load b; land}] \ - [assemble {load a; load b; lor}] - } - list [x 0 0] [x 0 23] [x 35 0] [x 47 59] - } - -result {{0 0} {0 1} {0 1} {1 1}} - -cleanup {rename x {}} -} +#test assemble-7.17 {land/lor} { +# -body { +# proc x {a b} { +# list \ +# [assemble {load a; load b; land}] \ +# [assemble {load a; load b; lor}] +# } +# list [x 0 0] [x 0 23] [x 35 0] [x 47 59] +# } +# -result {{0 0} {0 1} {0 1} {1 1}} +# -cleanup {rename x {}} +#} test assemble-7.18 {lappendArrayStk} { -body { proc x {} { |
