Quoting Alex Harui <aha...@adobe.com>:
On 12/29/12 8:26 AM, "Michael Schmalle" <apa...@teotigraphix.com> wrote:
FWIW, my understanding of Falcon is that each class source file is a
compilation unit and compilation units are parsed in separate threads.
Therefore there is no actual point where all ASTs are sitting
around. I can
see a callback when the ASTs for a individual compilation unit is ready to
be reduced, but I don't know if you can or want to synchronize all AST
generation across all compilation units.
I think you're half correct. If you look at it from a parsing point
your correct, but if you look at it from a definition compilation
point it's incorrect.
To create a SWF file, Falcon uses the Workspace and a step to
reconnect all scopes which is syncornized after all compilation units
have been parsed.
I hadn't noticed that. I will look for it next time I'm wading through the
compiler. What I thought I saw was that a unit would request abc from
another unit, which would result not only in its parsing but in its
reduction to byte code which I would think you would want to avoid if you
are trying to sync everything up.
Well I'm not in the mood to stick my foot in my mouth so I am on a
mission to demystify the compiler's actions.
I will post my result on the wiki. I have to many projects I want to
do now where not "konwing" this exactly is going to end up wasting my
time.
I know when I wrote ASDoc, I was able to resolve everything but I used
the MXML compiler as a base. I just need to really understand what is
going on now. I takled the multithreading in FalconJx, but when I
debug, the multithreading is over after;
final File outputFolder = new File(outputFile.getParent());
List<ICompilationUnit> reachableCompilationUnits = project
.getReachableCompilationUnitsInSWFOrder(ImmutableSet
.of(mainCU));
Once this returns I swear it's synced back on 1 thread. After that
call I loop through all reachable units and produce .js files for each.
Mike
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com