[pypy-dev] Fwd: [pypy-sprint] AVM2 / Tamarin backend at the sprint

Leonardo Santagada santagada at gmail.com
Thu Jan 3 22:34:42 CET 2008


The right place to discuss this is pypy-dev

Begin forwarded message:

> From: Toby Watson <toby at thetobe.com>
> Date: 3 de janeiro de 2008 19h18min11s GMT-02:00
> To: pypy-sprint at codespeak.net
> Subject: [pypy-sprint] AVM2 / Tamarin backend at the sprint
>
> Hi Everyone,
>
> I have a PyPy related idea - one I'd like to explore at the upcoming
> sprint in Leysin.
>
> Briefly the idea is to target Adobe's AVM2/AVMplus, the virtual
> machine shipped in Flash and donated as Tamarin (to be the Mozilla/
> Firefox JS engine). This in turn would open a number of possibilities,
> not least would be seeing a >>>> prompt sitting in a Flash app on a
> web page.
>
> As I understand it from some of the PyPy CLI/JVM docs I have been
> reading it is possible certainly to generate an interpreter, but
> possibly also a compiler for any particular platform, in this case
> using the oobackend.
>
> Just quickly, because I know many people do not know about (or
> care! ;-) what is happening in Flash, the recent version 9 release
> introduced:
>
> * A new virtual machine (AVM2)
> * With JITter compilation
> * Support for prototype and class-based ECMAscript styles (should be
> suitable as Python target)
> * Dynamic bytecode generation _and loading_ is possible (should be
> handy)
> * ActionScript 3/ECMAScript has strong typing and other more mature
> language features
>
> FYI:
> * Bytecode is called Actionscript Byte Code (ABC)
> * Another language (HaXe) has already targeted this VM successfully.
>
> With such a 'Flython' interpreter I would hope in time to be able to
> bind to Adobe's native and library classes and hence by able to :
>
> * Compile swf files from Python (for Flash) source
> * Build Flex apps (Adobe's GUI framework)
> * Target AIR (Flash desktop apps)
>
> About myself, my interests:
>
> 30-something developer of many, many interactive systems using a lot
> of different technology from web Python/PHP, through ActionScript to
> OpenGL/C++, C#, etc. I have written many small parts of compilers and
> language transformers, but never a whole compiler. I have experience
> with Agile development environments and Test-driven development.
>
> I've started digging around using Adobe's flex compiler, the open-
> source Tamarin engine, plus my own small swf decompiler and lots of
> public information to understand how the AVM2 VM works and Adobe's
> compiler infrastructure - separate compilation, linking, the bytecode
> etc.
>
> I am actually interested in developing new language/programming styles
> atop PyPy/Flython (if it did exist) and I like the Flash VM because it
> is web-borne and so widely distributed - essentially people could try
> out experiments in their browser without having to download/build
> anything.
>
> I don't know how much is possible in a week and of course much depends
> on me, but my goal would be to get a skeleton for the interpreter/
> translator and to sound out what all the issues are in targetting the
> AVM, binding to native classes and so on.
>
> I was considering writing another compiler specifically for this task,
> but after looking at Jython, IronPython, Boo and PyPy it became
> apparent that PyPy is quite mature now, may save a lot of time, and
> ultimately produce a more interesting result.
>
> I would hope that by adding another backend I could contribute to the
> fleshing-out of PyPy, help participate in the general maturing of the
> project and hopefully give the group a cool demo too.
>
> So...I hope to see some of you at the sprint and look forward to some
> interesting discussions!
>
> Kind regards,
> Toby


--
Leonardo Santagada






More information about the Pypy-dev mailing list