[m-rev.] for review: impurity & higher-order
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Jan 26 00:33:32 AEDT 2003
On 25-Jan-2003, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 25-Jan-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > +++ compiler/simplify.m 22 Jan 2003 16:28:38 -0000
> > @@ -726,13 +726,17 @@
> > simplify_do_calls(Info0),
> > % XXX We should do duplicate call elimination for
> > % class method calls here.
> > - GenericCall = higher_order(Closure, _, _)
> > + GenericCall = higher_order(Closure, Purity, _, _),
> > + % XXX Should we handle impure/semipure higher-order calls too?
> > + Purity = (pure)
>
> Surely not?
For impure, yes, we don't want to do duplicate call elimination.
But for semipure higher-order calls it would make sense to do
duplicate call elimination, provided that there is no impure
code between the two duplicate calls. However, doing that is
a bit tricky, and not worth the bother right now, hence the XXX.
I'll change the comment to
% XXX Should we handle semipure higher-order calls too?
The diff posted passes tools/bootcheck in both grades hlc.gc and asm_fast.gc.
I'll fix the line wrapping issues and go ahead and commit this.
--
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