Import Tcl 8.6.11
This commit is contained in:
@@ -135,9 +135,9 @@ TclCompileSetCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *varTokenPtr, *valueTokenPtr;
|
||||
int isAssignment, isScalar, localIndex, numWords;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
|
||||
numWords = parsePtr->numWords;
|
||||
if ((numWords != 2) && (numWords != 3)) {
|
||||
@@ -229,10 +229,10 @@ TclCompileStringCatCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
int i, numWords = parsePtr->numWords, numArgs;
|
||||
Tcl_Token *wordTokenPtr;
|
||||
Tcl_Obj *obj, *folded;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
|
||||
/* Trivial case, no arg */
|
||||
|
||||
@@ -637,6 +637,7 @@ TclCompileStringIsCmd(
|
||||
OP( LNOT);
|
||||
return TCL_OK;
|
||||
}
|
||||
break;
|
||||
|
||||
case STR_IS_DOUBLE: {
|
||||
int satisfied, isEmpty;
|
||||
@@ -755,7 +756,7 @@ TclCompileStringMatchCmd(
|
||||
}
|
||||
str = tokenPtr[1].start;
|
||||
length = tokenPtr[1].size;
|
||||
if ((length <= 1) || strncmp(str, "-nocase", (size_t) length)) {
|
||||
if ((length <= 1) || strncmp(str, "-nocase", length)) {
|
||||
/*
|
||||
* Fail at run time, not in compilation.
|
||||
*/
|
||||
@@ -995,8 +996,8 @@ TclCompileStringReplaceCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds the resulting instructions. */
|
||||
{
|
||||
Tcl_Token *tokenPtr, *valueTokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr, *valueTokenPtr;
|
||||
int first, last;
|
||||
|
||||
if (parsePtr->numWords < 4 || parsePtr->numWords > 5) {
|
||||
@@ -1402,13 +1403,13 @@ TclCompileSubstCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
int numArgs = parsePtr->numWords - 1;
|
||||
int numOpts = numArgs - 1;
|
||||
int objc, flags = TCL_SUBST_ALL;
|
||||
Tcl_Obj **objv/*, *toSubst = NULL*/;
|
||||
Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
int code = TCL_ERROR;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
|
||||
if (numArgs == 0) {
|
||||
return TCL_ERROR;
|
||||
@@ -1735,6 +1736,7 @@ TclCompileSwitchCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr; /* Pointer to tokens in command. */
|
||||
int numWords; /* Number of words in command. */
|
||||
|
||||
@@ -1751,7 +1753,6 @@ TclCompileSwitchCmd(
|
||||
int foundMode = 0; /* Have we seen a mode flag yet? */
|
||||
int i, valueIndex;
|
||||
int result = TCL_ERROR;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
int *clNext = envPtr->clNext;
|
||||
|
||||
/*
|
||||
@@ -1799,8 +1800,8 @@ TclCompileSwitchCmd(
|
||||
*/
|
||||
|
||||
for (; numWords>=3 ; tokenPtr=TokenAfter(tokenPtr),numWords--) {
|
||||
register unsigned size = tokenPtr[1].size;
|
||||
register const char *chrs = tokenPtr[1].start;
|
||||
unsigned size = tokenPtr[1].size;
|
||||
const char *chrs = tokenPtr[1].start;
|
||||
|
||||
/*
|
||||
* We only process literal options, and we assume that -e, -g and -n
|
||||
@@ -2539,7 +2540,7 @@ PrintJumptableInfo(
|
||||
ByteCode *codePtr,
|
||||
unsigned int pcOffset)
|
||||
{
|
||||
register JumptableInfo *jtPtr = clientData;
|
||||
JumptableInfo *jtPtr = clientData;
|
||||
Tcl_HashEntry *hPtr;
|
||||
Tcl_HashSearch search;
|
||||
const char *keyPtr;
|
||||
@@ -2568,7 +2569,7 @@ DisassembleJumptableInfo(
|
||||
ByteCode *codePtr,
|
||||
unsigned int pcOffset)
|
||||
{
|
||||
register JumptableInfo *jtPtr = clientData;
|
||||
JumptableInfo *jtPtr = clientData;
|
||||
Tcl_Obj *mapping = Tcl_NewObj();
|
||||
Tcl_HashEntry *hPtr;
|
||||
Tcl_HashSearch search;
|
||||
@@ -3573,9 +3574,9 @@ TclCompileUnsetCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *varTokenPtr;
|
||||
int isScalar, localIndex, flags = 1, i, varCount = 0, haveFlags = 0;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
|
||||
/* TODO: Consider support for compiling expanded args. */
|
||||
|
||||
@@ -3711,13 +3712,13 @@ TclCompileWhileCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *testTokenPtr, *bodyTokenPtr;
|
||||
JumpFixup jumpEvalCondFixup;
|
||||
int testCodeOffset, bodyCodeOffset, jumpDist, range, code, boolVal;
|
||||
int loopMayEnd = 1; /* This is set to 0 if it is recognized as an
|
||||
* infinite loop. */
|
||||
Tcl_Obj *boolObj;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
|
||||
if (parsePtr->numWords != 3) {
|
||||
return TCL_ERROR;
|
||||
@@ -3975,8 +3976,8 @@ CompileUnaryOpCmd(
|
||||
int instruction,
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
Tcl_Token *tokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr;
|
||||
|
||||
if (parsePtr->numWords != 2) {
|
||||
return TCL_ERROR;
|
||||
@@ -4017,8 +4018,8 @@ CompileAssociativeBinaryOpCmd(
|
||||
int instruction,
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
int words;
|
||||
|
||||
/* TODO: Consider support for compiling expanded args. */
|
||||
@@ -4102,8 +4103,8 @@ CompileComparisonOpCmd(
|
||||
int instruction,
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
Tcl_Token *tokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr;
|
||||
|
||||
/* TODO: Consider support for compiling expanded args. */
|
||||
if (parsePtr->numWords < 3) {
|
||||
@@ -4264,15 +4265,15 @@ TclCompilePowOpCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
int words;
|
||||
|
||||
/*
|
||||
* This one has its own implementation because the ** operator is the only
|
||||
* one with right associativity.
|
||||
*/
|
||||
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
int words;
|
||||
|
||||
for (words=1 ; words<parsePtr->numWords ; words++) {
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
CompileWord(envPtr, tokenPtr, interp, words);
|
||||
@@ -4439,8 +4440,8 @@ TclCompileMinusOpCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
int words;
|
||||
|
||||
/* TODO: Consider support for compiling expanded args. */
|
||||
@@ -4485,8 +4486,8 @@ TclCompileDivOpCmd(
|
||||
* compiled. */
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
|
||||
int words;
|
||||
|
||||
/* TODO: Consider support for compiling expanded args. */
|
||||
|
||||
Reference in New Issue
Block a user