satine.org

by Charles Ying

Archive for November, 2006

Inside Tamarin – Adobe’s Open Source Flash VM

Monday, November 6th, 2006

If you haven’t heard the news, Adobe has open sourced the Flash 9 JIT Javascript Virtual Machine, named Tamarin. This is exciting news, given that until today, all open source Javascript engines were variants on abstract syntax tree implementations, namely Spider Monkey and JavascriptCore.

Here are some of the important bits from a brief overview of the Tamarin source code:

Javascript Compiler

This is a full featured Javascript to byte code compiler. This allows for more efficient execution environments, profiling, code verification, and semantic analysis. If you wanted to build, oh, say, a Flash or AJAX to J2ME converter, you could write a VM to handle only byte-code created by this compiler (eval and such may not work, unless you ported the compiler as well).

JIT Byte Code VM

A high performance just-in-time byte code VM with targets for PowerPC Macintosh, Intel 32-bit and ARM processors on UNIX, Macintosh, and Windows.

Garbage Collection

Not much to say here, an incremental garbage collector with different implementations based on different strategies. This is an important component for embedded device memory management. This may also be considered for use by future browsers for DOM object memory management especially for Firefox.

ARM Port

Possibly the biggest news is that significant work already exists for an ARM build of the Javascript VM. This paves the way for high performance mobile or embedded device implementations.

If you are working on a browser or mobile scripted apps platform (AJAX, Laszlo, Flex, etc.) platform, this is a huge deal. With Firefox adopting the engine, and its performance and E4X language support characteristics, Tamarin and its offspring might likely become the defacto execution and compatibility benchmark for AJAX and any scripted environments in both desktop and mobile.

The current CVS version doesn’t compile cleanly out of the box on my PowerPC Mac, but I’m sure in a few days, once people realize how big of a deal this is, the project will get whipped into shape quickly.

Technorati Tags: , , , , , , ,