[m-rev.] for review: fix purity problems

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Dec 16 17:46:30 AEDT 2001


On 15-Dec-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> Fix bugs in the handling of impurity which broke `solutions/2'
> in grade asm_fast when compiled with `--optimize-duplicate-calls'.
...
> compiler/inlining.m:
> 	Compare the purity of the old and new goals when
> 	checking whether purity checking needs to be rerun,
> 	rather than just checking for `promise_pure' markers.
...
> Index: compiler/inlining.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/inlining.m,v
> retrieving revision 1.103
> diff -u -u -r1.103 inlining.m
> --- compiler/inlining.m	10 Aug 2001 14:51:58 -0000	1.103
> +++ compiler/inlining.m	13 Dec 2001 13:49:24 -0000
> @@ -584,11 +584,9 @@
>  			Requantify = yes
>  		),
>  
> -		pred_info_get_markers(PredInfo, CalleeMarkers),
>  		(
> -			( check_marker(CalleeMarkers, promised_pure)
> -			; check_marker(CalleeMarkers, promised_semipure)
> -			)
> +			infer_goal_info_purity(GoalInfo0, Purity),
> +			infer_goal_info_purity(GoalInfo, Purity)
>  		->
>  			PurityChanged = yes

Shouldn't that be

			infer_goal_info_purity(GoalInfo0, Purity0),
			infer_goal_info_purity(GoalInfo, Purity),
			Purity \= Purity0
		->
			PurityChanged = yes

?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list