[Laszlo-dev] For Review: Change 20080209-dda-7 Summary: SWF9 mixin support
dda at ddanderson.com
Sat Feb 9 11:28:53 PST 2008
Change 20080209-dda-7 by dda at lester.local on 2008-02-09 13:57:38 EST
Summary: SWF9 mixin support
Bugs Fixed: LPP-5266
Technical Reviewer: ptw (pending)
QA Reviewer: promanik (pending)
Doc Reviewer: (pending)
The mixin support follows the design given by Tucker in LPP-5266.
In SWF9Generator, when a mixin is seen, it is recorded in
For each use of a mixin combination, the needed interstitials are
the mixinRef hashmap, and all we need to do to the referencing
class is change
its superclass to be the interstitial.
Each mixin declaration AST is duplicated - one is processed
like a class and one like an interface.
now knows three ways to process a class - the third being to
create a property list).
The 'interface' version of the mixin remains in the parse tree
and is emitted
as the interface. The 'class' version of the mixin is what is
put into mixinDef.
After we are done processing the AST, we visit the mixinRef map
and for each entry,
we append a new class to the parse tree that implements the
In unparsing, we need to track the current class name, since
interstitials need that as their name (and not their original
name which matches
the mixin). Arguably this could be handled when the tree is
created, but currently
we are sharing all the contents of the interstitial AST with
possibly other interstitials.
Also in unparsing, bodies of functions for interfaces are handled
we must track when we are in an interface.
The changes only affect the implementation of mixins for SWF9.
It should be
That seemed too big for this moment.
regression tests: smoke/lzpix/weather for DHTML, SWF8 and henry's
hello for SWF9
mixin tests: for this, verified they compiled and checked
contents by eye.
constructors in mixins
public/private methods in mixins
vars in mixins
mixins can appear after usage
overridden methods possible
Not yet tested - converting LFC9 classes back to use mixins.
Java/C/C++, Berkeley DB, systems consultant
email: dda at ddanderson.com
More information about the Laszlo-dev