You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Michael Schmalle <te...@gmail.com> on 2015/06/10 13:55:10 UTC

[FalconJX] Unit test shows full use of pure actionscript to javascript compile

Fred and others;

I just committed a unit test that shows the full meal deal.

TestExternalsJSCompile.java

1. parse/compile externs .js using GCC compile()
2. emit .as from compiled externs AST
3. create JS.swc from emitted .as files
4. load FlexJS backend and compile with no playerglobal.swc, only JS.swc
5. cross compile Main.as that uses the DOM API/JS.swc into Main_output.js
file.

So now you can see exactly what is going on without me confusing you with
the internals of what is going on.

Peace,
Mike

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Michael Schmalle <te...@gmail.com>.
Ok, that is inline with what I was thinking.

Let me know if you get the JS.swc, then I know I am not just hallucinating
all this. ;-)


OT; Now that you got the asdoc tokenizer working what are your thoughts
about me adding that code I have had for 3+ years to the project?

If so, where would it go? I created a front end compiler but I see you had
stubbed something, I could hook into that with the main application code.

Like I said it generates the same asdoc using Velocity templates, so we
would need a velocity.jar and whatever else dependencies. There are bugs I
am sure in some of the templates but... you know.

Mike


On Wed, Jun 10, 2015 at 12:32 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/10/15, 9:19 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Alex, excuse my ignorance but "what" are your plans for integrating this,
> >are you getting the JS.wsc to be built?
>
> I’m just about to pull your change and see if I get a JS.swc.
>
> I haven’t really thought through “what”.  I may need to play with it a bit
> first.  My early thoughts are:
>
> 1) put JS.swc in the Falcon nightly build
> 2) Have the FlexJS Installer add JS.swc to what gets installed.
> 3) Create new .bat and shell scripts to run with any different compiler
> options
> 4) Create a new FB Launch Configuration as well.
>
> Then I think folks can use the Flex SDK Installer to install the FlexJS
> Nightly and try this stuff.
>
> -Alex
>
>

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Alex Harui <ah...@adobe.com>.

On 6/10/15, 9:19 AM, "Michael Schmalle" <te...@gmail.com> wrote:

>Alex, excuse my ignorance but "what" are your plans for integrating this,
>are you getting the JS.wsc to be built?

I’m just about to pull your change and see if I get a JS.swc.

I haven’t really thought through “what”.  I may need to play with it a bit
first.  My early thoughts are:

1) put JS.swc in the Falcon nightly build
2) Have the FlexJS Installer add JS.swc to what gets installed.
3) Create new .bat and shell scripts to run with any different compiler
options
4) Create a new FB Launch Configuration as well.

Then I think folks can use the Flex SDK Installer to install the FlexJS
Nightly and try this stuff.

-Alex


Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Michael Schmalle <te...@gmail.com>.
On Wed, Jun 10, 2015 at 12:55 PM, Frédéric THOMAS <we...@hotmail.com>
wrote:

>
> > HAHAHA Damn, I just had a brain flash, I I rewrote the compiler to have
> > everything that is a base extend JSObject, it would work in IntelliJ!
> haha
>
> It was what I meant :)
>

Word, I am thinking about it more, it's doable but not easy. :) I have to
still have Object for COMPC to be happy but, I am sure I can get it to
work, since IntelliJ will only care about what extends JSObject and discard
my Object definition.

Mike



