Tcl Source Code

Check-in [90eb0b4cbb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Narrow scope of numVars.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-e711ffb458
Files: files | file ages | folders
SHA1: 90eb0b4cbbcc33de922bf80823662b3151b1b6c8
User & Date: dgp 2014-12-19 03:31:09
Context
2014-12-19
14:17
Replace TclIsLocalScalar() with PushVarNameWord() in [dict for] compiler. check-in: 30a06fec35 user: dgp tags: bug-e711ffb458
03:31
Narrow scope of numVars. check-in: 90eb0b4cbb user: dgp tags: bug-e711ffb458
2014-12-18
22:25
A bit more tidying... check-in: 65e5d46da8 user: dgp tags: bug-e711ffb458
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclCompCmds.c.

1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
				 * foreach command. Stored in a AuxData
				 * record in the ByteCode. */
    Tcl_Token *tokenPtr, *bodyTokenPtr;
    Tcl_Token token[2];
    unsigned char *jumpPc;
    JumpFixup jumpFalseFixup;
    int jumpBackDist, jumpBackOffset, infoIndex, range;
    int numWords, numLists, numVars, tempVar, i, j, code = TCL_OK;
    int savedStackDepth = envPtr->currStackDepth;
    Tcl_Obj *varListObj = NULL;
    DefineLineInformation;	/* TIP #280 */

    /*
     * If the foreach command isn't in a procedure, don't compile it inline:
     * the payoff is too small.







|







1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
				 * foreach command. Stored in a AuxData
				 * record in the ByteCode. */
    Tcl_Token *tokenPtr, *bodyTokenPtr;
    Tcl_Token token[2];
    unsigned char *jumpPc;
    JumpFixup jumpFalseFixup;
    int jumpBackDist, jumpBackOffset, infoIndex, range;
    int numWords, numLists, tempVar, i, j, code = TCL_OK;
    int savedStackDepth = envPtr->currStackDepth;
    Tcl_Obj *varListObj = NULL;
    DefineLineInformation;	/* TIP #280 */

    /*
     * If the foreach command isn't in a procedure, don't compile it inline:
     * the payoff is too small.
1596
1597
1598
1599
1600
1601
1602

1603
1604
1605
1606
1607
1608
1609
    varListObj = Tcl_NewObj();
    token[0].type = TCL_TOKEN_SIMPLE_WORD;
    token[0].numComponents = 1;
    for (i = 0, tokenPtr = parsePtr->tokenPtr;
	    i < numWords-1;
	    i++, tokenPtr = TokenAfter(tokenPtr)) {
	ForeachVarList *varListPtr;


	if (i%2 != 1) {
	    continue;
	}

	/*
	 * If the variable list is empty, we can enter an infinite loop when







>







1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
    varListObj = Tcl_NewObj();
    token[0].type = TCL_TOKEN_SIMPLE_WORD;
    token[0].numComponents = 1;
    for (i = 0, tokenPtr = parsePtr->tokenPtr;
	    i < numWords-1;
	    i++, tokenPtr = TokenAfter(tokenPtr)) {
	ForeachVarList *varListPtr;
	int numVars;

	if (i%2 != 1) {
	    continue;
	}

	/*
	 * If the variable list is empty, we can enter an infinite loop when