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 6B73FD891 for ; Fri, 30 Nov 2012 18:34:16 +0000 (UTC) Received: (qmail 940 invoked by uid 500); 30 Nov 2012 18:34:15 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 908 invoked by uid 500); 30 Nov 2012 18:34:15 -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 900 invoked by uid 99); 30 Nov 2012 18:34:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2012 18:34:15 +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; Fri, 30 Nov 2012 18:34:07 +0000 Received: from localhost ([127.0.0.1]:33635) by franklin.liquidweb.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1TeVPF-0003Rd-EU for flex-dev@incubator.apache.org; Fri, 30 Nov 2012 13:33:45 -0500 Received: from 64.223.163.204 ([64.223.163.204]) by teotigraphix.com (Horde Framework) with HTTP; Fri, 30 Nov 2012 13:33:45 -0500 Message-ID: <20121130133345.10301q5lr8sndde1@teotigraphix.com> Date: Fri, 30 Nov 2012 13:33:45 -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 9:45 AM, "Michael Schmalle" wrote: >> 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. > OK, I wasn't sure where the dividing line is around AST. Yes MXML nodes are > in the parse tree, but appears to be a different set of nodes than what AS > generates. >> >>>> >>>> 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. > You could be right, but I've been in > org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor. I > don't see it using reducers/emitters/JBurg, I see it setting instructions > directly. But I might be missing something. Take the below for instance; MXMLFileNode(MXMLFileID) "" MXMLDocumentNode(MXMLDocumentID) "flash.display.Sprite" MXMLInstanceNode(MXMLInstanceID) "spark.components.Label" id="lbl" MXMLPropertySpecifierNode(MXMLPropertySpecifierID) "x" MXMLIntNode(MXMLIntID) "int" MXMLLiteralNode(MXMLLiteralID) 100 MXMLPropertySpecifierNode(MXMLPropertySpecifierID) "y" MXMLIntNode(MXMLIntID) "int" MXMLLiteralNode(MXMLLiteralID) 25 MXMLPropertySpecifierNode(MXMLPropertySpecifierID) "text" MXMLSingleDataBindingNode(MXMLDataBindingID) "DataBinding" MemberAccessExpressionNode(MemberAccessExpressionID) "." IdentifierNode(IdentifierID) "model" IdentifierNode(IdentifierID) "labelText" We have access to that tree when parsing. Instead of thinking we have to parse this INTO ActionScript AST, we can think of this as MXML AST. My point is, we would create a .js generator for MXML dialect. It "might" even be adeventagious for us to create this implementation becasue we "could" treat some parts of MXML differently than a plain ole ActionScript class. So we do have the AST at the same exact point we have ActionScript AST. I was never saying MXML AST was ActionScript. I was saying we have MXML AST to work with, and working with it's AST by not being converted to ActionScript could actually be a bonus. Note: There is nothing different about ActionScript AST when I go to traverse it's tree. There will a a walker that knows how to traverse the tree based on .as sematics. The same can happen for .mxml, a woalker will know it's semantics and walk the tree correctly based on MXML. Also note, this is basically what JBurg does and produces. We just want total control so there dosn't need to be experts on JBurg to fix bugs with tree walking. 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