summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-11 05:07:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-11 05:07:52 (GMT)
commit23bb5a2c20bd07e4b66ad4293fb927128e9e975b (patch)
treef87b6d8500e662ad5e4efb9293f1597a1eaa30ea /generic
parent7eabd2838a8210a30da24672179294fd7d8b1b0a (diff)
downloadtcl-23bb5a2c20bd07e4b66ad4293fb927128e9e975b.zip
tcl-23bb5a2c20bd07e4b66ad4293fb927128e9e975b.tar.gz
tcl-23bb5a2c20bd07e4b66ad4293fb927128e9e975b.tar.bz2
Eliminate another surplus storage field. Make a(n ab)use of the existing
JumpFixup fields instead.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompExpr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 0021323..4afb069 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -490,9 +490,6 @@ typedef struct JumpList {
JumpFixup jump; /* Pass this argument to matching calls of
* TclEmitForwardJump() and
* TclFixupForwardJump(). */
- int convert; /* Temporary storage used to compute whether
- * numeric conversion will be needed following
- * the operator we're compiling. */
struct JumpList *next; /* Point to next item on the stack */
} JumpList;
@@ -2318,7 +2315,9 @@ CompileExprTree(
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP,
&jumpPtr->next->jump);
TclAdjustStackDepth(-1, envPtr);
- jumpPtr->convert = convert;
+ if (convert) {
+ jumpPtr->jump.jumpType = TCL_TRUE_JUMP;
+ }
convert = 1;
break;
case AND:
@@ -2368,6 +2367,10 @@ CompileExprTree(
break;
case COLON:
CLANG_ASSERT(jumpPtr);
+ if (jumpPtr->jump.jumpType == TCL_TRUE_JUMP) {
+ jumpPtr->jump.jumpType = TCL_FALSE_JUMP;
+ convert = 1;
+ }
if (TclFixupForwardJump(envPtr, &jumpPtr->next->jump,
(envPtr->codeNext - envPtr->codeStart)
- jumpPtr->next->jump.codeOffset, 127)) {
@@ -2375,7 +2378,6 @@ CompileExprTree(
}
TclFixupForwardJump(envPtr, &jumpPtr->jump,
jumpPtr->next->jump.codeOffset + 2 -jumpPtr->jump.codeOffset, 127);
- convert |= jumpPtr->convert;
freePtr = jumpPtr;
jumpPtr = jumpPtr->next;
TclStackFree(interp, freePtr);