flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: git commit: [flex-falcon] [refs/heads/develop] - MXMLFlexJSEmitter: source maps for MXML event attributes
Date Fri, 24 Mar 2017 05:54:08 GMT
Josh, 

Try running:

   ant flexjs.dependent.tests

If the output has changed you may have to update some of the _results.js
files.

Thanks,
-Alex

On 3/23/17, 3:43 PM, "joshtynjala@apache.org" <joshtynjala@apache.org>
wrote:

>Repository: flex-falcon
>Updated Branches:
>  refs/heads/develop 548283ede -> 379b03927
>
>
>MXMLFlexJSEmitter: source maps for MXML event attributes
>
>
>Project: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-falcon%2Frepo&data=02%7C01%7C%7C253205929
>2824ad38b7008d4723e1757%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63625
>9058387804769&sdata=PxnZzGeBKAZlr7%2FUTHKiNbq4yrFDgvVyl37eAvsAQ2g%3D&reser
>ved=0
>Commit: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-falcon%2Fcommit%2F379b0392&data=02%7C01%7
>C%7C2532059292824ad38b7008d4723e1757%7Cfa7b1b5a7b34438794aed2c178decee1%7C
>0%7C0%7C636259058387804769&sdata=0XG6qqfcXFrMA5samBLt7nTAfc8T97%2BYQLkniUd
>gdc8%3D&reserved=0
>Tree: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-falcon%2Ftree%2F379b0392&data=02%7C01%7C%
>7C2532059292824ad38b7008d4723e1757%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>7C0%7C636259058387804769&sdata=V5Tz1mfywZ1NT2k6krrE9gwYMM8OwbUlnAVXYnwwGVo
>%3D&reserved=0
>Diff: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-falcon%2Fdiff%2F379b0392&data=02%7C01%7C%
>7C2532059292824ad38b7008d4723e1757%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>7C0%7C636259058387804769&sdata=o455FbRRSHLiR7vmmKTsMS6UgHmg%2FZjY2ZKI2g17c
>QM%3D&reserved=0
>
>Branch: refs/heads/develop
>Commit: 379b039276bd89f2661de04ca53312fa42779b35
>Parents: 548283e
>Author: Josh Tynjala <joshtynjala@apache.org>
>Authored: Thu Mar 23 15:43:47 2017 -0700
>Committer: Josh Tynjala <joshtynjala@apache.org>
>Committed: Thu Mar 23 15:43:47 2017 -0700
>
>----------------------------------------------------------------------
> .../codegen/mxml/flexjs/MXMLEventSpecifier.java |  3 ++
> .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  | 42 +++++++++-----------
> 2 files changed, 22 insertions(+), 23 deletions(-)
>----------------------------------------------------------------------
>
>
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-falcon%2Fblob%2F379b0392%2Fcompiler-jx%2F
>src%2Fmain%2Fjava%2Forg%2Fapache%2Fflex%2Fcompiler%2Finternal%2Fcodegen%2F
>mxml%2Fflexjs%2FMXMLEventSpecifier.java&data=02%7C01%7C%7C2532059292824ad3
>8b7008d4723e1757%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636259058387
>804769&sdata=CHrA1t0a1uukl%2F7Spfp8xBRDIPJSF5XbRmto5LxOdR0%3D&reserved=0
>----------------------------------------------------------------------
>diff --git 
>a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLEventSpecifier.java
>b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLEventSpecifier.java
>index d419df6..ab40ca6 100644
>--- 
>a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLEventSpecifier.java
>+++ 
>b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLEventSpecifier.java
>@@ -23,6 +23,7 @@ import java.util.Arrays;
> import java.util.List;
> 
> import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
>+import org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode;
> 
> /**
>  * @author Erik de Bruin
>@@ -68,6 +69,8 @@ public class MXMLEventSpecifier extends
>MXMLNodeSpecifier
>     //---------------------------------
> 
>     public String type;
>+    
>+    public IMXMLEventSpecifierNode node;
> 
>     
>//------------------------------------------------------------------------
>--
>     //
>
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-falcon%2Fblob%2F379b0392%2Fcompiler-jx%2F
>src%2Fmain%2Fjava%2Forg%2Fapache%2Fflex%2Fcompiler%2Finternal%2Fcodegen%2F
>mxml%2Fflexjs%2FMXMLFlexJSEmitter.java&data=02%7C01%7C%7C2532059292824ad38
>b7008d4723e1757%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6362590583878
>14781&sdata=vVBZvWyXQfZtN2rpNjWYX1n9x%2BdR2ozD5rzzwxzgGO4%3D&reserved=0
>----------------------------------------------------------------------
>diff --git 
>a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLFlexJSEmitter.java
>b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLFlexJSEmitter.java
>index 207e671..6728cc2 100644
>--- 
>a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLFlexJSEmitter.java
>+++ 
>b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml
>/flexjs/MXMLFlexJSEmitter.java
>@@ -33,6 +33,7 @@ import java.util.Set;
> import org.apache.flex.abc.semantics.MethodInfo;
> import org.apache.flex.abc.semantics.Name;
> import org.apache.flex.abc.semantics.Namespace;
>+import org.apache.flex.compiler.codegen.IEmitterTokens;
> import org.apache.flex.compiler.codegen.as.IASEmitter;
> import org.apache.flex.compiler.codegen.js.IMappingEmitter;
> import org.apache.flex.compiler.codegen.mxml.flexjs.IMXMLFlexJSEmitter;
>@@ -1518,8 +1519,19 @@ public class MXMLFlexJSEmitter extends MXMLEmitter
>implements
>                     + ".prototype." + event.eventHandler + " =
>function(event)");
>             writeNewline(ASEmitterTokens.BLOCK_OPEN, true);
> 
>-            writeNewline(event.value +
>ASEmitterTokens.SEMICOLON.getToken(),
>-                    false);
>+
>+            IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker())
>+                    .getASEmitter();
>+            
>+            IMXMLEventSpecifierNode node = event.node;
>+            int len = node.getChildCount();
>+            for (int i = 0; i < len; i++)
>+            {
>+                IASNode cnode = node.getChild(i);
>+                asEmitter.getWalker().walk(cnode);
>+                writeToken(ASEmitterTokens.SEMICOLON);
>+                writeNewline();
>+            }
> 
>             write(ASEmitterTokens.BLOCK_CLOSE);
>             writeNewline(";");
>@@ -1671,27 +1683,11 @@ public class MXMLFlexJSEmitter extends
>MXMLEmitter implements
>                 .getTypeAsDisplayString();
> 
>         eventHandlerNameMap.put(node, eventSpecifier.eventHandler);
>-        
>-        IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker())
>-                .getASEmitter();
> 
>-        StringBuilder sb = null;
>-        int len = node.getChildCount();
>-        if (len > 0)
>-        {
>-            sb = new StringBuilder();
>-            for (int i = 0; i < len; i++)
>-            {
>-                sb.append(getIndent((i > 0) ? 1 : 0)
>-                        + asEmitter.stringifyNode(node.getChild(i)));
>-                if (i < len - 1)
>-                {
>-                    sb.append(ASEmitterTokens.SEMICOLON.getToken());
>-                    sb.append(ASEmitterTokens.NEW_LINE.getToken());
>-                }
>-            }
>-        }
>-        eventSpecifier.value = sb.toString();
>+        //save the node for emitting later in emitEvents()
>+        //previously, we stringified the node and saved that instead of
>the
>+        //node, but source maps don't work when you stringify a node too
>early -JT
>+        eventSpecifier.node = node;
> 
> 	    if (currentDescriptor != null)
> 	        currentDescriptor.eventSpecifiers.add(eventSpecifier);
>@@ -2263,7 +2259,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter
>implements
>     {
>         //save the script for emitting later in emitScripts()
>         //previously, we stringified the node and saved that instead of
>the
>-        //node, but source maps don't work when you stringify a node -JT
>+        //node, but source maps don't work when you stringify a node too
>early -JT
>         scripts.add(node);
>     }
> 
>

Mime
View raw message