[m-dev.] for review: handle if_then_else and disj for acc introduction

Peter Ross petdr at cs.mu.OZ.AU
Mon Jun 28 15:49:50 AEST 1999


On 28-Jun-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>  
> Peter Ross wrote:
> > Estimated hours taken: 10
> > 
> > compiler/accumulator.m:
> >     Add the ability to add accumulators to if/then/else and disjunctions.
> 
> I'd suggest putting a description of the general transformation for
> if-then-elses into the comment at the top of the file, as you have for
> disjunctions/switches.
> 
Added a short blurb on how if-then-elses are equivalent to a
disjunction/switch if you are careful with the condition.

> > +		Goal = if_then_else(_Vars, If, Then, Else, _SM) - _GoalInfo,
> 
> Does it matter if the condition contains a recursive call?

No, because if there is a recursive call in one arm of the if-then-else,
then it is that recursive call that we want to attempt to make tail
recursive.

> If that's not a problem this change looks OK.
> 
Thanks.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list