Skip to content

Conversation

@sunfishcode
Copy link
Member

@sunfishcode sunfishcode commented Aug 2, 2016

Following up on discussion in #741, this PR proposes removing loop's exit value. If branch arities are moved to block and if as proposed, this change eliminates the need for loop to also have an arity immediate, which would simplify a common validation strategy.

I expect this change to have little negative effect on code size or expressiveness, because (loop x y) could usually be written as (loop x) y, and the change would also eliminate an immediate field on every loop.

@titzer
Copy link

titzer commented Aug 2, 2016

This mostly looks good to me, but I think it does depend on the outcome of #741. It's probably the case the value-returning loops is quite rare, and in that case one can surround the loop with a block that does return a value and branch to it.

@sunfishcode sunfishcode added this to the MVP milestone Aug 2, 2016
@lukewagner
Copy link
Member

+1

@sunfishcode
Copy link
Member Author

The current evolution of block signatures has them applying to loop as well, making this change less important.

@sunfishcode sunfishcode deleted the no-loop-result branch September 15, 2016 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants