Flash, C/C++ and LLVM
November 18th, 2008
The most interesting thing Adobe has recently announced at Adobe MAX is (easily) Alchemy. It adds some modest support for C/C++ in Flash, but this is still nothing compared to how they did it. Tucked away in the Alchemy FAQ it mentions they used LLVM to do the job. It works by compiling C/C++ to the LLVM instruction set and then converting that to Flash bytecode.
LLVM is intended to act as a medium between a language and an instruction set. If you write a language that compiles to LLVM instructions, you automatically support any instruction set that LLVM supports. If you write a back-end that can understand/convert LLVM instructions, you support any language that compiles to LLVM instructions.
So basically, Adobe may have just opened the door for Python, Java, CIL/.NET languages, and others. I doubt they work right now (I haven’t had the opportunity to try Alchemy yet), and support for Flash’s API would be missing of course, but it appears to be coming.
November 18th, 2008 at 7:57 pm
*mouth drops to the ground and eyes get wide* can you just imagine! o.o… That glories day when you can code in Python, Ruby, Java, .NET (C#, VB, etc) and have it all compile to a SWF… My god! It’s like some sort of wet dream :-D God I hope this day comes :-P
November 18th, 2008 at 10:50 pm
Scott Peterson talked about this, including showing Python on Flash, in his talk at the LLVM dev conference: http://llvm.org/devmtg/2008-08/Petersen_FlashCCompiler_Hi.m4v
November 19th, 2008 at 2:51 am
You can compile your c# application to actionscript 3 today!
Look at http://jsc.sf.net or
http://zproxy.wordpress.com/jsc-javascript-script-compiler/
November 19th, 2008 at 2:54 am
[...] C To ActionScript via Alchemy Filed under: jsc — Tags: actionscript, adobe, alchemy, c# — zproxy @ 6:54 am News by BrokenBlog: [...]
November 19th, 2008 at 12:15 pm
Hmm -iam waiting for the ultimative program which composed every pros… But this are only dreams XD
July 10th, 2009 at 4:03 am
The ultimate program? Like an AI which can develop other programs? :) Maybe in 9 years?
October 16th, 2009 at 10:52 am
Seems to me like an awkward thing to do… what I *would* like instead, is a flash bytecode JIT compiler/engine with LLVM (with all its cool optimization features). Now THAT would be something :)