Pete's Log: compile-o-rama
Entry #775, (Coding, Hacking, & CS stuff)(posted when I was 22 years old.)
My code I'm contributing to compilers now includes a bizarre comment that few will understand. But if they look for it, maybe Arun and George will get it, and possibly even appreciate it. But that assumes they'd want to look at this code.
I'm not exactly happy with how this code is gonna turn out. But circumstances beyond my control are at work here. But one of my goals is to make the code compile with compilers other than g++. At this point I don't know what varieties of g++isms are in this code right now, since I've not looked at much of it, but maybe when I need a break from real coding I will work on it.
So my current task is to write a translator from Demian's (a)AST to an IR. Original plan was to adapt the IR in the tiger book to suit my purposes, but Dr Freeh wants a rather high-level symbolic IR, and Appel's is quite a bit lower than that. So I'm adventuring in the realms of creating my own IR while trying to figure out how Demian's frontend compiler works. I'm very proud of myself for my compiler last year, turns out that a year later I can still read the code easily. It's not great code in some places (design decisions during earlier phases proved to make later phases do some silly things) but it's readable, and it works. And having that as a reference is proving quite valuable.
I'm also being majorly affected by the fact that I've not hacked any C++ (beyond 232 stuff, which ain't C++) since before last summer. So I'm trying to elevate myself from my usual C coding practices back to the world of C++. Ain't trivial. Ain't too bad neither, tho.
Rumors are Dr Freeh may have some money to spend. I should beg for a new monitor. This one suX. With a capital X.