summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-13 03:33:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-13 03:33:43 (GMT)
commit6fef99593ff6cf1e4f504ca2a9ddabbd0d17c04b (patch)
tree9847cccacf3809c860f8d177d6760aabd8c8bca3 /generic
parentc34e729136c3608344a630fc086235da2a4092e4 (diff)
downloadtcl-6fef99593ff6cf1e4f504ca2a9ddabbd0d17c04b.zip
tcl-6fef99593ff6cf1e4f504ca2a9ddabbd0d17c04b.tar.gz
tcl-6fef99593ff6cf1e4f504ca2a9ddabbd0d17c04b.tar.bz2
More macro use.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c8
-rw-r--r--generic/tclCompExpr.c4
2 files changed, 3 insertions, 9 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 8edb2d9..fdc8ec1 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -2228,7 +2228,7 @@ TclCompileForCmd(
{
Tcl_Token *startTokenPtr, *testTokenPtr, *nextTokenPtr, *bodyTokenPtr;
JumpFixup jumpEvalCondFixup;
- int testCodeOffset, bodyCodeOffset, nextCodeOffset, jumpDist;
+ int bodyCodeOffset, nextCodeOffset, jumpDist;
int bodyRange, nextRange;
DefineLineInformation; /* TIP #280 */
@@ -2309,13 +2309,9 @@ TclCompileForCmd(
* terminates the for.
*/
- testCodeOffset = CurrentOffset(envPtr);
-
- jumpDist = testCodeOffset - jumpEvalCondFixup.codeOffset;
- if (TclFixupForwardJump(envPtr, &jumpEvalCondFixup, jumpDist, 127)) {
+ if (TclFixupForwardJumpToHere(envPtr, &jumpEvalCondFixup, 127)) {
bodyCodeOffset += 3;
nextCodeOffset += 3;
- testCodeOffset += 3;
}
SetLineInformation(2);
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index fce870b..d8e4d9f 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -2361,9 +2361,7 @@ CompileExprTree(
convert = 1;
}
target = jumpPtr->jump.codeOffset + 2;
- if (TclFixupForwardJump(envPtr, &jumpPtr->jump,
- (envPtr->codeNext - envPtr->codeStart)
- - jumpPtr->jump.codeOffset, 127)) {
+ if (TclFixupForwardJumpToHere(envPtr, &jumpPtr->jump, 127)) {
target += 3;
}
freePtr = jumpPtr;