[m-rev.] for review: fix purity problems
Simon Taylor
stayl at cs.mu.OZ.AU
Sun Dec 16 18:19:22 AEDT 2001
On 16-Dec-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 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
>
--- inlining.m 2001/12/16 06:51:59 1.1
+++ inlining.m 2001/12/16 06:52:03
@@ -588,9 +588,9 @@
infer_goal_info_purity(GoalInfo0, Purity),
infer_goal_info_purity(GoalInfo, Purity)
->
- PurityChanged = yes
- ;
PurityChanged = PurityChanged0
+ ;
+ PurityChanged = yes
),
% If the inferred determinism of the called
--------------------------------------------------------------------------
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