Just to back up what I am saying about codegen refactor;

Look at 'org.apache.flex.compiler.tree'

and

'org.apache.flex.compiler.internal.tree'

Basically, the are saying we have a bunch of different types of 'trees' but they are all trees so each 'type' of tree gets it's own sub package in tree. This is what I am proposing for codegen. We have a bunch of different 'types' of codegen, but they are all codegen so each type of codegen gets its own sub package.

You see the symmetry here?, You said you like symmetry, so there you go.

We can have the 'common' API for codegen in the root of codegen so you can see the 'common' API by just opening up codegen but at the same time see the different types of code gen subpackages, as, js, mxml.

By using this layout, none of the API is spread around in duplicate package naming.

I will change this if you agree, if you don't agree I guess we will have to vote on it or something because this seriously needs to get out of the way before any more development is done. (we need to know you and I are on a level commit base)

Mike


Quoting Michael Schmalle <apa...@teotigraphix.com>:

Erik;

renamed IASNodeStrategy to INodeStrategy

I disagree, please rename that interface back to IASNodeStrategy.

The only method it has is handle(IASNode node), notice the IASNode. It is a IASNode handler strategy.

Can we please be a little more pragmatic at this refactoring and renaming? I don't understand what compelled you to want to rename that interface.

I'm really not liking this 'common' folder at all. I really believe common API belongs in it's own package, not sub packages of a common directory. Look at how the falcon framework is laid out, they do not abuse the common directory.

Putting codegen and things on a common directory when there is already a codegen directory is redundant and confusing for others in the future. That being said, I said it was MY mistake not making a codegen and driver directory in compiler. If you want to refactor, do it right and make a codegen, driver in the compiler, then move the 'as', 'js' and 'mxml' into the codegen package and axe the common package.


Mike


Quoting Erik de Bruin <e...@ixsoftware.nl>:

Mike et al.,

I have a reasonably big commit lined up. To make AS embedded in MXML
work without doing duplicate work, I figured I could best use the
existing ASEmitter and subclases. To make this work, I needed to add
an ASBlockWalker to the MXMLBlockWalker and make adjustments to some
existing code (refactoring of interfaces and method signatures,
mostly). I was able to keep most of this trickery limited to MXML
classes, but I needed to make some changes to these 'common' and AS
classes:

- renamed IASNodeStrategy to INodeStrategy, as it is now 'common' and
used by both AS and MXML; this renaming touches 'a few' other classes,
like IJSEmitter and the classes in
'org.apache.flex.compiler.internal.as.codegen'
- created IBlockVisitor and IBlockWalker as 'common' interfaces
- refactored IASBlockVisitor and IASBlockWalker to extend these new interfaces

All tests pass (I even managed to get a few more done for FlexJS) and
the road ahead seems clear...

Let me know if any of this will break anything beyond repair - or at
least beyond a little time spend adjusting code to the new - if I
commit these changes,

EdB



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com



--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to