Tcl Source Code

Check-in [1a292c2874]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Simplify code generation for a list of literals. Generates slightly simpler bytecode too.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a292c2874a157fa96fe0ebe45f9123e4ef92a51
User & Date: dkf 2015-05-19 20:34:10
Context
2015-05-20
15:12
[29044ba23f] Remove RANLIB as part of library installation. At best it's redundant to the RANLIB al... check-in: 9f5893b2e8 user: dgp tags: trunk
13:42
merge trunk check-in: 118b4353ad user: dgp tags: novem
13:37
merge trunk check-in: 9447602d7e user: dgp tags: bug-57945b574a
2015-05-19
20:34
Simplify code generation for a list of literals. Generates slightly simpler bytecode too. check-in: 1a292c2874 user: dkf tags: trunk
20:29
Tidier version. Closed-Leaf check-in: 3963c3db7f user: dkf tags: dgp-defer-string-rep
2015-05-18
08:20
[11250a236d] Made the documentation of non-greediness overrides more obvious. check-in: 93531a5a13 user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclCompCmdsGR.c.

1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
	    Tcl_DecrRefCount(objPtr);
	    Tcl_DecrRefCount(listObj);
	    listObj = NULL;
	}
	valueTokenPtr = TokenAfter(valueTokenPtr);
    }
    if (listObj != NULL) {
	int len;
	const char *bytes = Tcl_GetStringFromObj(listObj, &len);

	PushLiteral(envPtr, bytes, len);
	Tcl_DecrRefCount(listObj);
	if (len > 0) {
	    /*
	     * Force list interpretation!
	     */

	    TclEmitOpcode(	INST_DUP,		envPtr);
	    TclEmitOpcode(	INST_LIST_LENGTH,	envPtr);
	    TclEmitOpcode(	INST_POP,		envPtr);
	}
	return TCL_OK;
    }

    /*
     * Push the all values onto the stack.
     */







|
<
<
<
<
<
<
<
<
<
<
<
<
<







1206
1207
1208
1209
1210
1211
1212
1213













1214
1215
1216
1217
1218
1219
1220
	    Tcl_DecrRefCount(objPtr);
	    Tcl_DecrRefCount(listObj);
	    listObj = NULL;
	}
	valueTokenPtr = TokenAfter(valueTokenPtr);
    }
    if (listObj != NULL) {
	TclEmitPush(TclAddLiteralObj(envPtr, listObj, NULL), envPtr);













	return TCL_OK;
    }

    /*
     * Push the all values onto the stack.
     */