[m-dev.] last call modulo construction in hlc.gc

Peter Ross pro at missioncriticalit.com
Tue Oct 11 00:35:07 AEST 2005

On Mon, Oct 10, 2005 at 06:40:18PM +1000, Zoltan Somogyi wrote:
> On 10-Oct-2005, Peter Ross <pro at missioncriticalit.com> wrote:
> > > > Why doesn't the last call modulo construction optimization work in the
> > > > hlc.gc grade?
> > > 
> > > Because it is implemented directly in the LLDS code generator.
> > > 
> > Would it be difficult to implement in the MLDS grades?
> I am not familiar enough with the MLDS code generator to say for sure,
> but my guess is it would take three to five days of work.
Is anyone planning to port this to the MLDS generator?

If not, a short summary of what was needed to be added and when I have
the time I will attempt to implement it, as this is probably the biggest
missing thing for us in the compiler.  I can't count the number of times
I've had to make routines tail recursive, so as to avoid exhausting the

>From what I understand one needs to have the ability to construct an
empty cell, pass a reference to that cell to a procedure, then have that
procedure place it's answer in that cell.

Am I missing anything?
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