[m-dev.] for review: make tailcall loops an MLDS transformation

Tyson Dowd trd at cs.mu.OZ.AU
Wed Aug 23 09:34:47 AEST 2000


On 22-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 22-Aug-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > Also, we transform into label/goto instead of for/continue.  This is
> > because IL doesn't have a for/continue construct.  It may be worth
> > revisiting this decision in future and performing benchmarks.
> 
> I think this one is not such a good idea, since Java, which is definitely
> an important target language, supports for/continue but not label/goto.

Understood.  But 
	(1) we don't have a Java backend
	(2) There is no for/continue in MLDS anyway.
	    There is a while, but no break (I think you can do it with
	    while/break, but it's much uglier than for/continue).

So you cannot turn it into anything but label/goto, and since our two
backend targets currently support label/goto I don't see much
justification using anything else right now.  When the Java backend is
written it might be worth adding for/continue to MLDS and doing it that
way.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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