>
>
> Frédéric THOMAS
>
>
> ----------------------------------------
> > Date: Wed, 10 Jun 2015 12:53:21 -0400
> > Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to
> javascript compile
> > From: teotigraphixllc@gmail.com
> > To: dev@flex.apache.org
> >
> > On Wed, Jun 10, 2015 at 12:50 PM, Frédéric THOMAS <
> webdoublefx@hotmail.com>
> > wrote:
> >
> >>
> >>>> Also, have you seen anything that might suggest we can disable
> >> IntelliJ's
> >>>> ECMA natives so it uses the JS.swc Object definitions?
> >>>
> >>>
> >> AFAIK, you can't switch to another ECMA file, it is hardcoded for the
> >> Flex Plugin, a simple go to definition on Object and you will see the
> >> lib it depends on, in JS, they did it more flexible, not in Flex.
> >>
> >> Can't you change the name with something like JSObject and change it
> back
> >> at compile time instead ?
> >>
> >
> > The problem with this is for natural flow, everything extends Object. So
> > for a normal object incode, you would not get what JSObect was. Do you
> get
> > what I mean?
> >
> > We can make a JSObject but in IntelliJ, it will not be the base class of
> > everything.
> >
> > HAHAHA Damn, I just had a brain flash, I I rewrote the compiler to have
> > everything that is a base extend JSObject, it would work in IntelliJ!
> haha
> >
> > Mike
> >
> >
> >
> >>
> >> Frédéric THOMAS
> >>
> >>
> >> ----------------------------------------
> >>> From: webdoublefx@hotmail.com
> >>> To: dev@flex.apache.org
> >>> Subject: RE: [FalconJX] Unit test shows full use of pure actionscript
> to
> >> javascript compile
> >>> Date: Wed, 10 Jun 2015 17:44:06 +0100
> >>>
> >>>
> >>>> Fred, Anything you need help on or questions about the compiler just
> >> ask.
> >>>
> >>> Thanks.
> >>>
> >>>> Also, have you seen anything that might suggest we can disable
> >> IntelliJ's
> >>>> ECMA natives so it uses the JS.swc Object definitions?
> >>>
> >>> AFAIK, you can't switch to another ECMA file, it is hardcoded for the
> >> Flex Plugin, a simple go to definition on Object and you will see the
> lib
> >> it depends on, in JS, they did it more flexible, not in Flex.
> >>>
> >>> Frédéric THOMAS
> >>>
> >>>
> >>> ----------------------------------------
> >>>> Date: Wed, 10 Jun 2015 12:19:16 -0400
> >>>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript
> >> to javascript compile
> >>>> From: teotigraphixllc@gmail.com
> >>>> To: dev@flex.apache.org
> >>>>
> >>>> Alex, excuse my ignorance but "what" are your plans for integrating
> >> this,
> >>>> are you getting the JS.wsc to be built?
> >>>>
> >>>> Fred, Anything you need help on or questions about the compiler just
> >> ask.
> >>>>
> >>>> Also, have you seen anything that might suggest we can disable
> >> IntelliJ's
> >>>> ECMA natives so it uses the JS.swc Object definitions?
> >>>>
> >>>> Mike
> >>>>
> >>>> On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <
> >> webdoublefx@hotmail.com>
> >>>> wrote:
> >>>>
> >>>>>>>So, why to generate the .abc and compare its modify date while we
> can
> >> do
> >>>>>>>that with the source file ?
> >>>>>>
> >>>>>> We would compare source file date against .abc file date and then
> use
> >> the
> >>>>>> abc as if it were from a swc and not compile the source file.
> >>>>>
> >>>>> Can't do more on anything today but will follow that path, indeed I
> >> guess
> >>>>> I will need yours or Mike's help regarding the compilation itself at
> >> some
> >>>>> point.
> >>>>>
> >>>>> Thanks,
> >>>>> Frédéric THOMAS
> >>>>>
> >>>>>
> >>>>> ----------------------------------------
> >>>>>> From: aharui@adobe.com
> >>>>>> To: dev@flex.apache.org
> >>>>>> Subject: Re: [FalconJX] Unit test shows full use of pure
> actionscript
> >> to
> >>>>> javascript compile
> >>>>>> Date: Wed, 10 Jun 2015 15:48:36 +0000
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com>
> >> wrote:
> >>>>>>
> >>>>>>>> Volunteers are welcome to try to fix it. Or implement a whole new
> >>>>>>>> incremental compile strategy. I think I’ve noticed that Java
> >> compiler
> >>>>>>>> writes out an .class file and uses file dates to determine whether
> >> to
> >>>>>>>> compile again and seems to do that very quickly. I’ve pondered
> >> whether
> >>>>>>>> Falcon would get similar gains if we wrote out .abc files.
> >>>>>>>
> >>>>>>>So, it seems the compiler maintains a kind of session between the
> >>>>>>>compilation, how ?
> >>>>>>
> >>>>>> IIRC, the compiler would checksum public APIs and write it to a
> >> temporary
> >>>>>> file. The strategy of only re-compiling files affected by public
> APIs
> >>>>>> changed in other files is interesting, but seemed to be buggy.
> >>>>>>
> >>>>>>>So, why to generate the .abc and compare its modify date while we
> can
> >> do
> >>>>>>>that with the source file ?
> >>>>>>
> >>>>>> We would compare source file date against .abc file date and then
> use
> >> the
> >>>>>> abc as if it were from a swc and not compile the source file.
> >>>>>>
> >>>>>> -Alex
> >>>>>>
> >>>>>
> >>>>>
> >>>
> >>
> >>
>
>

RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Frédéric THOMAS <we...@hotmail.com>.
> HAHAHA Damn, I just had a brain flash, I I rewrote the compiler to have
> everything that is a base extend JSObject, it would work in IntelliJ! haha

It was what I meant :)


Frédéric THOMAS


