incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schmalle <apa...@teotigraphix.com>
Subject Re: FalconJS has landed
Date Sat, 24 Nov 2012 17:10:02 GMT
Quoting Daniel Wasilewski <devudesign@gmail.com>:

> 2 questions:
>
> 1. Why literal notation for JS output? Is it the only output mode available?

I have no idea, this is a prototype. It uses JBurg which is a bottom  
up rewritter so I guess anything could be emitted based on the  
semantics of the js language.

> 2. adobe.extend / adobe.classes? shouldn't be apache?

Probably but if you look at the code, there are serious issues.

That being said, I think Alex tried to warn that this was just a prototype.

Also, I would have no idea where to begin hacking this stuff since it  
uses the byte code emitter for SWF then visits nodes (I think) with  
the JSEmitter.

I'm guessing it compiles to virtual SWF byte code because the emitter  
has already taken care of ActionScript semantics.

For anything done with this code, there will have to be others that  
have a clue to whats going on. I don't know if what is there is the  
best way to implement a cross compiler. I would have to study this  
stuff more.

It will be interesting to hear others opinions eventually.

Mike


> Dan
>
> On 11/24/2012 1:00 PM, Michael Schmalle wrote:
>> Hey,
>>
>> I try to avoid the command line when ever possible. :)
>>
>> I set up a simple runner just like we did in functional testing using the;
>>
>> MXMLJSC.main(args);
>>
>>
>> For those that are interested, MainCode.as;
>>
>>
>> package
>> {
>>    public class MainCode
>>    {
>>        public function MainCode()
>>        {
>>
>>        }
>>
>>        public var foo:String;
>>
>>        private var bar:int = 0;
>>
>>        public function get baz():String
>>        {
>>            return foo;
>>        }
>>
>>        public function set baz(value:String):void
>>        {
>>            foo = value;
>>        }
>>    }
>> }
>>
>> and TestApp.as
>>
>> package
>> {
>>    public class TestApp
>>    {
>>        private var linker:MainCode;
>>
>>        public function TestApp()
>>        {
>>
>>        }
>>    }
>>
>> }
>>
>>
>> Produces the following .js file;
>>
>>
>> /*
>> CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-11-24 07:54:52
>> */
>> MainCode = adobe.extend("MainCode", Object, {
>>    init : function() {
>>        return this
>>    },
>>    foo : void 0,
>>    bar : 0,
>>    get_baz : function() {
>>        return this.foo
>>    },
>>    set_baz : function(a) {
>>        this.foo = a
>>    }
>> });
>> MainCode.prototype._CLASS = MainCode;
>> MainCode._PACKAGE = adobe.globals;
>> MainCode._NAME = "MainCode";
>> MainCode._FULLNAME = "MainCode";
>> MainCode._SUPER = Object;
>> MainCode._NAMESPACES = {
>>    "foo::2" : !0,
>>    "bar::7:MainCode" : !0,
>>    "baz::2" : !0,
>>    "baz::2" : !0
>> };
>> adobe.classes.MainCode = MainCode;
>>
>>
>>
>> Mike
>>
>>
>>
>>
>>
>> Quoting Cyrill Zadra <cyrill.zadra@gmail.com>:
>>
>>> Sure.. just commited.
>>>
>>> Cyrill
>>>
>>> On Sat, Nov 24, 2012 at 12:05 AM, Alex Harui <aharui@adobe.com> wrote:
>>>> Please checkin your changes to build.xml, the manifest, and make a note in
>>>> the README.
>>>>
>>>> Thanks,
>>>> -Alex
>>>>
>>>>
>>>> On 11/23/12 11:27 PM, "Cyrill Zadra" <cyrill.zadra@gmail.com> wrote:
>>>>
>>>>> Finally .. I could compile a js file Yihaa  ;-).
>>>>>
>>>>> There were 2 things todo:
>>>>>
>>>>> 1) I had to remove the absolute path in the MANIFEST.MF to the falcon
>>>>> compiler.jar through a relative one.
>>>>>
>>>>> 2) The command  ./bin/mxmlc MainCode.as returns a
>>>>>
>>>>> java.lang.NullPointerException
>>>>>        at java.io.File.<init>(File.java:222)
>>>>>        at  
>>>>> org.apache.flex.compiler.clients.MXMLJSC.compile(MXMLJSC.java:483)
>>>>>        at
>>>>> org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:217)
>>>>>        at
>>>>> org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:177)
>>>>>        at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:153)
>>>>>
>>>>> But with following command everything works fine.
>>>>> ../bin/mxmlc MainCode.as -output MainCode.js
>>>>>
>>>>> On Fri, Nov 23, 2012 at 10:42 PM, Alex Harui <aharui@adobe.com>
wrote:
>>>>>> that will dump out the jar and see if that class is in there or not.
>>>>
>>>> -- 
>>>> 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


Mime
View raw message