Tcl Source Code

Check-in [8674c9099d]
Login

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

Overview
Comment:another jump peephole, this time with string comparisons
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8674c9099d2a0dbb004db30bfccdab07685cd1a0
User & Date: dkf 2013-12-31 23:34:57
Context
2014-01-01
16:19
factor out a common peephole stanza check-in: 1b5fb87b71 user: dkf tags: trunk
12:36
merge trunk check-in: 3cb08706ae user: jan.nijtmans tags: novem
00:02
merge trunk check-in: 8c6514e159 user: mig tags: mig-optimize
2013-12-31
23:34
another jump peephole, this time with string comparisons check-in: 8674c9099d user: dkf tags: trunk
16:26
more peephole optimizations in TEBC, and better instruction execution traces check-in: c5d6c15df9 user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclExecute.c.

4983
4984
4985
4986
4987
4988
4989














4990
4991
4992
4993
4994
4995
4996
		match = (match <= 0);
		break;
	    case INST_GE:
		match = (match >= 0);
		break;
	    }
	}














	if (match < 0) {
	    TclNewIntObj(objResultPtr, -1);
	} else {
	    objResultPtr = TCONST(match > 0);
	}
	TRACE(("%.20s %.20s => %s\n", O2S(valuePtr), O2S(value2Ptr),
		O2S(objResultPtr)));







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







4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
		match = (match <= 0);
		break;
	    case INST_GE:
		match = (match >= 0);
		break;
	    }
	}

#ifndef TCL_COMPILE_DEBUG
	switch (*(pc+1)) {
	case INST_JUMP_FALSE1:
	    NEXT_INST_F((match? 3 : TclGetInt1AtPtr(pc+2)+1), 2, 0);
	case INST_JUMP_TRUE1:
	    NEXT_INST_F((match? TclGetInt1AtPtr(pc+2)+1 : 3), 2, 0);
	case INST_JUMP_FALSE4:
	    NEXT_INST_F((match? 6 : TclGetInt4AtPtr(pc+2)+1), 2, 0);
	case INST_JUMP_TRUE4:
	    NEXT_INST_F((match? TclGetInt4AtPtr(pc+2)+1 : 6), 2, 0);
	}
#endif

	if (match < 0) {
	    TclNewIntObj(objResultPtr, -1);
	} else {
	    objResultPtr = TCONST(match > 0);
	}
	TRACE(("%.20s %.20s => %s\n", O2S(valuePtr), O2S(value2Ptr),
		O2S(objResultPtr)));