diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-29 10:37:35 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-29 10:37:35 (GMT) |
| commit | 432fbdc37562b215a1955ebc8c5af4aadd24315a (patch) | |
| tree | 9d2b39b23907040168cf9a5971250dfb2288a196 | |
| parent | 52015b6d7bd6f89ac7083fff270c15e7df5b19ec (diff) | |
| download | tcl-432fbdc37562b215a1955ebc8c5af4aadd24315a.zip tcl-432fbdc37562b215a1955ebc8c5af4aadd24315a.tar.gz tcl-432fbdc37562b215a1955ebc8c5af4aadd24315a.tar.bz2 | |
More progress
| -rw-r--r-- | generic/tclAssembly.c | 6 | ||||
| -rw-r--r-- | generic/tclBasic.c | 6 | ||||
| -rw-r--r-- | generic/tclCompCmds.c | 8 | ||||
| -rw-r--r-- | generic/tclCompCmdsGR.c | 10 | ||||
| -rw-r--r-- | generic/tclCompCmdsSZ.c | 20 | ||||
| -rw-r--r-- | generic/tclCompExpr.c | 14 | ||||
| -rw-r--r-- | generic/tclCompile.c | 12 | ||||
| -rw-r--r-- | generic/tclCompile.h | 8 | ||||
| -rw-r--r-- | generic/tclDisassemble.c | 4 | ||||
| -rw-r--r-- | generic/tclEnsemble.c | 12 | ||||
| -rw-r--r-- | generic/tclExecute.c | 6 | ||||
| -rw-r--r-- | generic/tclOptimize.c | 6 | ||||
| -rw-r--r-- | generic/tclParse.c | 22 | ||||
| -rw-r--r-- | generic/tclProc.c | 2 |
14 files changed, 68 insertions, 68 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 8560843..6027741 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -1075,7 +1075,7 @@ TclAssembleCode( */ if ((int)parsePtr->numWords > 0) { - size_t instLen = (int)parsePtr->commandSize; + size_t instLen = parsePtr->commandSize; /* Length in bytes of the current command */ if (parsePtr->term == parsePtr->commandStart + instLen - 1) { @@ -4011,7 +4011,7 @@ UnstackExpiredCatches( --catchDepth; if (catches[catchDepth] != NULL) { range = envPtr->exceptArrayPtr + catchIndices[catchDepth]; - range->numCodeBytes = bbPtr->startOffset - (int)range->codeOffset; + range->numCodeBytes = bbPtr->startOffset - range->codeOffset; catches[catchDepth] = NULL; catchIndices[catchDepth] = -1; } @@ -4030,7 +4030,7 @@ UnstackExpiredCatches( if (catches[catchDepth] != NULL) { if (catches[catchDepth] != block || catchState >= BBCS_CAUGHT) { range = envPtr->exceptArrayPtr + catchIndices[catchDepth]; - range->numCodeBytes = bbPtr->startOffset - (int)range->codeOffset; + range->numCodeBytes = bbPtr->startOffset - range->codeOffset; catches[catchDepth] = NULL; catchIndices[catchDepth] = -1; } diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ae89552..7d09caf 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -5302,7 +5302,7 @@ TclEvalEx( eeFramePtr->len = parsePtr->commandSize; if (parsePtr->term == - parsePtr->commandStart + (int)parsePtr->commandSize - 1) { + parsePtr->commandStart + parsePtr->commandSize - 1) { eeFramePtr->len--; } @@ -5353,7 +5353,7 @@ TclEvalEx( * executed command. */ - next = parsePtr->commandStart + (int)parsePtr->commandSize; + next = parsePtr->commandStart + parsePtr->commandSize; bytesLeft -= next - p; p = next; TclAdvanceLines(&line, parsePtr->commandStart, p); @@ -5379,7 +5379,7 @@ TclEvalEx( } } if ((code == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { - commandLength = (int)parsePtr->commandSize; + commandLength = parsePtr->commandSize; if (parsePtr->term == parsePtr->commandStart + commandLength - 1) { /* * The terminator character (such as ; or ]) of the command where diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 7d1fbb9..4cc6a81 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -759,7 +759,7 @@ TclCompileClockClicksCmd( { Tcl_Token* tokenPtr; - switch ((int)parsePtr->numWords) { + switch (parsePtr->numWords) { case 1: /* * No args @@ -1773,7 +1773,7 @@ TclCompileDictUpdateCmd( if (((int)parsePtr->numWords - 1) & 1) { return TCL_ERROR; } - numVars = ((int)parsePtr->numWords - 3) / 2; + numVars = (parsePtr->numWords - 3) / 2; /* * The dictionary variable must be a local scalar that is knowable at @@ -1840,7 +1840,7 @@ TclCompileDictUpdateCmd( TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr); ExceptionRangeStarts(envPtr, range); - BODY(bodyTokenPtr, (int)parsePtr->numWords - 1); + BODY(bodyTokenPtr, parsePtr->numWords - 1); ExceptionRangeEnds(envPtr, range); /* @@ -2184,7 +2184,7 @@ TclCompileDictWithCmd( TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr); ExceptionRangeStarts(envPtr, range); - BODY(tokenPtr, (int)parsePtr->numWords - 1); + BODY(tokenPtr, parsePtr->numWords - 1); ExceptionRangeEnds(envPtr, range); /* diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index 207b247..8202fa2 100644 --- a/generic/tclCompCmdsGR.c +++ b/generic/tclCompCmdsGR.c @@ -1669,9 +1669,9 @@ TclCompileLsetCmd( if (localIndex < 0) { if (isScalar) { - tempDepth = (int)parsePtr->numWords - 2; + tempDepth = parsePtr->numWords - 2; } else { - tempDepth = (int)parsePtr->numWords - 1; + tempDepth = parsePtr->numWords - 1; } TclEmitInstInt4( INST_OVER, tempDepth, envPtr); } @@ -1682,9 +1682,9 @@ TclCompileLsetCmd( if (!isScalar) { if (localIndex < 0) { - tempDepth = (int)parsePtr->numWords - 1; + tempDepth = parsePtr->numWords - 1; } else { - tempDepth = (int)parsePtr->numWords - 2; + tempDepth = parsePtr->numWords - 2; } TclEmitInstInt4( INST_OVER, tempDepth, envPtr); } @@ -1714,7 +1714,7 @@ TclCompileLsetCmd( if (parsePtr->numWords == 4) { TclEmitOpcode( INST_LSET_LIST, envPtr); } else { - TclEmitInstInt4( INST_LSET_FLAT, (int)parsePtr->numWords-1, envPtr); + TclEmitInstInt4( INST_LSET_FLAT, parsePtr->numWords-1, envPtr); } /* diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 66b72c0..bdbde04 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -133,7 +133,7 @@ TclCompileSetCmd( Tcl_Token *varTokenPtr, *valueTokenPtr; int isAssignment, isScalar, localIndex, numWords; - numWords = (int)parsePtr->numWords; + numWords = parsePtr->numWords; if ((numWords != 2) && (numWords != 3)) { return TCL_ERROR; } @@ -223,7 +223,7 @@ TclCompileStringCatCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { DefineLineInformation; /* TIP #280 */ - int i, numWords = (int)parsePtr->numWords, numArgs; + int i, numWords = parsePtr->numWords, numArgs; Tcl_Token *wordTokenPtr; Tcl_Obj *obj, *folded; @@ -523,7 +523,7 @@ TclCompileStringIsCmd( InstStringClassType strClassType; Tcl_Obj *isClass; - if ((int)parsePtr->numWords < 3 || (int)parsePtr->numWords > 6) { + if (parsePtr->numWords < 3 || parsePtr->numWords > 6) { return TCL_ERROR; } TclNewObj(isClass); @@ -798,7 +798,7 @@ TclCompileStringMatchCmd( int i, exactMatch = 0, nocase = 0; const char *str; - if ((int)parsePtr->numWords < 3 || (int)parsePtr->numWords > 4) { + if (parsePtr->numWords < 3 || parsePtr->numWords > 4) { return TCL_ERROR; } tokenPtr = TokenAfter(parsePtr->tokenPtr); @@ -1452,7 +1452,7 @@ TclCompileSubstCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { DefineLineInformation; /* TIP #280 */ - int numArgs = (int)parsePtr->numWords - 1; + int numArgs = parsePtr->numWords - 1; int numOpts = numArgs - 1; int objc, flags = TCL_SUBST_ALL; Tcl_Obj **objv/*, *toSubst = NULL*/; @@ -1822,7 +1822,7 @@ TclCompileSwitchCmd( tokenPtr = TokenAfter(parsePtr->tokenPtr); valueIndex = 1; - numWords = (int)parsePtr->numWords-1; + numWords = parsePtr->numWords-1; /* * Check for options. @@ -2664,7 +2664,7 @@ TclCompileTailcallCmd( Tcl_Token *tokenPtr = parsePtr->tokenPtr; int i; - if ((int)parsePtr->numWords < 2 || (int)parsePtr->numWords > 256 + if (parsePtr->numWords < 2 || parsePtr->numWords > 256 || envPtr->procPtr == NULL) { return TCL_ERROR; } @@ -2707,7 +2707,7 @@ TclCompileThrowCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { DefineLineInformation; /* TIP #280 */ - int numWords = (int)parsePtr->numWords; + int numWords = parsePtr->numWords; Tcl_Token *codeToken, *msgToken; Tcl_Obj *objPtr; int codeKnown, codeIsList, codeIsValid; @@ -2810,7 +2810,7 @@ TclCompileTryCmd( TCL_UNUSED(Command *), CompileEnv *envPtr) /* Holds resulting instructions. */ { - int numWords = (int)parsePtr->numWords, numHandlers, result = TCL_ERROR; + int numWords = parsePtr->numWords, numHandlers, result = TCL_ERROR; Tcl_Token *bodyToken, *finallyToken, *tokenPtr; Tcl_Token **handlerTokens = NULL; Tcl_Obj **matchClauses = NULL; @@ -3936,7 +3936,7 @@ TclCompileYieldCmd( TCL_UNUSED(Command *), CompileEnv *envPtr) /* Holds resulting instructions. */ { - if ((int)parsePtr->numWords < 1 || (int)parsePtr->numWords > 2) { + if (parsePtr->numWords < 1 || parsePtr->numWords > 2) { return TCL_ERROR; } diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 12a88b7..1ed20b9 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -915,7 +915,7 @@ ParseExpr( */ TclGrowParseTokenArray(parsePtr, 2); - wordIndex = (int)parsePtr->numTokens; + wordIndex = parsePtr->numTokens; tokenPtr = parsePtr->tokenPtr + wordIndex; tokenPtr->type = TCL_TOKEN_WORD; tokenPtr->start = start; @@ -955,7 +955,7 @@ ParseExpr( Tcl_Parse *nestedPtr = (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); - tokenPtr = parsePtr->tokenPtr + (int)parsePtr->numTokens; + tokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; tokenPtr->type = TCL_TOKEN_COMMAND; tokenPtr->start = start; tokenPtr->numComponents = 0; @@ -1023,7 +1023,7 @@ ParseExpr( tokenPtr = parsePtr->tokenPtr + wordIndex; tokenPtr->size = scanned; - tokenPtr->numComponents = (int)parsePtr->numTokens - wordIndex - 1; + tokenPtr->numComponents = parsePtr->numTokens - wordIndex - 1; if (!parseOnly && ((lexeme == QUOTED) || (lexeme == BRACED))) { /* * When this expression is destined to be compiled, and a @@ -1560,7 +1560,7 @@ ConvertTreeToTokens( scanned = ParseLexeme(start, numBytes, &lexeme, NULL); TclGrowParseTokenArray(parsePtr, 2); - subExprTokenPtr = parsePtr->tokenPtr + (int)parsePtr->numTokens; + subExprTokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR; subExprTokenPtr->start = start; subExprTokenPtr->size = scanned; @@ -1599,7 +1599,7 @@ ConvertTreeToTokens( */ TclGrowParseTokenArray(parsePtr, toCopy); - subExprTokenPtr = parsePtr->tokenPtr + (int)parsePtr->numTokens; + subExprTokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; memcpy(subExprTokenPtr, tokenPtr, toCopy * sizeof(Tcl_Token)); subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR; @@ -1612,7 +1612,7 @@ ConvertTreeToTokens( */ TclGrowParseTokenArray(parsePtr, toCopy+1); - subExprTokenPtr = parsePtr->tokenPtr + (int)parsePtr->numTokens; + subExprTokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; *subExprTokenPtr = *tokenPtr; subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR; subExprTokenPtr->numComponents++; @@ -1678,7 +1678,7 @@ ConvertTreeToTokens( */ TclGrowParseTokenArray(parsePtr, 2); - subExprTokenIdx = (int)parsePtr->numTokens; + subExprTokenIdx = parsePtr->numTokens; subExprTokenPtr = parsePtr->tokenPtr + subExprTokenIdx; parsePtr->numTokens += 2; subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 1db793f..5045aab 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -1036,7 +1036,7 @@ CleanupByteCode( statsPtr = &iPtr->stats; statsPtr->numByteCodesFreed++; - statsPtr->currentSrcBytes -= (double) (int)codePtr->numSrcBytes; + statsPtr->currentSrcBytes -= (double)codePtr->numSrcBytes; statsPtr->currentByteCodeBytes -= (double) codePtr->structureSize; statsPtr->currentInstBytes -= (double) codePtr->numCodeBytes; @@ -3660,12 +3660,12 @@ TclFinalizeLoopExceptionRange( * there is no need to fuss around with updating code offsets. */ - for (i=0 ; i<auxPtr->numBreakTargets ; i++) { + for (i=0 ; i<(int)auxPtr->numBreakTargets ; i++) { site = envPtr->codeStart + auxPtr->breakTargets[i]; offset = (int)rangePtr->breakOffset - auxPtr->breakTargets[i]; TclUpdateInstInt4AtPc(INST_JUMP4, offset, site); } - for (i=0 ; i<auxPtr->numContinueTargets ; i++) { + for (i=0 ; i<(int)auxPtr->numContinueTargets ; i++) { site = envPtr->codeStart + auxPtr->continueTargets[i]; if (rangePtr->continueOffset == TCL_INDEX_NONE) { int j; @@ -4062,12 +4062,12 @@ TclFixupForwardJump( ExceptionAux *auxPtr = &envPtr->exceptAuxArrayPtr[k]; int i; - for (i=0 ; i<auxPtr->numBreakTargets ; i++) { + for (i=0 ; i<(int)auxPtr->numBreakTargets ; i++) { if (jumpFixupPtr->codeOffset < auxPtr->breakTargets[i]) { auxPtr->breakTargets[i] += 3; } } - for (i=0 ; i<auxPtr->numContinueTargets ; i++) { + for (i=0 ; i<(int)auxPtr->numContinueTargets ; i++) { if (jumpFixupPtr->codeOffset < auxPtr->continueTargets[i]) { auxPtr->continueTargets[i] += 3; } @@ -4528,7 +4528,7 @@ RecordByteCodeStats( statsPtr = &(iPtr->stats); statsPtr->numCompilations++; - statsPtr->totalSrcBytes += (double) (int)codePtr->numSrcBytes; + statsPtr->totalSrcBytes += (double)codePtr->numSrcBytes; statsPtr->totalByteCodeBytes += (double) codePtr->structureSize; statsPtr->currentSrcBytes += (double) (int)codePtr->numSrcBytes; statsPtr->currentByteCodeBytes += (double) codePtr->structureSize; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index fc5b498..62b6416 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -132,7 +132,7 @@ typedef struct ExceptionAux { * if there are no open expansions between the * looping level and the point of jump * issue. */ - int numBreakTargets; /* The number of [break]s that want to be + size_t numBreakTargets; /* The number of [break]s that want to be * targeted to the place where this loop * exception will be bound to. */ unsigned int *breakTargets; /* The offsets of the INST_JUMP4 instructions @@ -141,8 +141,8 @@ typedef struct ExceptionAux { * TclFixupForwardJump) can cause the contents * of this array to be updated. When * numBreakTargets==0, this is NULL. */ - int allocBreakTargets; /* The size of the breakTargets array. */ - int numContinueTargets; /* The number of [continue]s that want to be + size_t allocBreakTargets; /* The size of the breakTargets array. */ + size_t numContinueTargets; /* The number of [continue]s that want to be * targeted to the place where this loop * exception will be bound to. */ unsigned int *continueTargets; /* The offsets of the INST_JUMP4 instructions @@ -151,7 +151,7 @@ typedef struct ExceptionAux { * TclFixupForwardJump) can cause the contents * of this array to be updated. When * numContinueTargets==0, this is NULL. */ - int allocContinueTargets; /* The size of the continueTargets array. */ + size_t allocContinueTargets; /* The size of the continueTargets array. */ } ExceptionAux; /* diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 05eee35..469089a 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -270,7 +270,7 @@ DisassembleByteCodeObj( codeStart = codePtr->codeStart; codeLimit = codeStart + codePtr->numCodeBytes; - numCmds = (int)codePtr->numCommands; + numCmds = codePtr->numCommands; /* * Print header lines describing the ByteCode. @@ -294,7 +294,7 @@ DisassembleByteCodeObj( codePtr->maxStackDepth, #ifdef TCL_COMPILE_STATS codePtr->numSrcBytes? - codePtr->structureSize/(float)(int)codePtr->numSrcBytes : + codePtr->structureSize/(float)codePtr->numSrcBytes : #endif 0.0); diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 873ba78..f3d15f3 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -3314,12 +3314,12 @@ TclAttemptCompileProc( ExceptionAux *auxPtr = envPtr->exceptAuxArrayPtr; for (i = 0; i < savedExceptArrayNext; i++) { - while (auxPtr->numBreakTargets > 0 + while ((int)auxPtr->numBreakTargets > 0 && auxPtr->breakTargets[auxPtr->numBreakTargets - 1] >= savedCodeNext) { auxPtr->numBreakTargets--; } - while (auxPtr->numContinueTargets > 0 + while ((int)auxPtr->numContinueTargets > 0 && auxPtr->continueTargets[auxPtr->numContinueTargets - 1] >= savedCodeNext) { auxPtr->numContinueTargets--; @@ -3439,7 +3439,7 @@ CompileToInvokedCommand( * Do the replacing dispatch. */ - TclEmitInvoke(envPtr, INST_INVOKE_REPLACE, (int)parsePtr->numWords,numWords+1); + TclEmitInvoke(envPtr, INST_INVOKE_REPLACE, parsePtr->numWords,numWords+1); } /* @@ -3469,7 +3469,7 @@ CompileBasicNArgCommand( Tcl_IncrRefCount(objPtr); Tcl_GetCommandFullName(interp, (Tcl_Command) cmdPtr, objPtr); TclCompileInvocation(interp, parsePtr->tokenPtr, objPtr, - (int)parsePtr->numWords, envPtr); + parsePtr->numWords, envPtr); Tcl_DecrRefCount(objPtr); return TCL_OK; } @@ -3643,7 +3643,7 @@ TclCompileBasic0To2ArgCmd( * which is the only code that sees the shenanigans of ensemble dispatch. */ - if ((int)parsePtr->numWords < 1 || (int)parsePtr->numWords > 3) { + if (parsePtr->numWords < 1 || parsePtr->numWords > 3) { return TCL_ERROR; } @@ -3665,7 +3665,7 @@ TclCompileBasic1To3ArgCmd( * which is the only code that sees the shenanigans of ensemble dispatch. */ - if ((int)parsePtr->numWords < 2 || (int)parsePtr->numWords > 4) { + if (parsePtr->numWords < 2 || parsePtr->numWords > 4) { return TCL_ERROR; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5628167..dc02cff 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -7228,7 +7228,7 @@ TEBCresume( } if (result == TCL_BREAK) { result = TCL_OK; - pc = (codePtr->codeStart + (int)rangePtr->breakOffset); + pc = (codePtr->codeStart + rangePtr->breakOffset); TRACE_APPEND(("%s, range at %" TCL_Z_MODIFIER "u, new pc %" TCL_Z_MODIFIER "u\n", StringForResultCode(result), rangePtr->codeOffset, rangePtr->breakOffset)); @@ -7240,7 +7240,7 @@ TEBCresume( goto checkForCatch; } result = TCL_OK; - pc = (codePtr->codeStart + (int)rangePtr->continueOffset); + pc = (codePtr->codeStart + rangePtr->continueOffset); TRACE_APPEND(("%s, range at %" TCL_Z_MODIFIER "u, new pc %" TCL_Z_MODIFIER "u\n", StringForResultCode(result), rangePtr->codeOffset, rangePtr->continueOffset)); @@ -7419,7 +7419,7 @@ TEBCresume( (long)*catchTop, rangePtr->catchOffset); } #endif - pc = (codePtr->codeStart + (int)rangePtr->catchOffset); + pc = (codePtr->codeStart + rangePtr->catchOffset); NEXT_INST_F(0, 0, 0); /* Restart the execution loop at pc. */ /* diff --git a/generic/tclOptimize.c b/generic/tclOptimize.c index 2fcc8e1..9341336 100644 --- a/generic/tclOptimize.c +++ b/generic/tclOptimize.c @@ -129,13 +129,13 @@ LocateTargetAddresses( ExceptionRange *rangePtr = &envPtr->exceptArrayPtr[i]; if (rangePtr->type == CATCH_EXCEPTION_RANGE) { - targetInstPtr = envPtr->codeStart + (int)rangePtr->catchOffset; + targetInstPtr = envPtr->codeStart + rangePtr->catchOffset; DefineTargetAddress(tablePtr, targetInstPtr); } else { - targetInstPtr = envPtr->codeStart + (int)rangePtr->breakOffset; + targetInstPtr = envPtr->codeStart + rangePtr->breakOffset; DefineTargetAddress(tablePtr, targetInstPtr); if (rangePtr->continueOffset != TCL_INDEX_NONE) { - targetInstPtr = envPtr->codeStart + (int)rangePtr->continueOffset; + targetInstPtr = envPtr->codeStart + rangePtr->continueOffset; DefineTargetAddress(tablePtr, targetInstPtr); } } diff --git a/generic/tclParse.c b/generic/tclParse.c index 5b4689f..dc5ecac 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -303,7 +303,7 @@ Tcl_ParseCommand( */ TclGrowParseTokenArray(parsePtr, 1); - wordIndex = (int)parsePtr->numTokens; + wordIndex = parsePtr->numTokens; tokenPtr = &parsePtr->tokenPtr[wordIndex]; tokenPtr->type = TCL_TOKEN_WORD; @@ -344,7 +344,7 @@ Tcl_ParseCommand( expPtr = &parsePtr->tokenPtr[expIdx]; if ((0 == expandWord) /* Haven't seen prefix already */ - && (1 == (int)parsePtr->numTokens - expIdx) + && (expIdx + 1 == (int)parsePtr->numTokens) /* Only one token */ && (((1 == expPtr->size) /* Same length as prefix */ @@ -1082,10 +1082,10 @@ ParseTokens( * for the parsed variable name. */ - originalTokens = (int)parsePtr->numTokens; + originalTokens = parsePtr->numTokens; while (numBytes && !((type = CHAR_TYPE(*src)) & mask)) { TclGrowParseTokenArray(parsePtr, 1); - tokenPtr = &parsePtr->tokenPtr[(int)parsePtr->numTokens]; + tokenPtr = &parsePtr->tokenPtr[parsePtr->numTokens]; tokenPtr->start = src; tokenPtr->numComponents = 0; @@ -1119,7 +1119,7 @@ ParseTokens( * the dirty work of parsing the name. */ - varToken = (int)parsePtr->numTokens; + varToken = parsePtr->numTokens; if (Tcl_ParseVarName(parsePtr->interp, src, numBytes, parsePtr, 1) != TCL_OK) { return TCL_ERROR; @@ -1258,7 +1258,7 @@ ParseTokens( */ TclGrowParseTokenArray(parsePtr, 1); - tokenPtr = &parsePtr->tokenPtr[(int)parsePtr->numTokens]; + tokenPtr = &parsePtr->tokenPtr[parsePtr->numTokens]; tokenPtr->start = src; tokenPtr->numComponents = 0; @@ -1365,10 +1365,10 @@ Tcl_ParseVarName( src = start; TclGrowParseTokenArray(parsePtr, 2); - tokenPtr = &parsePtr->tokenPtr[(int)parsePtr->numTokens]; + tokenPtr = &parsePtr->tokenPtr[parsePtr->numTokens]; tokenPtr->type = TCL_TOKEN_VARIABLE; tokenPtr->start = src; - varIndex = (int)parsePtr->numTokens; + varIndex = parsePtr->numTokens; parsePtr->numTokens++; tokenPtr++; src++; @@ -1480,7 +1480,7 @@ Tcl_ParseVarName( } tokenPtr = &parsePtr->tokenPtr[varIndex]; tokenPtr->size = src - tokenPtr->start; - tokenPtr->numComponents = (int)parsePtr->numTokens - (varIndex + 1); + tokenPtr->numComponents = parsePtr->numTokens - (varIndex + 1); return TCL_OK; /* @@ -1552,7 +1552,7 @@ Tcl_ParseVar( return "$"; } - code = TclSubstTokens(interp, parsePtr->tokenPtr, (int)parsePtr->numTokens, + code = TclSubstTokens(interp, parsePtr->tokenPtr, parsePtr->numTokens, NULL, 1, NULL, NULL); Tcl_FreeParse(parsePtr); TclStackFree(interp, parsePtr); @@ -1641,7 +1641,7 @@ Tcl_ParseBraces( } src = start; - startIndex = (int)parsePtr->numTokens; + startIndex = parsePtr->numTokens; TclGrowParseTokenArray(parsePtr, 1); tokenPtr = &parsePtr->tokenPtr[startIndex]; diff --git a/generic/tclProc.c b/generic/tclProc.c index 925c4ef..13f16e8 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1946,7 +1946,7 @@ TclProcCompileProc( iPtr->compiledProcPtr = procPtr; - if ((int)procPtr->numCompiledLocals > (int)procPtr->numArgs) { + if (procPtr->numCompiledLocals > procPtr->numArgs) { CompiledLocal *clPtr = procPtr->firstLocalPtr; CompiledLocal *lastPtr = NULL; int i, numArgs = procPtr->numArgs; |