----------------------------------------
> Date: Wed, 10 Jun 2015 12:53:21 -0400
> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
> From: teotigraphixllc@gmail.com
> To: dev@flex.apache.org
>
> On Wed, Jun 10, 2015 at 12:50 PM, Frédéric THOMAS <we...@hotmail.com>
> wrote:
>
>>
>>>> Also, have you seen anything that might suggest we can disable
>> IntelliJ's
>>>> ECMA natives so it uses the JS.swc Object definitions?
>>>
>>>
>> AFAIK, you can't switch to another ECMA file, it is hardcoded for the
>> Flex Plugin, a simple go to definition on Object and you will see the
>> lib it depends on, in JS, they did it more flexible, not in Flex.
>>
>> Can't you change the name with something like JSObject and change it back
>> at compile time instead ?
>>
>
> The problem with this is for natural flow, everything extends Object. So
> for a normal object incode, you would not get what JSObect was. Do you get
> what I mean?
>
> We can make a JSObject but in IntelliJ, it will not be the base class of
> everything.
>
> HAHAHA Damn, I just had a brain flash, I I rewrote the compiler to have
> everything that is a base extend JSObject, it would work in IntelliJ! haha
>
> Mike
>
>
>
>>
>> Frédéric THOMAS
>>
>>
>> ----------------------------------------
>>> From: webdoublefx@hotmail.com
>>> To: dev@flex.apache.org
>>> Subject: RE: [FalconJX] Unit test shows full use of pure actionscript to
>> javascript compile
>>> Date: Wed, 10 Jun 2015 17:44:06 +0100
>>>
>>>
>>>> Fred, Anything you need help on or questions about the compiler just
>> ask.
>>>
>>> Thanks.
>>>
>>>> Also, have you seen anything that might suggest we can disable
>> IntelliJ's
>>>> ECMA natives so it uses the JS.swc Object definitions?
>>>
>>> AFAIK, you can't switch to another ECMA file, it is hardcoded for the
>> Flex Plugin, a simple go to definition on Object and you will see the lib
>> it depends on, in JS, they did it more flexible, not in Flex.
>>>
>>> Frédéric THOMAS
>>>
>>>
>>> ----------------------------------------
>>>> Date: Wed, 10 Jun 2015 12:19:16 -0400
>>>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript
>> to javascript compile
>>>> From: teotigraphixllc@gmail.com
>>>> To: dev@flex.apache.org
>>>>
>>>> Alex, excuse my ignorance but "what" are your plans for integrating
>> this,
>>>> are you getting the JS.wsc to be built?
>>>>
>>>> Fred, Anything you need help on or questions about the compiler just
>> ask.
>>>>
>>>> Also, have you seen anything that might suggest we can disable
>> IntelliJ's
>>>> ECMA natives so it uses the JS.swc Object definitions?
>>>>
>>>> Mike
>>>>
>>>> On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <
>> webdoublefx@hotmail.com>
>>>> wrote:
>>>>
>>>>>>>So, why to generate the .abc and compare its modify date while we can
>> do
>>>>>>>that with the source file ?
>>>>>>
>>>>>> We would compare source file date against .abc file date and then use
>> the
>>>>>> abc as if it were from a swc and not compile the source file.
>>>>>
>>>>> Can't do more on anything today but will follow that path, indeed I
>> guess
>>>>> I will need yours or Mike's help regarding the compilation itself at
>> some
>>>>> point.
>>>>>
>>>>> Thanks,
>>>>> Frédéric THOMAS
>>>>>
>>>>>
>>>>> ----------------------------------------
>>>>>> From: aharui@adobe.com
>>>>>> To: dev@flex.apache.org
>>>>>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript
>> to
>>>>> javascript compile
>>>>>> Date: Wed, 10 Jun 2015 15:48:36 +0000
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com>
>> wrote:
>>>>>>
>>>>>>>> Volunteers are welcome to try to fix it. Or implement a whole new
>>>>>>>> incremental compile strategy. I think I’ve noticed that Java
>> compiler
>>>>>>>> writes out an .class file and uses file dates to determine whether
>> to
>>>>>>>> compile again and seems to do that very quickly. I’ve pondered
>> whether
>>>>>>>> Falcon would get similar gains if we wrote out .abc files.
>>>>>>>
>>>>>>>So, it seems the compiler maintains a kind of session between the
>>>>>>>compilation, how ?
>>>>>>
>>>>>> IIRC, the compiler would checksum public APIs and write it to a
>> temporary
>>>>>> file. The strategy of only re-compiling files affected by public APIs
>>>>>> changed in other files is interesting, but seemed to be buggy.
>>>>>>
>>>>>>>So, why to generate the .abc and compare its modify date while we can
>> do
>>>>>>>that with the source file ?
>>>>>>
>>>>>> We would compare source file date against .abc file date and then use
>> the
>>>>>> abc as if it were from a swc and not compile the source file.
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>
>>>>>
>>>
>>
>>
 		 	   		  

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Michael Schmalle <te...@gmail.com>.
On Wed, Jun 10, 2015 at 12:50 PM, Frédéric THOMAS <we...@hotmail.com>
wrote:

>
> >> Also, have you seen anything that might suggest we can disable
> IntelliJ's
> >> ECMA natives so it uses the JS.swc Object definitions?
> >
> >
>  AFAIK, you can't switch to another ECMA file, it is hardcoded for the
> Flex Plugin, a simple go to definition on Object and you will see the
> lib it depends on, in JS, they did it more flexible, not in Flex.
>
> Can't you change the name with something like JSObject and change it back
> at compile time instead ?
>

The problem with this is for natural flow, everything extends Object. So
for a normal object incode, you would not get what JSObect was. Do you get
what I mean?

We can make a JSObject but in IntelliJ, it will not be the base class of
everything.

HAHAHA Damn, I just had a brain flash, I I rewrote the  compiler to have
everything that is a base extend JSObject, it would work in IntelliJ! haha

Mike



