Part 1: The Monkey of Action

Hi. I’m Jason Orendorff (jorendorff on irc), newly minted Mozilla hacker and your self-designated guide to the ongoing saga of the ActionMonkey project.

The goal of ActionMonkey is to integrate the new Tamarin JavaScript virtual machine into Mozilla. Of course, Mozilla already has a very good, very fast JavaScript VM (called SpiderMonkey). Tamarin is even faster, because it has a just-in-time compiler (JIT) that compiles JavaScript down to machine code. Firefox, of course, being increasingly written in JavaScript, craves any speed boost it can get.

But that’s not all. Tamarin is also the way forward on the memory management front. As it stands, Mozilla uses reference counting pretty heavily; it even includes a (relatively new) cycle collector that detects refcount cycles, even cycles that pass from C++ to JavaScript and back again. If that sounds a bit hairy, it is. Furthermore, SpiderMonkey’s exact GC puts a pretty big burden on the C++ developer to make sure all pointers to JavaScript objects are properly visible to the garbage collector. Tamarin contains a conservative garbage collector (called MMgc) that we would like to use throughout Mozilla to boost speed (a little) and help ease the developer pain of refcounting and exact GC.

There are also some, er, interesting challenges ahead. More on those later.

Leave a Reply

Your email address will not be published. Required fields are marked *