Dynamic languages, such as JavaScript, Python, Lua and Ruby, are increasingly popular amongst programmers at large, and virtual machine technology is constantly evolving to keep pace. This seminar aims to show both the gritty details and the high-level ideas of implementing VM's for dynamic languages. It is being taught by Gregor Richards.

The course grade breakdown is: 50% projects, 25% presentation, 25% final. The final will be an project for each student or group of two students. There is no precise structure to the final project: Each student or group will discuss project ideas with the instructor until one is agreed upon. Typical projects would be to extend SDyn or write a paper on a relevant topic. The instructor's expectation for group projects will be double that of his expectation for individual projects.


Projects will be due on February 8th, February 22nd and March 8th, with the final project due on the final day of class. Each project will be assigned well before the due date of the previous, and all required course material covered well before as well.

In most of March and April, students will present papers. We will figure out the exact schedule closer to then.

Until then, we'll do standard lectures, with a heavier weight on JIT-related material at the beginning and on GC-related material at the end.

Reference Material

I will be using a mix of slides and other forms of presentation, and will post files here shortly after they're presented in class.

Live JIT demo


To explore “the gritty details”, this course will use a simple dynamic language implementation called SDyn. As a JIT, SDyn is not intrinsically portable: At present, it works on x86_64 Unix only. Slightly specialized versions of SDyn will be provided for the projects. SDyn is available here. How SDyn works will be discussed in class.


This course has three software implementation projects, accounting collectively for 50% of the grade, each with equal weight. Yes, this means the actual percentage value of each project is an awkward 16.66 repeating%.

Project 1: Inline caching

The first project is to implement inline caching, as discussed in class, in SDyn. It is due on February 8th. A patch, sdyn-1.3-inline-cache-scaffolding.diff.gz, which adds the scaffolding to implement inline caching. Alternatively you may download sdyn-1.3-w-inline-cache-scaffolding.tar.gz, which is sdyn 1.3 with the patch preapplied.

Project requirements document

A brief explanation of the inline caching scaffolding patch: For each cacheable access site, the JIT creates a SDyn_InlineCache object. An SDyn_InlineCache* is passed to each function which accesses members of objects. You must define SDyn_InlineCache in h/sdyn/value.h , and use it in the relevant functions in value.c to implement caching of object shapes.

Project 2: Speculation

The second project will be to implement type speculation in SDyn. Further details will be posted here.

Project 3: Mark-and-Sweep GC

The third project will be to replace the good generational garbage collector in GGGGC with a much-inferior mark-and-sweep one. Why would you do this? ... well, because I said so, I guess.