Writing the unit tests for the serialization code. Since this is code which has to be compiled by the ocaml interpreted Hi to C, stage 1, compiler, I am again looking at not-even-snail-speed compiles. Got rid of a few bugs... (Guess I should print again. For some reason, staring at a screen for too long makes one word-blind.)
Woke up. Serialization works, now for the reverse, and the serialization code for the AST. I serialize text representations of integers since these are the closest primitives I had in the language. At some point, I should just serialize/write the bit representation directly. But that's, again, for later.
My mind is getting better; there were some thoughts again when I went to bed. One performance thought, I followed my stack representation faithfully, which means that when I push the first thunk in a series, inheriting code follows that thunk, and expansion with extra arguments (through a C call and a copy of the original thunk) is done afterwards, if necessary. Where I guessed necessary wouldn't be quite often. It doesn't make sense; I should factor that out and just generate the right code for the first thunk at some point - I'll leave it for now.