Tcl Source Code

Check-in [879b78fc5c]
Login

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

Overview
Comment:Improved the sequence of instructions issued for [subst] when dealing with simple variable references.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 879b78fc5c9dd207fbea50e2e172d8193548cf89
User & Date: dkf 2012-12-18 14:02:43
Context
2013-01-02
18:06
Merge the [subst] compile improvements with accommodations to parser changes. check-in: 55db16ea6d user: dgp tags: dgp-refactor
2012-12-21
06:16
merge release check-in: bace4350dd user: dgp tags: trunk
2012-12-20
10:04
Merging in changes from trunk check-in: 040936a1c7 user: seandeelywoods tags: hypnotoad-vexpr
09:56
Merging with trunk check-in: bd253c91c6 user: seandeelywoods tags: hypnotoad-prefer-native-8.6
2012-12-18
14:02
Improved the sequence of instructions issued for [subst] when dealing with simple variable reference... check-in: 879b78fc5c user: dkf tags: trunk
10:21
Better version that can handle simple composite array keys as well. As long as they are free of comm... check-in: bc557e607b user: dkf tags: dkf-bytecode-8.6-main
2012-12-17
14:40
Simpler code to do installation of [info class] and [info object].

We know this is a safe thing to ... check-in: e3336029df user: dkf tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18






2012-11-13  Miguel Sofer  <[email protected]>

	* generic/tclCmdAH.c (CatchObjCmdCallback): do not decrRefCount
	the newValuePtr sent to Tcl_ObjSetVar2: TOSV2 is 'fire and
	forget', it decrs on its own. Fix for [Bug 3595576], found by
	andrewsh.

2012-12-13  Jan Nijtmans  <[email protected]>

	* generic/tcl.h: Fix Tcl_DecrRefCount macro such that it
	doesn't access its objPtr parameter twice any more.

2012-12-10  Donal K. Fellows  <[email protected]>

	* tools/tcltk-man2html.tcl (plus-pkgs): Increased robustness of
	version number detection code to deal with packages whose names are
	prefixes of other packages.
	* unix/Makefile.in (dist): Added pkgs/package.list.txt to distribution
>
>
>
>
>
>


|
|
|
<



|
|







1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23
2012-12-18  Donal K. Fellows  <[email protected]>

	* generic/tclCompCmdsSZ.c (TclSubstCompile): Improved the sequence of
	instructions issued for [subst] when dealing with simple variable
	references.

2012-11-13  Miguel Sofer  <[email protected]>

	* generic/tclCmdAH.c (CatchObjCmdCallback): Do not decrRefCount the
	newValuePtr sent to Tcl_ObjSetVar2: TOSV2 is 'fire and forget', it
	decrs on its own. Fix for [Bug 3595576], found by andrewsh.


2012-12-13  Jan Nijtmans  <[email protected]>

	* generic/tcl.h: Fix Tcl_DecrRefCount macro such that it doesn't
	access its objPtr parameter twice any more.

2012-12-10  Donal K. Fellows  <[email protected]>

	* tools/tcltk-man2html.tcl (plus-pkgs): Increased robustness of
	version number detection code to deal with packages whose names are
	prefixes of other packages.
	* unix/Makefile.in (dist): Added pkgs/package.list.txt to distribution

Changes to generic/tclCompCmdsSZ.c.

831
832
833
834
835
836
837




























838
839
840
841
842
843
844
	    continue;
	case TCL_TOKEN_BS:
	    length = TclParseBackslash(tokenPtr->start, tokenPtr->size,
		    NULL, buf);
	    literal = TclRegisterNewLiteral(envPtr, buf, length);
	    TclEmitPush(literal, envPtr);
	    count++;




























	    continue;
	}

	while (count > 255) {
	    OP1(		CONCAT1, 255);
	    count -= 254;
	}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
	    continue;
	case TCL_TOKEN_BS:
	    length = TclParseBackslash(tokenPtr->start, tokenPtr->size,
		    NULL, buf);
	    literal = TclRegisterNewLiteral(envPtr, buf, length);
	    TclEmitPush(literal, envPtr);
	    count++;
	    continue;
	case TCL_TOKEN_VARIABLE:
	    /*
	     * Check for simple variable access; see if we can only generate
	     * TCL_OK or TCL_ERROR from the substituted variable read; if so,
	     * there is no need to generate elaborate exception-management
	     * code. Note that the first component of TCL_TOKEN_VARIABLE is
	     * always TCL_TOKEN_TEXT...
	     */

	    if (tokenPtr->numComponents > 1) {
		int i, foundCommand = 0;

		for (i=2 ; i<=tokenPtr->numComponents ; i++) {
		    if (tokenPtr[i].type == TCL_TOKEN_COMMAND) {
			foundCommand = 1;
			break;
		    }
		}
		if (foundCommand) {
		    break;
		}
	    }

	    envPtr->line = bline;
	    TclCompileVarSubst(interp, tokenPtr, envPtr);
	    bline = envPtr->line;
	    count++;
	    continue;
	}

	while (count > 255) {
	    OP1(		CONCAT1, 255);
	    count -= 254;
	}