Firefox 3.6 is the first Firefox release that has my code in it. Much of it was written over six months ago, so it’s nice that it’s finally seeing the light of day. It’s also fun to know that my code is running on the machines of my friends and family; that’s new for me.
One friend asked what my specific contribution to the release was. I said “in some cases it might be a little faster and a little less likely to crash”. At the December all-hands, when people asked me what I’ve been working on, I said “filing the sharp edges off Nanojit“. Nanojit is the JIT compiler back-end used by TraceMonkey; it translates a low-level intermediate representation called LIR into native code. It has some clever features and does a pretty good job in many respects but a year ago a lot of its code was, well, awful. It’s now much better: simpler, faster, with fewer ways to go wrong, more internal sanity checking, and better testing (including some fuzzing). And many of these improvements didn’t make it into 3.6.
I have a few more fixes to make, but Nanojit improvements are winding down, and my attention will soon be focused elsewhere within TraceMonkey. I thought that I would be spending some time this year improving the quality of Nanojit’s code generation, but I’ve found that the quality is already pretty good. This perhaps isn’t so surprising because LIR is so low-level that it’s pretty close to machine code. However, while determining that I found that the LIR generated by the TraceMonkey front-end is often awful. It looks like there is some fat to trim there!