Combine single moves into parallel moves wordLang #130

xrchz opened this Issue Jul 27, 2016 · 2 comments


None yet

3 participants

xrchz commented Jul 27, 2016

The data_to_word compiler currently never produces parallel moves, but wordLang supports them and word_to_stack compiles them well. An inspection of some code Yong Kiam produced with the compiler shows that there are a lot of single Moves that ought to be lumped together.

myreen commented Jul 30, 2016

A closer look at the compiler suggests that the right way to fix this is to avoid producing the moves in the first place. I believe the right fix is to attempt to change this line in bvi-to-data:


 else (Skip, [EL v env], n)) /\

Yong Kiam pointed out in a recent email that it would be better still to use a version of EL that doesn't produce side conditions when run through the translator.


As Magnus suggests. combining single moves isn't that important after 5e7fbf8

The remaining moves generated in bvi_to_data arise when one needs to merge the results of the two branches of Ifs and Calls (with handlers). It might be possible to optimize it so that a Move is only needed for one of these branches.

It might still be nice to do a parallel moves pass in wordLang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment