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 0B923D4F5 for ; Fri, 30 Nov 2012 17:46:26 +0000 (UTC) Received: (qmail 40616 invoked by uid 500); 30 Nov 2012 17:46:25 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 40579 invoked by uid 500); 30 Nov 2012 17:46:25 -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 40571 invoked by uid 99); 30 Nov 2012 17:46:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2012 17:46:25 +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 (athena.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; Fri, 30 Nov 2012 17:46:18 +0000 Received: from localhost ([127.0.0.1]:57777) by franklin.liquidweb.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1TeUey-0006hz-Vl for flex-dev@incubator.apache.org; Fri, 30 Nov 2012 12:45:57 -0500 Received: from 64.223.163.204 ([64.223.163.204]) by teotigraphix.com (Horde Framework) with HTTP; Fri, 30 Nov 2012 12:45:56 -0500 Message-ID: <20121130124556.21035qrwp48zaitw@teotigraphix.com> Date: Fri, 30 Nov 2012 12:45:56 -0500 From: Michael Schmalle To: flex-dev@incubator.apache.org Subject: Re: [FlaconJS] pseudo emitter algorithm References: In-Reply-To: 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 Alex Harui : > > > > On 11/30/12 8:56 AM, "Michael Schmalle" wrote: > >> >> My only question was, were the engineers doing anything specific with >> resolutions and such with the SWF. > My guess is that the engineers were just leveraging the file output portion > of Falcon. I pondered whether having the SWF constant pools around would > make for tighter code in JS, but I don't think so. > >> >> The fact that jangaroo does it with AST is good enough for me to get >> going on a prototype. I was just trying to see if there was anything >> where I am not reinventing the wheel. But I will, if that is the only >> way to go since the API is externally different then jangaroo. > So is your plan to rewrite the generator so it doesn't reduce the code to > SWF entities via JBurg? I don't know yet. My intuition is telling me I don't have enough facts right now. Basically I wanted to make something inline with jangaroo's JSCodeGenerator with the visitor pattern. I have written this type of ActionScript code generation before, so I am no stranger to it. My thought is this. If we rewrite the code generation using AST/Definitions framework it will be 10 times easier to write custom code generation backends because we will have created a tight and clean API to do so. IE Java or whatever. This is not saying it's easy but you would rip out 2 dependencies doing this, SWF and JBurg. This allows a lot more possible code contributions down the road with those two monsters out of the pie. My advice to myself and others is this. Write all the js you want against how the compiler spits it out right now. If I go the route and if there are any others that want to join in, we will meet at the same exact code generation. Once there is a semi stable implementation using the new generator that produces the code you want, we can steer the js in a new direction if needed. A note about MXML, since the parse DOES create and AST during parsing of an MXML file, and MXML uses the IDefinition API, we can catch MXML code at the same intersection we are getting the AS code at, the AST definition stage. Actually this might work even better because both .as and.mxml are on the exact same playing field at this point in the parsing. The problem that MXML is not converted to ActionScript is mute since we are using the AST/Definitions... problem solved. Mike >> >> Using the IDefinition API, with loaded SWCs gives you member and class >> resolotuion so I might actually start with that higher level and not >> strictly IASNode parser nodes. > It occurred to me that I think MXML does not go to AS or AST, it goes > straight to ABC, so we'll be customizing that code in some way as well. I doesn't got to straight ABC, it does go to AST then ABC. Everything has to be AST first to then go to JBurg ABC reducer. Alex, this package is the key *org.apache.flex.compiler.tree.mxml*. >> Mike >> >> > > > -- > 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