Wednesday, June 23, 2010

Log 062310

I decided it just doesn't make sense not to implement a combinator intermediate, so again, a zillion steps back, one step forward.

It's an annoying step. I've been going backwards and forwards between two representations, and thought it would just be the easiest to maintain some invariants in lambda expressions. In the end, it just doesn't make sense. The invariants are ok-ish (a series of applications is a thunk), but don't deal well with corner casess (one single combinator should set up a thunk too). The approach isn't faster (compiling to a simpler intermediate is better than transforming complex ones), and in the end, an intermediate for combinators is just more straightforward, better analyzable and better readable, even if it means introducing some new code.

062310: It's mainly refactoring in the end. So, explicit code came out fluently, it cleaned up.
062410: Decided again that sleep is a waste of time. Generated code seems to pass the basic runtime checks; next, see if it compiles the system library.

No comments:

Post a Comment