Quoting Frank Wienberg <fr...@jangaroo.net>:
Hi Mike,
great to hear you are well again and have some time to spend on the AMD
approach!
My plan is by Friday the compiler will be outputting the exact code
you have in the github repo.
On Mon, Feb 4, 2013 at 12:56 PM, Michael Schmalle
<apa...@teotigraphix.com>wrote:
Frank,
I am starting on this and you have confused me starting off. The wiki
entry under the header of "Implementation Solution" does NOT look at all
the same as your A.js production in the 'as-js-runtime-prototype' source
code.
What am I missing? Which is the correct way you want this output. I
thought you put the GIT repo up so I could see an implementation using
classes and interfaces together.
I set up the as-js-runtime-prototype first, before I started implementing
this solution in the Jangaroo compiler. As always, when I implement (even
my own) specifications, I find flaws and missing aspects or things you
could do more cleverly.
I work like this to, just look at the commits and changed to FalconJx
up to this point. :)
So *after* implementing the AMD approach with Jangaroo 3, I wrote down the
final design on the Wiki page. I tried to include sufficient concrete code
examples, but I can totally see that an updated and Wiki-page-consistent
as-js-runtime-prototype would help, too.
Please stand by for the latest code, and please for the time being, use the
Wiki page as reference.
Sorry for the confusion!
No that is fine, I actually read the whole wiki page this morning and
understood it, my brain wasn't working the last 2 weeks.
Until you get that updated code up, I will just work in the more
"expression" type emitting for now.
I will be honest, when we were talking about line numbers, I thought you
were talking about MATCHING AS Exactly but, in your example you are just
referencing them on the expression statements correct?
Yes, the source line number references in the generated code are a way to
get around some indirections Jangaroo needs to get each line of generated
code into exactly the same line as the source code. This is the difference
between the solution I implemented for Jangaroo and the solution I propose
for FalconJx. If you take Jangaroo 3 compilation results like the ones from
the Open Flash Chart
demo<http://jangaron.net/ofc5/data-files/joo.html#joo.debug> (for
example charts.Area) and "inline" all member functions declared in the
upper part into the "Jangaroo part" at the end of the file, you'd end up
with my FalconJx proposition. What you save is to give all method functions
a name, which could clash with other identifiers.
I guess that's how I am gonna re-create the as-js-runtime-prototype
JavaScript code: Compile the original AS3 sources with Jangaroo 3 and
inline the member functions and initializers.
If you need more / other examples of how the JS output of some AS input
should look like, I can thus create it for you in no time. You could even
do that yourself (if you prefer), by checking out the "jangaroo-3" branch
of jangaroo-tools <https://github.com/CoreMedia/jangaroo-tools/> and
building it via Maven. For the compiler integration tests, there are *.as
files that are automatically compiled.
If you have any more questions, I am here, listening!
Like I said, once you get the updated code, I should be good to go,
then we can hit the edge cases.
Mike
Greetings,
-Frank-
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com