>
> Frédéric THOMAS
>
>
> ----------------------------------------
> > From: webdoublefx@hotmail.com
> > To: dev@flex.apache.org
> > Subject: RE: [FalconJX] Unit test shows full use of pure actionscript to
> javascript compile
> > Date: Wed, 10 Jun 2015 17:44:06 +0100
> >
> >
> >> Fred, Anything you need help on or questions about the compiler just
> ask.
> >
> > Thanks.
> >
> >> Also, have you seen anything that might suggest we can disable
> IntelliJ's
> >> ECMA natives so it uses the JS.swc Object definitions?
> >
> > AFAIK, you can't switch to another ECMA file, it is hardcoded for the
> Flex Plugin, a simple go to definition on Object and you will see the lib
> it depends on, in JS, they did it more flexible, not in Flex.
> >
> > Frédéric THOMAS
> >
> >
> > ----------------------------------------
> >> Date: Wed, 10 Jun 2015 12:19:16 -0400
> >> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript
> to javascript compile
> >> From: teotigraphixllc@gmail.com
> >> To: dev@flex.apache.org
> >>
> >> Alex, excuse my ignorance but "what" are your plans for integrating
> this,
> >> are you getting the JS.wsc to be built?
> >>
> >> Fred, Anything you need help on or questions about the compiler just
> ask.
> >>
> >> Also, have you seen anything that might suggest we can disable
> IntelliJ's
> >> ECMA natives so it uses the JS.swc Object definitions?
> >>
> >> Mike
> >>
> >> On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <
> webdoublefx@hotmail.com>
> >> wrote:
> >>
> >>>>>So, why to generate the .abc and compare its modify date while we can
> do
> >>>>>that with the source file ?
> >>>>
> >>>> We would compare source file date against .abc file date and then use
> the
> >>>> abc as if it were from a swc and not compile the source file.
> >>>
> >>> Can't do more on anything today but will follow that path, indeed I
> guess
> >>> I will need yours or Mike's help regarding the compilation itself at
> some
> >>> point.
> >>>
> >>> Thanks,
> >>> Frédéric THOMAS
> >>>
> >>>
> >>> ----------------------------------------
> >>>> From: aharui@adobe.com
> >>>> To: dev@flex.apache.org
> >>>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript
> to
> >>> javascript compile
> >>>> Date: Wed, 10 Jun 2015 15:48:36 +0000
> >>>>
> >>>>
> >>>>
> >>>> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com>
> wrote:
> >>>>
> >>>>>> Volunteers are welcome to try to fix it. Or implement a whole new
> >>>>>> incremental compile strategy. I think I’ve noticed that Java
> compiler
> >>>>>> writes out an .class file and uses file dates to determine whether
> to
> >>>>>> compile again and seems to do that very quickly. I’ve pondered
> whether
> >>>>>> Falcon would get similar gains if we wrote out .abc files.
> >>>>>
> >>>>>So, it seems the compiler maintains a kind of session between the
> >>>>>compilation, how ?
> >>>>
> >>>> IIRC, the compiler would checksum public APIs and write it to a
> temporary
> >>>> file. The strategy of only re-compiling files affected by public APIs
> >>>> changed in other files is interesting, but seemed to be buggy.
> >>>>
> >>>>>So, why to generate the .abc and compare its modify date while we can
> do
> >>>>>that with the source file ?
> >>>>
> >>>> We would compare source file date against .abc file date and then use
> the
> >>>> abc as if it were from a swc and not compile the source file.
> >>>>
> >>>> -Alex
> >>>>
> >>>
> >>>
> >
>
>

RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Frédéric THOMAS <we...@hotmail.com>.
>> Also, have you seen anything that might suggest we can disable IntelliJ's
>> ECMA natives so it uses the JS.swc Object definitions?
>
>
 AFAIK, you can't switch to another ECMA file, it is hardcoded for the 
Flex Plugin, a simple go to definition on Object and you will see the 
lib it depends on, in JS, they did it more flexible, not in Flex.

Can't you change the name with something like JSObject and change it back at compile time instead ?

Frédéric THOMAS


