diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-31 15:59:11 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-31 15:59:11 (GMT) |
| commit | de17b47b9cdeeda185381fe6ccab416af3954253 (patch) | |
| tree | 3b5525ebfd7146d74e826fe27fe1aa8dfc2127f8 | |
| parent | 284dedf155f2929a52b5ccffbe13c1d55a643cb6 (diff) | |
| download | tcl-de17b47b9cdeeda185381fe6ccab416af3954253.zip tcl-de17b47b9cdeeda185381fe6ccab416af3954253.tar.gz tcl-de17b47b9cdeeda185381fe6ccab416af3954253.tar.bz2 | |
more progress
| -rw-r--r-- | generic/tclCompile.c | 16 | ||||
| -rw-r--r-- | generic/tclCompile.h | 8 | ||||
| -rw-r--r-- | generic/tclEnsemble.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a5af54e..1c440e3 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -3419,7 +3419,7 @@ TclCreateExceptRange( auxPtr->supportsContinue = 1; auxPtr->stackDepth = envPtr->currStackDepth; auxPtr->expandTarget = envPtr->expandCount; - auxPtr->expandTargetDepth = -1; + auxPtr->expandTargetDepth = TCL_INDEX_NONE; auxPtr->numBreakTargets = 0; auxPtr->breakTargets = NULL; auxPtr->allocBreakTargets = 0; @@ -3553,7 +3553,7 @@ TclCleanupStackForBreakContinue( CompileEnv *envPtr, ExceptionAux *auxPtr) { - int savedStackDepth = envPtr->currStackDepth; + size_t savedStackDepth = envPtr->currStackDepth; int toPop = envPtr->expandCount - auxPtr->expandTarget; if (toPop > 0) { @@ -4161,8 +4161,8 @@ TclEmitInvoke( &auxContinuePtr); if (rangePtr == NULL || rangePtr->type != LOOP_EXCEPTION_RANGE) { auxContinuePtr = NULL; - } else if (auxContinuePtr->stackDepth == (int)envPtr->currStackDepth-wordCount - && auxContinuePtr->expandTarget == envPtr->expandCount-expandCount) { + } else if (auxContinuePtr->stackDepth == envPtr->currStackDepth-wordCount + && (auxContinuePtr->expandTarget+expandCount == envPtr->expandCount)) { auxContinuePtr = NULL; } else { continueRange = auxContinuePtr - envPtr->exceptAuxArrayPtr; @@ -4172,8 +4172,8 @@ TclEmitInvoke( if (rangePtr == NULL || rangePtr->type != LOOP_EXCEPTION_RANGE) { auxBreakPtr = NULL; } else if (auxContinuePtr == NULL - && auxBreakPtr->stackDepth == (int)envPtr->currStackDepth-wordCount - && auxBreakPtr->expandTarget == envPtr->expandCount-expandCount) { + && auxBreakPtr->stackDepth+wordCount == envPtr->currStackDepth + && auxBreakPtr->expandTarget+expandCount == envPtr->expandCount) { auxBreakPtr = NULL; } else { breakRange = auxBreakPtr - envPtr->exceptAuxArrayPtr; @@ -4219,8 +4219,8 @@ TclEmitInvoke( */ if (auxBreakPtr != NULL || auxContinuePtr != NULL) { - int savedStackDepth = envPtr->currStackDepth; - int savedExpandCount = envPtr->expandCount; + size_t savedStackDepth = envPtr->currStackDepth; + size_t savedExpandCount = envPtr->expandCount; JumpFixup nonTrapFixup; if (auxBreakPtr != NULL) { diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 5f906ac..2173d6a 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -118,16 +118,16 @@ typedef struct ExceptionAux { * one (see [for] next-clause) then we must * not pick up the range when scanning for a * target to continue to. */ - int stackDepth; /* The stack depth at the point where the + size_t stackDepth; /* The stack depth at the point where the * exception range was created. This is used * to calculate the number of POPs required to * restore the stack to its prior state. */ - int expandTarget; /* The number of expansions expected on the + size_t expandTarget; /* The number of expansions expected on the * auxData stack at the time the loop starts; * we can't currently discard them except by * doing INST_INVOKE_EXPANDED; this is a known * problem. */ - int expandTargetDepth; /* The stack depth expected at the outermost + size_t expandTargetDepth; /* The stack depth expected at the outermost * expansion within the loop. Not meaningful * if there are no open expansions between the * looping level and the point of jump @@ -388,7 +388,7 @@ typedef struct CompileEnv { * inefficient. If set to 2, that instruction * should not be issued at all (by the generic * part of the command compiler). */ - int expandCount; /* Number of INST_EXPAND_START instructions + size_t expandCount; /* Number of INST_EXPAND_START instructions * encountered that have not yet been paired * with a corresponding * INST_INVOKE_EXPANDED. */ diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 3c6af3f..634766d 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -3250,7 +3250,7 @@ TclAttemptCompileProc( int result; size_t i; Tcl_Token *saveTokenPtr = parsePtr->tokenPtr; - int savedStackDepth = envPtr->currStackDepth; + size_t savedStackDepth = envPtr->currStackDepth; unsigned savedCodeNext = envPtr->codeNext - envPtr->codeStart; int savedAuxDataArrayNext = envPtr->auxDataArrayNext; size_t savedExceptArrayNext = envPtr->exceptArrayNext; |
