Sunday, February 28, 2010

12h, and one bug later

A full compile by the slow ML-interpreted to C compiler takes a whopping twelve hours - after, in the last phase, it ended with a happy bug... Which is annoying, since I want to bootstrap the Grafwegen Hi to C Compiler, called GHC, uh, I mean Hic.

Meanwhile I am documenting it.

030110: Ran it again for stats. Compiled it down to 4139 basic combinators, which is okay. Most of the time is spend producing expensive debugging output. The bug is in the code-generation, guess I'll print that part.
030210: After a fix, it stalls on the last phase, emitting code/calculating a large list of lines of C. I stopped evaluation on 1.3Gig memory, probably ocaml/unix is wasting more time on garbage collecting/swapping than anything else. Removed the semantics code for an intermediate compiler - should save around 25% memory - next try - emit each line directly?

What now?

No comments:

Post a Comment