This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: Re: On jump removal once again

4 replies
Aaron Novstrup 2
Joined: 2011-03-30,
User offline. Last seen 42 years 45 weeks ago.

Sorry, I should have been more clear. I mean that gotoelim would just
leave those LabelDefs untransformed.

On Mon, Jun 13, 2011 at 3:19 PM, Grzegorz Kossakowski
wrote:
> 2011/6/14 Aaron Novstrup
>>
>> What about the option of just ignoring those LabelDefs, then, rather
>> than issuing an error?  The jribble backend should be able to handle
>> labels -- it's just Apply that's the hard part, right?
>
> What do you mean by ignoring? Completely dropping the tree, including right
> hand side of LabelDef?
> --
> Grzegorz Kossakowski
>
>

gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Re: Re: On jump removal once again
2011/6/14 Aaron Novstrup <aaron.novstrup@gmail.com>
Sorry, I should have been more clear.  I mean that gotoelim would just
leave those LabelDefs untransformed.
 That would be another option but if we can get rid of them, the better. Jribble backend handles LabelDefs' parameters by allocating some local variables. Also, for each LabelDef we introduce while loop so we can use break/continue. Since there are no gotos, the while loop is not necessary, too. If we can reduce that noise I'm all for it.
--
Grzegorz Kossakowski

Aaron Novstrup 2
Joined: 2011-03-30,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: On jump removal once again

I agree that eliminating it would be better, if it's possible. I
suggest modifying the gotoelim plugin to leave those LabelDefs
untransformed for now, and then wait to hear from Miguel about whether
such labels can, in general, be replaced with their rhs (and replacing
the label's parameters with the corresponding symbols from the
enclosing scope, if necessary).

On Mon, Jun 13, 2011 at 3:29 PM, Grzegorz Kossakowski
wrote:
> 2011/6/14 Aaron Novstrup
>>
>> Sorry, I should have been more clear.  I mean that gotoelim would just
>> leave those LabelDefs untransformed.
>
>
> That would be another option but if we can get rid of them, the better.
> Jribble backend handles LabelDefs' parameters by allocating some local
> variables. Also, for each LabelDef we introduce while loop so we can use
> break/continue. Since there are no gotos, the while loop is not necessary,
> too. If we can reduce that noise I'm all for it.
> --
> Grzegorz Kossakowski
>
>

gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Re: Re: On jump removal once again
2011/6/14 Aaron Novstrup <aaron.novstrup@gmail.com>
I agree that eliminating it would be better, if it's possible.  I
suggest modifying the gotoelim plugin to leave those LabelDefs
untransformed for now, and then wait to hear from Miguel about whether
such labels can, in general, be replaced with their rhs (and replacing
the label's parameters with the corresponding symbols from the
enclosing scope, if necessary).
 Ah, got it now. Sounds like a good plan. Thanks.

--
Grzegorz Kossakowski

gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Re: Re: On jump removal once again
2011/6/14 Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com>
 Ah, got it now. Sounds like a good plan. Thanks.

Damn, I only realized that Miguel in his original e-mail said "I've completed the first half of its implementation". The other half is actual transformation that he discusses a bit here: http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2011Q1/JumpsRemover.pdf
Looks like I was so happy to solve forward jumps problem once and forever in my project that I didn't check basic facts...
--
Grzegorz Kossakowski

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland