Main menu:

Site search



Archive for May, 2008

Tamarin Tracing Internals V: Running Compiled Traces

Whew. Reading all this TT code is fascinating, but also tiring, hard work. Anyway, I’ve hit almost all the high points by now, and I’ve traced out the JITting process all the way from ABC bytecode to native compiled traces. The questions I have left are about how traces actually get run, plus some related […]

Tamarin Tracing Internals IV: Trace Optimization

In part III, I went over how TT generates LIR traces. Now, I’m going to look into the trace optimization and machine code generation process. The code for this is mostly in the nanojit/ directory. Keep in mind that a trace is always straight-line code in SSA form. This makes optimizations easier to implement, so […]

Tamarin Tracing Internals III: LIR

Program Form 3: LIR. I believe LIR stands for low-level intermediate representation (although I’ve also heard linear intermediate representation). Typically, in a compiler or VM LIR is the lowest-level (and last) form of machine-independent compiler representation, and looks much like a machine-independent assembly language. TT’s LIR plays the same role but has some special features […]

Tamarin Tracing Interals, Part II: Forth

The Need for Forth Subroutines. I had a really hard time tracking down how TT adds a pair numbers (ActionScript code like “sum += i”) worked until I finally figured out that ECMAScript “+” is not a primitive operation in TT. This makes perfect sense now, as “+” is complicated: it has to do different […]

Tamarin Tracing Internals, Part I

Tamarin (technically, tamarin-tracing, henceforth TT)-related projects keep peeking up at me from the horizon. First, there’s a good chance I’ll have an intern working on TT this summer. And then there’s this “Tracehydra” idea. It’s a way to connect Spidermonkey’s JS parser with the TT execution engine. This is the plan: Where “profit” means “run […]