[m-dev.] diff: bug fix for dense_switch.m

Thomas Charles CONWAY conway at cs.mu.oz.au
Tue May 20 08:16:12 AEST 1997


ON
> Hi,
> 
> Zoltan and/or Tom, could you please review this?
> 
> compiler/dense_switch.m:
> 	Fix a bug introduced by Zoltan's changes to delay flushing
> 	of variables needed on backtracking.
> 	The bug was that the final code_info after a nondet
> 	dense_switch had not unset the top failure continuation.
> 	This caused the code generator to generate incorrect C code for
> 	the code following the dense switch: the generated C code
> 	clobbered the topmost redoip, rather than using a new temp frame.
> 	The fix was to ensure that we use the code_info from the
> 	end of one of the switch branches (for which we will have called
> 	code_info__unset_failure_cont from code_info__branch_end)
> 	rather than using the initial code_info and just resetting
> 	the live variables.
> 
> compiler/code_gen.m:
> compiler/code_info.m:
> compiler/disj_info.m:
> compiler/ite_gen.m:
> 	Various minor improvements to the comments.
> 
> tests/general/space.m:
> 	The regression test for the above-mentioned bug,
> 	from Tom's original bug report.
> 

This looks fine.

Thomas
-- 
ZZ:wq!
^X^C
Thomas Conway               				      conway at cs.mu.oz.au
AD DEUM ET VINUM	  			      Every sword has two edges.



More information about the developers mailing list