compilers

Par Winzell zell at threerings.net
Thu Jun 5 06:20:29 PDT 2008


We have a pretty massive ActionScript 3 application; upwards of 2000 
classes, currently running client-side. About a third of this bulk will 
also now be running server-side thanks to the glory of Tamarin.

But we're running into pretty substantial compiler problems.

ASC, on one hand, has no concept of class->file mapping, so it cannot be 
given a target file and incrementally bring in referenced source from 
class paths; in fact, even if you feed it a huge list of files, the 
com.macromedia.embedding.Main version won't try to sort them according 
to inheritance dependency. It seems clear that ASC as it stands now is 
meant to compile small scripts, not large structured applications.

Rather than trying to rewrite ASC (perhaps port ScriptCompiler's 
ordering code to Main), I just recently turned my attention to 
Compc/Mxmlc in the hope that they could be convinced to generate ABC 
directly. I had some success here, playing with ConsoleApplication, but 
I've yet to be able to get these programs to read ABC files as imports.

Having to generate both SWC's (for compiling applications) and ABC's 
(for feeding to Tamarin) is possibly doable but a bit cumbersome.

So, what I'm curious about is, are there any plans at Adobe or Mozilla 
to extend either the abilities of ASC or the binary-friendliness of 
Compc/Mxmlc to fill this gap?

If not, is there something I missed that might make our task easier? I'm 
not averse to a fair bit of hacking on the source, I just don't want to 
needlessly reproduce efforts already undertaken.

I realize this query may not address Tamarin development directly, and 
that likely you're much more interested in ES4 and Tracing than what we 
are trying to do -- but it does still seem relevant to Tamarin 
generally; most AS3 developers are surely used to packages being 
mirrored by directory structure, and not having to list every dependency 
manually.

As always, thanks for your time!

Zell



More information about the Tamarin-devel mailing list