[PPL-devel] ppl/src checked.cc

Matthew Mundell mundell at cs.unipr.it
Fri Oct 14 13:09:35 CEST 2005


CVSROOT:	/cvs/ppl
Module name:	ppl
Changes by:	mundell at cs.unipr.it	2005-10-14 13:09:35

Modified files:
	src            : checked.cc 

Log message:
	Comment every function.  Slightly improve the formatting in
	parse_number and input_mpq.
	
	In parse_number1
	
	- move the error handling to the first error occurrence (this ensures
	that variables are always initialised at the destinations of the
	error jumps)
	
	- capatilise the second 'n' in the "inf" check
	
	- make the '+' case when parsing strings like "+inf" fall through to
	the "inf" parsing, instead of jumping to it
	
	- after the initial sign-and-symbol-parsing switch statement, split
	the validity check on the current character into two checks, one of
	which is already present
	
	- use only variable c when parsing a leading "0x", instead of using a
	second variable (d)
	
	- convert the parsing state machine into a series of loops, to save
	the state interpretation overhead and to lower the number of jumps
	and the size of the code
	
	- manually inline the small relevant portion of get_digit at the
	digit validity checks which call get_digit with a base of ten.

Patches:
http://www.cs.unipr.it/cgi-bin/cvsweb.cgi/ppl/src/checked.cc.diff?cvsroot=ppl&r1=1.8&r2=1.9




More information about the PPL-devel mailing list