Course focusing on JIT compilers?

Is anybody aware of university courses (or textbooks) with a focus on the design of just-in-time compilers (JITs)? (Basically, as alternative to a standard compiler construction course)

In the last few years there has been some interesting research on the topic of JITs, (many being mentioned here on LtU), e.g., the Javascript JITs (TraceMonkey, Google V8), the PyPy JIT, LuaJIT, the recent story about verified JITs, Factor's compilation strategy might also be of interest, etc..

So far, I have not found any course focusing on JITs. At most, some compiler construction courses mention JIT technology (usually Java's) in passing. The textbook situation seems to be equally bland.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Textbook

There is only one book (not really a textbook) I know of dealing with just-in-time compilation, and it's basically a guy's Ph.D. thesis on E-Bunny, a JIT compiler for embedded environments.

A Dynamic Compiler for an Embedded Java Virtual Machine by Sami Zhioua

Past courses

Thanks! I will have a look!

A link to the memory allocation part

The JIT specific aspects of compilation are, I guess, on the fly profiling (for those JIT that don't do something more basic like just translate loops) and memory allocation. What did I leave out? This blog post and the ensuing comments discuss the memory allocation on modern unix (with mmap) and Win32.

JIT specific aspects

[...] on the fly profiling [...] and memory allocation. What did I leave out?

Besides the points you mentioned, I would expect to start with a language interpreter, hence bootstrapping issues would be different compared to a traditional compiler. Mixed-mode interpretive/compiled execution would be an addition. Trading off compilation speed vs. JIT time (to reduce start-up lag); I would expect this to affect the choice of intermediate representation and optimizations in a JIT.

Then there's run-time code generation issues (i-cache invalidation, etc.), on-the-fly profiling probably includes polymorphic inline caching, how JITs interact with debuggers (deoptimization; we can pull in here quite some Self technology), multi-threaded JITs (background compilation, also something you won't normally see in an AOT compiler). Also, JITs are used to speed up CPU/full-system simulators, do they have the same design as, e.g., a JavaScript JIT?

However, there is of course a big overlap with traditional compilers, so students would still learn about parsing, type inference, intermediate code representations, optimizations, register allocation, code generation, etc..