dyoo / whalesong

Whalesong: Racket to JavaScript compiler
http://hashcollision.org/whalesong
250 stars 30 forks source link

blocks that translate to a RT.si_context_expected(1) should be treated identically #39

Closed dyoo closed 13 years ago

dyoo commented 13 years ago

I can reduce a LOT of function tests here to translate to a single block.

dyoo commented 13 years ago

If a function return only accepts a single value, maybe we can get away with label.mvr being undefined. Then the call to mvr will end up looking like (label.mvr||RI.si_values_expected_1) This only shows up in about four places, and would allow me to avoid assembling a lot.

dyoo commented 13 years ago

Done. Darn, it didn't reduce as much code as I had hoped. The optimization does make the code a bit more complex. The optimization should be easy to rip out if it turns out to be too complex to maintain.