diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:46:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:46:42 (GMT) |
commit | 4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f (patch) | |
tree | d5db4ca8a1fecbd63d9e72730fad2f404367daff /generic/tclCompCmdsGR.c | |
parent | 63994a73e3f641451b26f48f697b6a069863751c (diff) | |
parent | 52e543c5691a60c3ef802fecf1ae08e7efcf19b7 (diff) | |
download | tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.zip tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.gz tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclCompCmdsGR.c')
-rw-r--r-- | generic/tclCompCmdsGR.c | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index c3684e0..7f0595f 100644 --- a/generic/tclCompCmdsGR.c +++ b/generic/tclCompCmdsGR.c @@ -93,6 +93,7 @@ TclCompileGlobalCmd( Tcl_Token *varTokenPtr; int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ numWords = parsePtr->numWords; @@ -189,6 +190,7 @@ TclCompileIfCmd( int boolVal; /* Value of static condition. */ int compileScripts = 1; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Only compile the "if" command if all arguments are simple words, in @@ -479,6 +481,7 @@ TclCompileIncrCmd( Tcl_Token *varTokenPtr, *incrTokenPtr; int isScalar, localIndex, haveImmValue, immValue; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if ((parsePtr->numWords != 2) && (parsePtr->numWords != 3)) { return TCL_ERROR; @@ -641,13 +644,15 @@ TclCompileInfoCommandsCmd( int TclCompileInfoCoroutineCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + (void)cmdPtr; /* * Only compile [info coroutine] without arguments. */ @@ -676,6 +681,7 @@ TclCompileInfoExistsCmd( Tcl_Token *tokenPtr; int isScalar, localIndex; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -722,6 +728,7 @@ TclCompileInfoLevelCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)cmdPtr; /* * Only compile [info level] without arguments or with a single argument. */ @@ -759,6 +766,7 @@ TclCompileInfoObjectClassCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -779,6 +787,7 @@ TclCompileInfoObjectIsACmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); + (void)cmdPtr; /* * We only handle [info object isa object <somevalue>]. The first three @@ -815,6 +824,7 @@ TclCompileInfoObjectNamespaceCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -854,6 +864,7 @@ TclCompileLappendCmd( Tcl_Token *varTokenPtr, *valueTokenPtr; int isScalar, localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ numWords = parsePtr->numWords; @@ -970,6 +981,7 @@ TclCompileLassignCmd( Tcl_Token *tokenPtr; int isScalar, localIndex, numWords, idx; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; numWords = parsePtr->numWords; @@ -1074,6 +1086,7 @@ TclCompileLindexCmd( Tcl_Token *idxTokenPtr, *valTokenPtr; int i, idx, numWords = parsePtr->numWords; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Quit if too few args. @@ -1166,6 +1179,7 @@ TclCompileListCmd( Tcl_Token *valueTokenPtr; int i, numWords, concat, build; Tcl_Obj *listObj, *objPtr; + (void)cmdPtr; if (parsePtr->numWords == 1) { /* @@ -1278,6 +1292,7 @@ TclCompileLlengthCmd( { Tcl_Token *varTokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1312,6 +1327,7 @@ TclCompileLrangeCmd( Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ int idx1, idx2; + (void)cmdPtr; if (parsePtr->numWords != 4) { return TCL_ERROR; @@ -1373,6 +1389,7 @@ TclCompileLinsertCmd( Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ int idx, i; + (void)cmdPtr; if (parsePtr->numWords < 3) { return TCL_ERROR; @@ -1477,6 +1494,7 @@ TclCompileLreplaceCmd( DefineLineInformation; /* TIP #280 */ int idx1, idx2, i; int emptyPrefix=1, suffixStart = 0; + (void)cmdPtr; if (parsePtr->numWords < 4) { return TCL_ERROR; @@ -1645,6 +1663,7 @@ TclCompileLsetCmd( int isScalar; /* Flag == 1 if scalar, 0 if array. */ int i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Check argument count. @@ -1777,13 +1796,15 @@ TclCompileLsetCmd( int TclCompileNamespaceCurrentCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + (void)cmdPtr; /* * Only compile [namespace current] without arguments. */ @@ -1811,6 +1832,7 @@ TclCompileNamespaceCodeCmd( { Tcl_Token *tokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1861,6 +1883,7 @@ TclCompileNamespaceOriginCmd( { Tcl_Token *tokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1884,6 +1907,7 @@ TclCompileNamespaceQualifiersCmd( Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); DefineLineInformation; /* TIP #280 */ int off; + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1920,6 +1944,7 @@ TclCompileNamespaceTailCmd( Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); DefineLineInformation; /* TIP #280 */ JumpFixup jumpFixup; + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1957,6 +1982,7 @@ TclCompileNamespaceUpvarCmd( Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr; int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (envPtr->procPtr == NULL) { return TCL_ERROR; @@ -2018,6 +2044,7 @@ TclCompileNamespaceWhichCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr, *opt; int idx; + (void)cmdPtr; if (parsePtr->numWords < 2 || parsePtr->numWords > 3) { return TCL_ERROR; @@ -2085,6 +2112,7 @@ TclCompileRegexpCmd( int i, nocase, exact, sawLast, simple; const char *str; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * We are only interested in compiling simple regexp cases. Currently @@ -2272,6 +2300,7 @@ TclCompileRegsubCmd( const char *bytes; int exact, quantified, result = TCL_ERROR; size_t len; + (void)cmdPtr; if (parsePtr->numWords < 5 || parsePtr->numWords > 6) { return TCL_ERROR; @@ -2432,6 +2461,7 @@ TclCompileReturnCmd( Tcl_Obj *returnOpts, **objv; Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Check for special case which can always be compiled: @@ -2458,7 +2488,7 @@ TclCompileReturnCmd( * Allocate some working space. */ - objv = TclStackAlloc(interp, numOptionWords * sizeof(Tcl_Obj *)); + objv = (Tcl_Obj **)TclStackAlloc(interp, numOptionWords * sizeof(Tcl_Obj *)); /* * Scan through the return options. If any are unknown at compile time, @@ -2677,6 +2707,7 @@ TclCompileUpvarCmd( int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ Tcl_Obj *objPtr; + (void)cmdPtr; if (envPtr->procPtr == NULL) { return TCL_ERROR; @@ -2783,6 +2814,7 @@ TclCompileVariableCmd( Tcl_Token *varTokenPtr, *valueTokenPtr; int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; numWords = parsePtr->numWords; if (numWords < 2) { @@ -2858,7 +2890,7 @@ TclCompileVariableCmd( static int IndexTailVarIfKnown( - Tcl_Interp *interp, + Tcl_Interp *dummy, Tcl_Token *varTokenPtr, /* Token representing the variable name */ CompileEnv *envPtr) /* Holds resulting instructions. */ { @@ -2868,6 +2900,7 @@ IndexTailVarIfKnown( size_t len; Tcl_Token *lastTokenPtr; int full, localIndex; + (void)dummy; /* * Determine if the tail is (a) known at compile time, and (b) not an @@ -2958,6 +2991,7 @@ TclCompileObjectNextCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = parsePtr->tokenPtr; int i; + (void)cmdPtr; if (parsePtr->numWords > 255) { return TCL_ERROR; @@ -2983,6 +3017,7 @@ TclCompileObjectNextToCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = parsePtr->tokenPtr; int i; + (void)cmdPtr; if (parsePtr->numWords < 2 || parsePtr->numWords > 255) { return TCL_ERROR; @@ -2998,13 +3033,15 @@ TclCompileObjectNextToCmd( int TclCompileObjectSelfCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + (void)cmdPtr; /* * We only handle [self] and [self object] (which is the same operation). * These are the only very common operations on [self] for which |