summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2013-09-11 04:49:08 (GMT)
committerdgp@users.sourceforge.net <dgp>2013-09-11 04:49:08 (GMT)
commit7878aa9218242a3c145b94473c08d751aad9eb89 (patch)
treeee9d15b2246dfb0db3931b2404e58deca134ca59
parent59f4a5f08bd4a47ac5b7e73aec9067508250a2ba (diff)
downloadtcl-7878aa9218242a3c145b94473c08d751aad9eb89.zip
tcl-7878aa9218242a3c145b94473c08d751aad9eb89.tar.gz
tcl-7878aa9218242a3c145b94473c08d751aad9eb89.tar.bz2
Make use of the existing JumpFixup fields. Eliminate extra storage
field 'offset' in JumpList that we don't require.
-rw-r--r--generic/tclCompExpr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index c2b5a1a..0021323 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -490,8 +490,6 @@ typedef struct JumpList {
JumpFixup jump; /* Pass this argument to matching calls of
* TclEmitForwardJump() and
* TclFixupForwardJump(). */
- int offset; /* Data used to compute jump lengths to pass
- * to TclFixupForwardJump() */
int convert; /* Temporary storage used to compute whether
* numeric conversion will be needed following
* the operator we're compiling. */
@@ -2320,7 +2318,6 @@ CompileExprTree(
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP,
&jumpPtr->next->jump);
TclAdjustStackDepth(-1, envPtr);
- jumpPtr->offset = (envPtr->codeNext - envPtr->codeStart);
jumpPtr->convert = convert;
convert = 1;
break;
@@ -2374,10 +2371,10 @@ CompileExprTree(
if (TclFixupForwardJump(envPtr, &jumpPtr->next->jump,
(envPtr->codeNext - envPtr->codeStart)
- jumpPtr->next->jump.codeOffset, 127)) {
- jumpPtr->offset += 3;
+ jumpPtr->next->jump.codeOffset += 3;
}
TclFixupForwardJump(envPtr, &jumpPtr->jump,
- jumpPtr->offset - jumpPtr->jump.codeOffset, 127);
+ jumpPtr->next->jump.codeOffset + 2 -jumpPtr->jump.codeOffset, 127);
convert |= jumpPtr->convert;
freePtr = jumpPtr;
jumpPtr = jumpPtr->next;