----------------------------------------
> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
> Date: Wed, 10 Jun 2015 17:44:06 +0100
>
>
>> Fred, Anything you need help on or questions about the compiler just ask.
>
> Thanks.
>
>> Also, have you seen anything that might suggest we can disable IntelliJ's
>> ECMA natives so it uses the JS.swc Object definitions?
>
> AFAIK, you can't switch to another ECMA file, it is hardcoded for the Flex Plugin, a simple go to definition on Object and you will see the lib it depends on, in JS, they did it more flexible, not in Flex.
>
> Frédéric THOMAS
>
>
> ----------------------------------------
>> Date: Wed, 10 Jun 2015 12:19:16 -0400
>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
>> From: teotigraphixllc@gmail.com
>> To: dev@flex.apache.org
>>
>> Alex, excuse my ignorance but "what" are your plans for integrating this,
>> are you getting the JS.wsc to be built?
>>
>> Fred, Anything you need help on or questions about the compiler just ask.
>>
>> Also, have you seen anything that might suggest we can disable IntelliJ's
>> ECMA natives so it uses the JS.swc Object definitions?
>>
>> Mike
>>
>> On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <we...@hotmail.com>
>> wrote:
>>
>>>>>So, why to generate the .abc and compare its modify date while we can do
>>>>>that with the source file ?
>>>>
>>>> We would compare source file date against .abc file date and then use the
>>>> abc as if it were from a swc and not compile the source file.
>>>
>>> Can't do more on anything today but will follow that path, indeed I guess
>>> I will need yours or Mike's help regarding the compilation itself at some
>>> point.
>>>
>>> Thanks,
>>> Frédéric THOMAS
>>>
>>>
>>> ----------------------------------------
>>>> From: aharui@adobe.com
>>>> To: dev@flex.apache.org
>>>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to
>>> javascript compile
>>>> Date: Wed, 10 Jun 2015 15:48:36 +0000
>>>>
>>>>
>>>>
>>>> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>>>>
>>>>>> Volunteers are welcome to try to fix it. Or implement a whole new
>>>>>> incremental compile strategy. I think I’ve noticed that Java compiler
>>>>>> writes out an .class file and uses file dates to determine whether to
>>>>>> compile again and seems to do that very quickly. I’ve pondered whether
>>>>>> Falcon would get similar gains if we wrote out .abc files.
>>>>>
>>>>>So, it seems the compiler maintains a kind of session between the
>>>>>compilation, how ?
>>>>
>>>> IIRC, the compiler would checksum public APIs and write it to a temporary
>>>> file. The strategy of only re-compiling files affected by public APIs
>>>> changed in other files is interesting, but seemed to be buggy.
>>>>
>>>>>So, why to generate the .abc and compare its modify date while we can do
>>>>>that with the source file ?
>>>>
>>>> We would compare source file date against .abc file date and then use the
>>>> abc as if it were from a swc and not compile the source file.
>>>>
>>>> -Alex
>>>>
>>>
>>>
>
 		 	   		  

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Michael Schmalle <te...@gmail.com>.
On Wed, Jun 10, 2015 at 12:44 PM, Frédéric THOMAS <we...@hotmail.com>
wrote:

>
> > Fred, Anything you need help on or questions about the compiler just ask.
>
> Thanks.
>
> > Also, have you seen anything that might suggest we can disable IntelliJ's
> > ECMA natives so it uses the JS.swc Object definitions?
>
> AFAIK, you can't switch to another ECMA file, it is hardcoded for the Flex
> Plugin, a simple go to definition on Object and you will see the lib it
> depends on, in JS, they did it more flexible, not in Flex.
>

Well yeah, I know that is why I asked. Well that is one thing that sucks
but I guess we would need to make an object proxy class that gets treat
special in the compiler if people wanted to use things such as
Object.create().

Mike



>
> Frédéric THOMAS
>
>
> ----------------------------------------
> > Date: Wed, 10 Jun 2015 12:19:16 -0400
> > Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to
> javascript compile
> > From: teotigraphixllc@gmail.com
> > To: dev@flex.apache.org
> >
> > Alex, excuse my ignorance but "what" are your plans for integrating this,
> > are you getting the JS.wsc to be built?
> >
> > Fred, Anything you need help on or questions about the compiler just ask.
> >
> > Also, have you seen anything that might suggest we can disable IntelliJ's
> > ECMA natives so it uses the JS.swc Object definitions?
> >
> > Mike
> >
> > On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <
> webdoublefx@hotmail.com>
> > wrote:
> >
> >>>>So, why to generate the .abc and compare its modify date while we can
> do
> >>>>that with the source file ?
> >>>
> >>> We would compare source file date against .abc file date and then use
> the
> >>> abc as if it were from a swc and not compile the source file.
> >>
> >> Can't do more on anything today but will follow that path, indeed I
> guess
> >> I will need yours or Mike's help regarding the compilation itself at
> some
> >> point.
> >>
> >> Thanks,
> >> Frédéric THOMAS
> >>
> >>
> >> ----------------------------------------
> >>> From: aharui@adobe.com
> >>> To: dev@flex.apache.org
> >>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript
> to
> >> javascript compile
> >>> Date: Wed, 10 Jun 2015 15:48:36 +0000
> >>>
> >>>
> >>>
> >>> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com>
> wrote:
> >>>
> >>>>> Volunteers are welcome to try to fix it. Or implement a whole new
> >>>>> incremental compile strategy. I think I’ve noticed that Java compiler
> >>>>> writes out an .class file and uses file dates to determine whether to
> >>>>> compile again and seems to do that very quickly. I’ve pondered
> whether
> >>>>> Falcon would get similar gains if we wrote out .abc files.
> >>>>
> >>>>So, it seems the compiler maintains a kind of session between the
> >>>>compilation, how ?
> >>>
> >>> IIRC, the compiler would checksum public APIs and write it to a
> temporary
> >>> file. The strategy of only re-compiling files affected by public APIs
> >>> changed in other files is interesting, but seemed to be buggy.
> >>>
> >>>>So, why to generate the .abc and compare its modify date while we can
> do
> >>>>that with the source file ?
> >>>
> >>> We would compare source file date against .abc file date and then use
> the
> >>> abc as if it were from a swc and not compile the source file.
> >>>
> >>> -Alex
> >>>
> >>
> >>
>
>

RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Fred, Anything you need help on or questions about the compiler just ask.

Thanks.

> Also, have you seen anything that might suggest we can disable IntelliJ's
> ECMA natives so it uses the JS.swc Object definitions?

AFAIK, you can't switch to another ECMA file, it is hardcoded for the Flex Plugin, a simple go to definition on Object and you will see the lib it depends on, in JS, they did it more flexible, not in Flex.

Frédéric THOMAS


----------------------------------------
> Date: Wed, 10 Jun 2015 12:19:16 -0400
> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
> From: teotigraphixllc@gmail.com
> To: dev@flex.apache.org
>
> Alex, excuse my ignorance but "what" are your plans for integrating this,
> are you getting the JS.wsc to be built?
>
> Fred, Anything you need help on or questions about the compiler just ask.
>
> Also, have you seen anything that might suggest we can disable IntelliJ's
> ECMA natives so it uses the JS.swc Object definitions?
>
> Mike
>
> On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <we...@hotmail.com>
> wrote:
>
>>>>So, why to generate the .abc and compare its modify date while we can do
>>>>that with the source file ?
>>>
>>> We would compare source file date against .abc file date and then use the
>>> abc as if it were from a swc and not compile the source file.
>>
>> Can't do more on anything today but will follow that path, indeed I guess
>> I will need yours or Mike's help regarding the compilation itself at some
>> point.
>>
>> Thanks,
>> Frédéric THOMAS
>>
>>
>> ----------------------------------------
>>> From: aharui@adobe.com
>>> To: dev@flex.apache.org
>>> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to
>> javascript compile
>>> Date: Wed, 10 Jun 2015 15:48:36 +0000
>>>
>>>
>>>
>>> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>>>
>>>>> Volunteers are welcome to try to fix it. Or implement a whole new
>>>>> incremental compile strategy. I think I’ve noticed that Java compiler
>>>>> writes out an .class file and uses file dates to determine whether to
>>>>> compile again and seems to do that very quickly. I’ve pondered whether
>>>>> Falcon would get similar gains if we wrote out .abc files.
>>>>
>>>>So, it seems the compiler maintains a kind of session between the
>>>>compilation, how ?
>>>
>>> IIRC, the compiler would checksum public APIs and write it to a temporary
>>> file. The strategy of only re-compiling files affected by public APIs
>>> changed in other files is interesting, but seemed to be buggy.
>>>
>>>>So, why to generate the .abc and compare its modify date while we can do
>>>>that with the source file ?
>>>
>>> We would compare source file date against .abc file date and then use the
>>> abc as if it were from a swc and not compile the source file.
>>>
>>> -Alex
>>>
>>
>>
 		 	   		  

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Michael Schmalle <te...@gmail.com>.
Alex, excuse my ignorance but "what" are your plans for integrating this,
are you getting the JS.wsc to be built?

Fred, Anything you need help on or questions about the compiler just ask.

Also, have you seen anything that might suggest we can disable IntelliJ's
ECMA natives so it uses the JS.swc Object definitions?

Mike

On Wed, Jun 10, 2015 at 12:00 PM, Frédéric THOMAS <we...@hotmail.com>
wrote:

> >>So, why to generate the .abc and compare its modify date while we can do
> >>that with the source file ?
> >
> > We would compare source file date against .abc file date and then use the
> > abc as if it were from a swc and not compile the source file.
>
> Can't do more on anything today but will follow that path, indeed I guess
> I will need yours or Mike's help regarding the compilation itself at some
> point.
>
> Thanks,
> Frédéric THOMAS
>
>
> ----------------------------------------
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to
> javascript compile
> > Date: Wed, 10 Jun 2015 15:48:36 +0000
> >
> >
> >
> > On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >
> >>> Volunteers are welcome to try to fix it. Or implement a whole new
> >>> incremental compile strategy. I think I’ve noticed that Java compiler
> >>> writes out an .class file and uses file dates to determine whether to
> >>> compile again and seems to do that very quickly. I’ve pondered whether
> >>> Falcon would get similar gains if we wrote out .abc files.
> >>
> >>So, it seems the compiler maintains a kind of session between the
> >>compilation, how ?
> >
> > IIRC, the compiler would checksum public APIs and write it to a temporary
> > file. The strategy of only re-compiling files affected by public APIs
> > changed in other files is interesting, but seemed to be buggy.
> >
> >>So, why to generate the .abc and compare its modify date while we can do
> >>that with the source file ?
> >
> > We would compare source file date against .abc file date and then use the
> > abc as if it were from a swc and not compile the source file.
> >
> > -Alex
> >
>
>

RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Frédéric THOMAS <we...@hotmail.com>.
>>So, why to generate the .abc and compare its modify date while we can do
>>that with the source file ?
>
> We would compare source file date against .abc file date and then use the
> abc as if it were from a swc and not compile the source file.

