diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-13 21:42:44 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-13 21:42:44 (GMT) |
commit | 6534b24e483a1caa04b6194cf5d67b6e670e57ec (patch) | |
tree | 0b495c02029924cf1b5c46c0515c865747f25a84 | |
parent | f315a019747b17af746eb751bf484f26dfb987a3 (diff) | |
download | tcl-6534b24e483a1caa04b6194cf5d67b6e670e57ec.zip tcl-6534b24e483a1caa04b6194cf5d67b6e670e57ec.tar.gz tcl-6534b24e483a1caa04b6194cf5d67b6e670e57ec.tar.bz2 |
Minor fixes (remove double blank lines, etc.)
-rw-r--r-- | generic/tclCompile.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 831b090..dce11bf 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.139 2007/11/13 21:22:17 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.140 2007/11/13 21:42:44 dkf Exp $ */ #include "tclInt.h" @@ -1138,9 +1138,9 @@ TclCompileScript( Tcl_DString ds; /* TIP #280 */ ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr; - int *wlines; - int wlineat, cmdLine; - Tcl_Parse *parsePtr = (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); + int *wlines, wlineat, cmdLine; + Tcl_Parse *parsePtr = (Tcl_Parse *) + TclStackAlloc(interp, sizeof(Tcl_Parse)); Tcl_DStringInit(&ds); @@ -1167,8 +1167,10 @@ TclCompileScript( cmdLine = envPtr->line; do { if (Tcl_ParseCommand(interp, p, bytesLeft, 0, parsePtr) != TCL_OK) { + /* + * Compile bytecodes to report the parse error at runtime. + */ - /* Compile bytecodes to report the parse error at runtime. */ Tcl_LogCommandInfo(interp, script, parsePtr->commandStart, /* Drop the command terminator (";","]") if appropriate */ (parsePtr->term == @@ -1179,8 +1181,8 @@ TclCompileScript( } gotParse = 1; if (parsePtr->numWords > 0) { - int expand = 0; /* Set if there are dynamic expansions - * to handle */ + int expand = 0; /* Set if there are dynamic expansions to + * handle */ /* * If not the first command, pop the previous command's result @@ -1264,8 +1266,9 @@ TclCompileScript( TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source, - parsePtr->tokenPtr, parsePtr->commandStart, parsePtr->commandSize, - parsePtr->numWords, cmdLine, &wlines); + parsePtr->tokenPtr, parsePtr->commandStart, + parsePtr->commandSize, parsePtr->numWords, cmdLine, + &wlines); wlineat = eclPtr->nuloc - 1; /* @@ -1335,6 +1338,7 @@ TclCompileScript( * produce such a beast (currently 'while 1' only) set * envPtr->atCmdStart to 0 in order to signal this * case. [Bug 1752146] + * * Note that the environment is initialised with * atCmdStart=1 to avoid emitting ISC for the first * command. @@ -1563,11 +1567,10 @@ TclCompileTokens( */ if (Tcl_DStringLength(&textBuffer) > 0) { - int literal; - - literal = TclRegisterNewLiteral(envPtr, + int literal = TclRegisterNewLiteral(envPtr, Tcl_DStringValue(&textBuffer), Tcl_DStringLength(&textBuffer)); + TclEmitPush(literal, envPtr); numObjsToConcat++; Tcl_DStringFree(&textBuffer); @@ -1909,8 +1912,7 @@ TclInitByteCodeObj( #endif int numLitObjects = envPtr->literalArrayNext; Namespace *namespacePtr; - int i; - int new; + int i, isNew; Interp *iPtr; iPtr = envPtr->iPtr; @@ -2027,7 +2029,7 @@ TclInitByteCodeObj( */ Tcl_SetHashValue(Tcl_CreateHashEntry(iPtr->lineBCPtr, (char *) codePtr, - &new), envPtr->extCmdMapPtr); + &isNew), envPtr->extCmdMapPtr); envPtr->extCmdMapPtr = NULL; codePtr->localCachePtr = NULL; @@ -2127,8 +2129,8 @@ TclFindCompiledLocal( procPtr->numCompiledLocals++; } return localVar; - } + /* *---------------------------------------------------------------------- * |