[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Sun Feb 24 17:36:44 CET 2008


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	08/02/24 17:36:44

Modified files:
	cm3/m3-sys/cm3/src/: Builder.m3 M3Path.m3 

Log message:
	remove the hack file name shortening that was for masm but also hits unnecessarily NT386GNU/as
	masm is not likely a scenario, usually NT386 outputs .obj files directly
	and maybe the behavior/bug is fixed in newer versions?
	
	This time, leave alone the behavior of a../.. because I broke ../..
	
	Make '/' a directory separator on all platforms.
	(Ignoring MacOS Classic) '/' is a path separator on Win32 and libm3/Pathname already knows that
	
	In M3Path.Join, avoid the source code duplication and use the Foo=>DoFoo(buf) pattern
	used nearby.
	
	Move Append local to M3Path.Join.
	(changed its signature to accept a length to avoid an extra Text.Length call)
	
	Fix what looks like a possible crash if New ( Text.Length (dir) = 0)
	
	In DoParse, change two passes over the string to just one.
	Would be even better to start at the end of the string and stop when found.
	
	In RegionMatch, avoid the Text.Length calls if possible.
	(even if they are faster than strlen)
	
	In RegionMatch when being case insensitive, first check case sensitive to avoid
	touching the lcase table.
	
	In Escape, handle a zero length string faster.
	decided against it -- it is already fast, and is rare, and slows down everything else
	
	In Convert, be fast if good = bad (the normal case!)
	
	various classic micro optimizations in general
	remove dead stores
	remove repeat calls to Text.Length (such as in Join where every string had it called twice)
	
	split out M3Path.New into M3Path.New and M3Path.NewInternal so test code can specify host := FALSE




More information about the M3commit mailing list