Can't do more on anything today but will follow that path, indeed I guess I will need yours or Mike's help regarding the compilation itself at some point.

Thanks,
Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
> Date: Wed, 10 Jun 2015 15:48:36 +0000
>
>
>
> On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>> Volunteers are welcome to try to fix it. Or implement a whole new
>>> incremental compile strategy. I think I’ve noticed that Java compiler
>>> writes out an .class file and uses file dates to determine whether to
>>> compile again and seems to do that very quickly. I’ve pondered whether
>>> Falcon would get similar gains if we wrote out .abc files.
>>
>>So, it seems the compiler maintains a kind of session between the
>>compilation, how ?
>
> IIRC, the compiler would checksum public APIs and write it to a temporary
> file. The strategy of only re-compiling files affected by public APIs
> changed in other files is interesting, but seemed to be buggy.
>
>>So, why to generate the .abc and compare its modify date while we can do
>>that with the source file ?
>
> We would compare source file date against .abc file date and then use the
> abc as if it were from a swc and not compile the source file.
>
> -Alex
>
 		 	   		  

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Alex Harui <ah...@adobe.com>.

On 6/10/15, 8:36 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>> Volunteers are welcome to try to fix it. Or implement a whole new
>> incremental compile strategy. I think I’ve noticed that Java compiler
>> writes out an .class file and uses file dates to determine whether to
>> compile again and seems to do that very quickly. I’ve pondered whether
>> Falcon would get similar gains if we wrote out .abc files.
>
>So, it seems the compiler maintains a kind of session between the
>compilation, how ?

IIRC, the compiler would checksum public APIs and write it to a temporary
file.  The strategy of only re-compiling files affected by public APIs
changed in other files is interesting, but seemed to be buggy.

>So, why to generate the .abc and compare its modify date while we can do
>that with the source file ?

We would compare source file date against .abc file date and then use the
abc as if it were from a swc and not compile the source file.

-Alex


RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Volunteers are welcome to try to fix it. Or implement a whole new
> incremental compile strategy. I think I’ve noticed that Java compiler
> writes out an .class file and uses file dates to determine whether to
> compile again and seems to do that very quickly. I’ve pondered whether
> Falcon would get similar gains if we wrote out .abc files.

So, it seems the compiler maintains a kind of session between the compilation, how ?
So, why to generate the .abc and compare its modify date while we can do that with the source file ?

Frédéric THOMAS


----------------------------------------
> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
> Date: Wed, 10 Jun 2015 15:17:55 +0000
>
>
>
> On 6/10/15, 6:46 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>
>>For better performances, we would need to make the incremental
>>compilation to work but for instance, IIRC Alex switched it off because
>>it didn't work well.
>
> Volunteers are welcome to try to fix it. Or implement a whole new
> incremental compile strategy. I think I’ve noticed that Java compiler
> writes out an .class file and uses file dates to determine whether to
> compile again and seems to do that very quickly. I’ve pondered whether
> Falcon would get similar gains if we wrote out .abc files.
>
> Anyway, I will be working on packaging up all of Mike’s work so it is
> easier to use from the nightly builds.
>
> -Alex
>
 		 	   		  

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Alex Harui <ah...@adobe.com>.

On 6/10/15, 6:46 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>For better performances, we would need to make the incremental
>compilation to work but for instance, IIRC Alex switched it off because
>it didn't work well.

Volunteers are welcome to try to fix it.  Or implement a whole new
incremental compile strategy.  I think I’ve noticed that Java compiler
writes out an .class file and uses file dates to determine whether to
compile again and seems to do that very quickly.  I’ve pondered whether
Falcon would get similar gains if we wrote out .abc files.

 Anyway, I will be working on packaging up all of Mike’s work so it is
easier to use from the nightly builds.

-Alex		 	   		  


RE: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi Mike,

Thanks for all those needed expalinations, it helped me a lot to understand more.

> If Fred can set this up like we did with Randori in IntelliJ, we could get
> spilt second compiles just like TypeScript, the Randori incremental
> compiler was VERY fast(like save the file, .js is instantly updated).

Unfortunately, here I have no control on what is passed from IntelliJ and can't do as I did with Randori, send the files that were modified only, the make, is a full build, the only thing is that if we have more modules and those modules are not modified, they won't be rebuilt.

For better performances, we would need to make the incremental compilation to work but for instance, IIRC Alex switched it off because it didn't work well.

Once again, very nice job Mike !
Thanks,
Frédéric THOMAS


