summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
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;