Thanks to Zohar Babin for pointing me to some further information about the FlaCC project on the LLVM.org website. Scott Petersen gave a talk on August 1st at the Apple Campus for the "2008 LLVM Developers' Meeting".
The title of his session was "Flash C Compiler: Compiling C code to the Adobe Flash Virtual Machine" with the following session description:
FlaCC is a research project that compiles C code to ActionScript using llvm-gcc with a custom flash code generator. This enables almost arbitrary C and C++ code to be executed safely and efficiently within a Flash container on web pages. This talk describes the implementation of the system and shows several compelling examples that use it to run other language and CPU interpreters within Flash as well as run existing large programs within C. The demos are also extremely impressive :)
I took the time last night to read through the slides and watch the video. While a fair bit of the technical discussion is way over my head, here are some interesting points in the presentation that stood out to me:
■ ByteArray optimization was done and is shipping in the AIR 1.1 release (5:15) ■ Synchronous C to asynchronous AS3 classes (8:05) ■ Multi-threaded C code but no multi-threaded ActionScript (11:00) ■ Performance better than 50% of fully optimized native code (11:40) ■ Quake running on AIR 1.1 demo (13:15) ■ C AS3 API (17:00) ■ Initializing C library from ActionScript (18:50) ■ Python interpreter demo (21:20) ■ Nintendo emulator demo (23:20)
Of course the demo's of Quake and Zelda running in the Flash Player are extremely impressive, where I think this project is going to make a huge difference is apart from obviously allowing native C library extensibility for Flash, Flex and AIR, enabling Flash content to be created using Python and other languages.