----------------------------------------
> Date: Wed, 10 Jun 2015 08:10:15 -0400
> Subject: Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile
> From: teotigraphixllc@gmail.com
> To: dev@flex.apache.org
>
> So for others reading this that have no clue what is going on, we have an
> ActionScript file that uses the DOM, just like TypeScript. This file can
> now be compiled without Flash/SWF!!!
>
> The FalconJX compiler is now a true AS only possibility for JS creation.
> You pass the Main.as class below, it will spit out the .js file without any
> Flash dependencies, you get JavaScript code completion in the IDE and
> realtime compile type checking.
>
> If Fred can set this up like we did with Randori in IntelliJ, we could get
> spilt second compiles just like TypeScript, the Randori incremental
> compiler was VERY fast(like save the file, .js is instantly updated).
>
> I am sure as we go, there will be compiler flags to turn off most the
> FlexJS emitted type generation so it will look like plain ole js.
>
> Mike
>
>
> ------------------------------------------------------------
> ActionScript
> ------------------------------------------------------------
>
> package
> {
> public class Main
> {
> public function start():void
> {
> var element:Element = document.createElement("button");
> element.onclick = function ():void {
> alert("Hello browser from FalconJX!");
> };
> button.textContent = "Say Hello";
> document.body.appendChild(button);
> }
> }
> }
>
> ------------------------------------------------------------
> JavaScript
> ------------------------------------------------------------
>
> /**
> * Main
> *
> * @fileoverview
> *
> * @suppress {checkTypes}
> */
>
> goog.provide('Main');
>
> goog.require('document');
> goog.require('alert');
> goog.require('Element');
> goog.require('org_apache_flex_utils_Language');
>
>
>
> /**
> * @constructor
> */
> Main = function() {
> };
>
>
> /**
> * @expose
> */
> Main.prototype.start = function() {
> var self = this;
> var /** @type {Element} */ element = document.createElement("button");
> element.onclick = function() {
> alert("Hello browser from FalconJX!");
> };
> button.textContent = "Say Hello";
> document.body.appendChild(button);
> };
>
>
> /**
> * Metadata
> *
> * @type {Object.<string, Array.<Object>>}
> */
> Main.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Main', qName:
> 'Main'}] };
>
>
> On Wed, Jun 10, 2015 at 7:55 AM, Michael Schmalle <teotigraphixllc@gmail.com
>> wrote:
>
>> Fred and others;
>>
>> I just committed a unit test that shows the full meal deal.
>>
>> TestExternalsJSCompile.java
>>
>> 1. parse/compile externs .js using GCC compile()
>> 2. emit .as from compiled externs AST
>> 3. create JS.swc from emitted .as files
>> 4. load FlexJS backend and compile with no playerglobal.swc, only JS.swc
>> 5. cross compile Main.as that uses the DOM API/JS.swc into Main_output.js
>> file.
>>
>> So now you can see exactly what is going on without me confusing you with
>> the internals of what is going on.
>>
>> Peace,
>> Mike
>>
 		 	   		  

Re: [FalconJX] Unit test shows full use of pure actionscript to javascript compile

Posted by Michael Schmalle <te...@gmail.com>.
So for others reading this that have no clue what is going on, we have an
ActionScript file that uses the DOM, just like TypeScript. This file can
now be compiled without Flash/SWF!!!

The FalconJX compiler is now a true AS only possibility for JS creation.
You pass the Main.as class below, it will spit out the .js file without any
Flash dependencies, you get JavaScript code completion in the IDE and
realtime compile type checking.

If Fred can set this up like we did with Randori in IntelliJ, we could get
spilt second compiles just like TypeScript, the Randori incremental
compiler was VERY fast(like save the file, .js is instantly updated).

I am sure as we go, there will be compiler flags to turn off most the
FlexJS emitted type generation so it will look like plain ole js.

Mike


------------------------------------------------------------
ActionScript
------------------------------------------------------------

package
{
public class Main
{
    public function start():void
    {
        var element:Element = document.createElement("button");
        element.onclick = function ():void {
            alert("Hello browser from FalconJX!");
        };
        button.textContent = "Say Hello";
        document.body.appendChild(button);
    }
}
}

------------------------------------------------------------
JavaScript
------------------------------------------------------------

/**
 * Main
 *
 * @fileoverview
 *
 * @suppress {checkTypes}
 */

goog.provide('Main');

goog.require('document');
goog.require('alert');
goog.require('Element');
goog.require('org_apache_flex_utils_Language');



/**
 * @constructor
 */
Main = function() {
};


/**
 * @expose
 */
Main.prototype.start = function() {
  var self = this;
  var /** @type {Element} */ element = document.createElement("button");
  element.onclick = function() {
    alert("Hello browser from FalconJX!");
  };
  button.textContent = "Say Hello";
  document.body.appendChild(button);
};


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
Main.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Main', qName:
'Main'}] };


On Wed, Jun 10, 2015 at 7:55 AM, Michael Schmalle <teotigraphixllc@gmail.com
> wrote:

> Fred and others;
>
> I just committed a unit test that shows the full meal deal.
>
> TestExternalsJSCompile.java
>
> 1. parse/compile externs .js using GCC compile()
> 2. emit .as from compiled externs AST
> 3. create JS.swc from emitted .as files
> 4. load FlexJS backend and compile with no playerglobal.swc, only JS.swc
> 5. cross compile Main.as that uses the DOM API/JS.swc into Main_output.js
> file.
>
> So now you can see exactly what is going on without me confusing you with
> the internals of what is going on.
>
> Peace,
> Mike
>