Quoting Alex Harui <aha...@adobe.com>:
On 12/29/12 5:19 AM, "Roland Zwaga" <rol...@stackandheap.com> wrote:
Hm, sounds pretty sweet. If its not too much work to create a small
experiment to proof your theory than this could be a worthy approach :)
Generating extra classes etc shouldn't be a problem I suppose?
What the AOP bits would do, in a nutshell, would basically be renaming an
existing class, creating a new class with the old name of this class (and
making it a subclass of the original) and then creating overridden methods
in the new class.
Questions: why isn't this more like injecting an include file into a class's
source code? Why rename the base class and add more classes to the mix?
Come to think of, with this approach we wouldn't even need to inject
subtrees into existing AST's... All I need to do is rename certain classes,
I'm guessing that that wouldn't be too much of a hassle, right?
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.
The hook would be at the step of reconnection where all compilation
units connect to their super classes etc.
Mind you, this is all speculation and things need to be ironed out.
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