summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-11-18 17:48:02 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-11-18 17:48:02 (GMT)
commit1874893bf19505b6466eb4cd23d891e2be2493fe (patch)
treea725023bbf38ca3216838237f65e95e1a5b894ce /generic/tclCompile.c
parentf413d247d447a2c3e51f6632eb1461a4e08ded18 (diff)
downloadtcl-1874893bf19505b6466eb4cd23d891e2be2493fe.zip
tcl-1874893bf19505b6466eb4cd23d891e2be2493fe.tar.gz
tcl-1874893bf19505b6466eb4cd23d891e2be2493fe.tar.bz2
Minor fixes (e.g. comment readability)
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index efb652e..d5f5125 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.142 2007/11/16 14:11:52 dkf Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.143 2007/11/18 17:48:02 dkf Exp $
*/
#include "tclInt.h"
@@ -1333,7 +1333,7 @@ TclCompileScript(
&& !(cmdPtr->flags & CMD_HAS_EXEC_TRACES)
&& !(iPtr->flags & DONT_COMPILE_CMDS_INLINE)) {
int savedNumCmds = envPtr->numCommands;
- unsigned int savedCodeNext =
+ unsigned savedCodeNext =
envPtr->codeNext - envPtr->codeStart;
int update = 0, code;
@@ -1386,7 +1386,7 @@ TclCompileScript(
unsigned char *fixPtr = envPtr->codeStart
+ savedCodeNext + 1;
- unsigned int fixLen = envPtr->codeNext
+ unsigned fixLen = envPtr->codeNext
- envPtr->codeStart - savedCodeNext;
TclStoreInt4AtPtr(fixLen, fixPtr);
@@ -2756,7 +2756,7 @@ TclFixupForwardJump(
{
unsigned char *jumpPc, *p;
int firstCmd, lastCmd, firstRange, lastRange, k;
- unsigned int numBytes;
+ unsigned numBytes;
if (jumpDist <= distThreshold) {
jumpPc = (envPtr->codeStart + jumpFixupPtr->codeOffset);
@@ -3408,10 +3408,10 @@ TclDisassembleByteCodeObj(
Tcl_AppendPrintfToObj(bufferObj,
" Code %lu = header %lu+inst %d+litObj %lu+exc %lu+aux %lu+cmdMap %d\n",
(unsigned long) codePtr->structureSize,
- (unsigned long) (sizeof(ByteCode) - (sizeof(size_t) + sizeof(Tcl_Time))),
+ (unsigned long) (sizeof(ByteCode) - sizeof(size_t) - sizeof(Tcl_Time)),
codePtr->numCodeBytes,
(unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)),
- (unsigned long) (codePtr->numExceptRanges * sizeof(ExceptionRange)),
+ (unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)),
(unsigned long) (codePtr->numAuxDataItems * sizeof(AuxData)),
codePtr->numCmdLocBytes);
#endif /* TCL_COMPILE_STATS */
@@ -3512,7 +3512,7 @@ TclDisassembleByteCodeObj(
srcLengthNext = codePtr->srcLengthStart;
codeOffset = srcOffset = 0;
for (i = 0; i < numCmds; i++) {
- if ((unsigned int) (*codeDeltaNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *codeDeltaNext == (unsigned) 0xFF) {
codeDeltaNext++;
delta = TclGetInt4AtPtr(codeDeltaNext);
codeDeltaNext += 4;
@@ -3522,7 +3522,7 @@ TclDisassembleByteCodeObj(
}
codeOffset += delta;
- if ((unsigned int) (*codeLengthNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *codeLengthNext == (unsigned) 0xFF) {
codeLengthNext++;
codeLen = TclGetInt4AtPtr(codeLengthNext);
codeLengthNext += 4;
@@ -3531,7 +3531,7 @@ TclDisassembleByteCodeObj(
codeLengthNext++;
}
- if ((unsigned int) (*srcDeltaNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *srcDeltaNext == (unsigned) 0xFF) {
srcDeltaNext++;
delta = TclGetInt4AtPtr(srcDeltaNext);
srcDeltaNext += 4;
@@ -3541,7 +3541,7 @@ TclDisassembleByteCodeObj(
}
srcOffset += delta;
- if ((unsigned int) (*srcLengthNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *srcLengthNext == (unsigned) 0xFF) {
srcLengthNext++;
srcLen = TclGetInt4AtPtr(srcLengthNext);
srcLengthNext += 4;
@@ -3571,7 +3571,7 @@ TclDisassembleByteCodeObj(
codeOffset = srcOffset = 0;
pc = codeStart;
for (i = 0; i < numCmds; i++) {
- if ((unsigned int) (*codeDeltaNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *codeDeltaNext == (unsigned) 0xFF) {
codeDeltaNext++;
delta = TclGetInt4AtPtr(codeDeltaNext);
codeDeltaNext += 4;
@@ -3581,7 +3581,7 @@ TclDisassembleByteCodeObj(
}
codeOffset += delta;
- if ((unsigned int) (*srcDeltaNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *srcDeltaNext == (unsigned) 0xFF) {
srcDeltaNext++;
delta = TclGetInt4AtPtr(srcDeltaNext);
srcDeltaNext += 4;
@@ -3591,7 +3591,7 @@ TclDisassembleByteCodeObj(
}
srcOffset += delta;
- if ((unsigned int) (*srcLengthNext) == (unsigned int) 0xFF) {
+ if ((unsigned) *srcLengthNext == (unsigned) 0xFF) {
srcLengthNext++;
srcLen = TclGetInt4AtPtr(srcLengthNext);
srcLengthNext += 4;
@@ -3647,7 +3647,7 @@ FormatInstruction(
unsigned char opCode = *pc;
register InstructionDesc *instDesc = &tclInstructionTable[opCode];
unsigned char *codeStart = codePtr->codeStart;
- unsigned int pcOffset = (pc - codeStart);
+ unsigned pcOffset = pc - codeStart;
int opnd = 0, i, j, numBytes = 1;
int localCt = procPtr ? procPtr->numCompiledLocals : 0;
CompiledLocal *localPtr = procPtr ? procPtr->firstLocalPtr : NULL;
@@ -3684,7 +3684,7 @@ FormatInstruction(
if (opCode == INST_PUSH1) {
suffixObj = codePtr->objArrayPtr[opnd];
}
- Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned int) opnd);
+ Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned) opnd);
break;
case OPERAND_AUX4:
case OPERAND_UINT4:
@@ -3695,7 +3695,7 @@ FormatInstruction(
sprintf(suffixBuffer+strlen(suffixBuffer),
", %u cmds start here", opnd);
}
- Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned int) opnd);
+ Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned) opnd);
if (instDesc->opTypes[i] == OPERAND_AUX4) {
auxPtr = &codePtr->auxDataArrayPtr[opnd];
}
@@ -3721,7 +3721,7 @@ FormatInstruction(
if (localPtr != NULL) {
if (opnd >= localCt) {
Tcl_Panic("FormatInstruction: bad local var index %u (%u locals)",
- (unsigned int) opnd, localCt);
+ (unsigned) opnd, localCt);
}
for (j = 0; j < opnd; j++) {
localPtr = localPtr->nextPtr;