Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5908BE5F6 for ; Sat, 24 Nov 2012 17:10:34 +0000 (UTC) Received: (qmail 63699 invoked by uid 500); 24 Nov 2012 17:10:33 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 63671 invoked by uid 500); 24 Nov 2012 17:10:33 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 63640 invoked by uid 99); 24 Nov 2012 17:10:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Nov 2012 17:10:32 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=FRT_ADOBE2,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [69.167.147.50] (HELO franklin.liquidweb.com) (69.167.147.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Nov 2012 17:10:24 +0000 Received: from localhost ([127.0.0.1]:55173) by franklin.liquidweb.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1TcJEx-0001NF-7d for flex-dev@incubator.apache.org; Sat, 24 Nov 2012 12:10:03 -0500 Received: from 64.223.163.204 ([64.223.163.204]) by www.teotigraphix.com (Horde Framework) with HTTP; Sat, 24 Nov 2012 12:10:02 -0500 Message-ID: <20121124121002.44393ixvquzo67hm@www.teotigraphix.com> Date: Sat, 24 Nov 2012 12:10:02 -0500 From: Michael Schmalle To: flex-dev@incubator.apache.org Subject: Re: FalconJS has landed References: <20121124080056.14493v6n9cp3xm2w@www.teotigraphix.com> <50B0FB75.9000400@gmail.com> In-Reply-To: <50B0FB75.9000400@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.11) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - franklin.liquidweb.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - teotigraphix.com X-Get-Message-Sender-Via: franklin.liquidweb.com: authenticated_id: teotigra/from_h X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Quoting Daniel Wasilewski : > 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 : >> >>> Sure.. just commited. >>> >>> Cyrill >>> >>> On Sat, Nov 24, 2012 at 12:05 AM, Alex Harui 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" 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.(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 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