diff options
author | dgp <dgp@users.sourceforge.net> | 2013-09-11 04:49:08 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-09-11 04:49:08 (GMT) |
commit | 7eabd2838a8210a30da24672179294fd7d8b1b0a (patch) | |
tree | ee9d15b2246dfb0db3931b2404e58deca134ca59 /generic | |
parent | 28bb618586416fbb3c1c9a710cf88e5f8d924025 (diff) | |
download | tcl-7eabd2838a8210a30da24672179294fd7d8b1b0a.zip tcl-7eabd2838a8210a30da24672179294fd7d8b1b0a.tar.gz tcl-7eabd2838a8210a30da24672179294fd7d8b1b0a.tar.bz2 |
Make use of the existing JumpFixup fields. Eliminate extra storage
field 'offset' in JumpList that we don't require.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompExpr.c | 7 |
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; |