SpiderMonkey's relative Tamarin joins the family
Today Adobe announced that the ECMAScript 4 compatible virtual machine in the Adobe Flash Player has been contributed to the Mozilla project under the name Tamarin. It is the single largest contribution to the Mozilla foundation since its inception and consist of about 135.000 lines of source code. The engine is fully open source using the standard Mozilla license, with the Mozilla foundation retaining full ownership.
What does this mean?
- I anticipate that Tamarin will become the reference implementation for ECMAScript 4 VMs. Most of you have probably not realized yet, but ActionScript 3 IS an ECMAScript 4 compatible VM (or at least the closest one as one of my coworkers wants me to point out). Yes, it is the implementation of a standard and not something Adobe has made up. Yes, I know ECMAScript 4 was and still is preliminary, but the changes which will be adopted before it goes official will probably be extremely minor (depending on which further additions get approved though).
- Adobe does NOT open source the Flash Player by doing this. Just the Verifier, JIT, core frameworks and the garbage collection engine are now open source. Also important to note: The java based compiler which converts ECMAScript 4 to the byte code understood by Tamarin is not included in this agreement. Instead the focus will be an ECMAScript 4 based compiler, which will be required for eval() to work anyway since we don't want to pollute Mozilla with too much Java code. Adobe Flash Player 9 does not support eval() to keep the binary size of the Flash Player to a minimum. Our focus on the Java compiler was required to support Flex Builder 2.
- The plan is that Mozilla and the Adobe Flash Player will share the exact same code base now and in the future. There is no plan to fork the virtual machine at any point. Changes which go into the Mozilla source tree will be directly adopted by Adobe and vice versa.
- Mozilla might adopt the conservative garbage collector even for SpiderMonkey. Again, what most people do not realize is that we made the switch from a simple reference counting system to a more advanced mechanism for ActionScript 1&2 while maintaining backwards compatibility. This was an incredible challenge. In case of the Adobe Flash Player this resulted in about half the memory requirements in many situations. This would be a huge boon for AJAX based applications, in addition to resolving circular reference issues if they still exist in SpiderMoney.
- If you study the source code you'll realize that a 64bit port is NOT a recompile away. We are actively working on the 64bit port, the source code right now is still 32bit until the changes required are stabilized.
Labels: tamarin actionscript