You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/11/04 09:31:51 UTC

[1/5] git commit: [flex-falcon] [refs/heads/feature-autobuild/closure-classpath-sources] - better end line and end column on MXML DOM

Repository: flex-falcon
Updated Branches:
  refs/heads/feature-autobuild/closure-classpath-sources d47ac920e -> a36a80053


better end line and end column on MXML DOM


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/39b119a4
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/39b119a4
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/39b119a4

Branch: refs/heads/feature-autobuild/closure-classpath-sources
Commit: 39b119a4773e12d6069f3d0b7643b590373b13c8
Parents: f7dc953
Author: Josh Tynjala <jo...@gmail.com>
Authored: Sun Oct 30 16:53:51 2016 -0700
Committer: Josh Tynjala <jo...@gmail.com>
Committed: Sun Oct 30 16:53:51 2016 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java | 2 ++
 .../java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java | 4 ++++
 .../org/apache/flex/compiler/internal/mxml/MXMLTextData.java     | 2 ++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/39b119a4/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
index 5e04336..bb82967 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
@@ -55,6 +55,8 @@ public class MXMLTagAttributeData extends SourceLocation implements IMXMLTagAttr
         setStart(nameToken.getStart());
         setLine(nameToken.getLine());
         setColumn(nameToken.getColumn());
+        setEndLine(nameToken.getEndLine());
+        setEndColumn(nameToken.getEndColumn());
         setEnd(nameToken.getEnd());
 
         // Deal with name if it is of the form name.state

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/39b119a4/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
index 5ddd780..1a1a3f0 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
@@ -90,6 +90,8 @@ public class MXMLTagData extends MXMLUnitData implements IMXMLTagData
         this.setOffsets(other.getStart(), other.getEnd());
         this.setLine(other.getLine());
         this.setColumn(other.getColumn());
+        this.setEndLine(other.getEndLine());
+        this.setEndColumn(other.getEndColumn());
     }
 
     protected String tagName;
@@ -201,6 +203,8 @@ public class MXMLTagData extends MXMLUnitData implements IMXMLTagData
         setTagOffsets(startOffset, nameEnd, nameStart, contentEnd);
         setColumn(nameToken.getColumn());
         setLine(nameToken.getLine());
+        setEndColumn(nameToken.getEndColumn());
+        setEndLine(nameToken.getEndLine());
         attributesStart = getNameEnd();
         ArrayList<IMXMLTagAttributeData> attrs = new ArrayList<IMXMLTagAttributeData>();
         attributeMap = new LinkedHashMap<String, IMXMLTagAttributeData>(); //preserve order of attrs

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/39b119a4/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTextData.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTextData.java b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTextData.java
index 5411912..e6e9acf 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTextData.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTextData.java
@@ -46,6 +46,8 @@ public class MXMLTextData extends MXMLUnitData implements IMXMLTextData
         setOffsets(textToken.getStart(), textToken.getEnd());
         setLine(textToken.getLine());
         setColumn(textToken.getColumn());
+        setEndLine(textToken.getEndLine());
+        setEndColumn(textToken.getEndColumn());
 
         switch (textToken.getType())
         {


[5/5] git commit: [flex-falcon] [refs/heads/feature-autobuild/closure-classpath-sources] - - Merged latest changes from develop - Hopefully fixed an issue if the closure-lib is specified on the commandline/ant

Posted by cd...@apache.org.
- Merged latest changes from develop
- Hopefully fixed an issue if the closure-lib is specified on the commandline/ant


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/a36a8005
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/a36a8005
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/a36a8005

Branch: refs/heads/feature-autobuild/closure-classpath-sources
Commit: a36a80053f2b6ec663c3aecf60bce877ac26a629
Parents: d47ac92 2c8becb
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Fri Nov 4 10:31:42 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Fri Nov 4 10:31:42 2016 +0100

----------------------------------------------------------------------
 .../internal/codegen/js/JSEmitterTokens.java    |   1 +
 .../codegen/js/jx/BinaryOperatorEmitter.java    |  28 ++--
 .../codegen/js/jx/MemberAccessEmitter.java      |  13 +-
 .../codegen/js/jx/SuperCallEmitter.java         | 159 +++++++++++++------
 .../js/flexjs/TestFlexJSAccessorMembers.java    |   8 +-
 .../codegen/js/flexjs/TestFlexJSClass.java      |   6 +-
 .../js/flexjs/TestFlexJSExpressions.java        |  16 +-
 .../mxml/flexjs/TestFlexJSMXMLScript.java       |   2 +-
 .../flexjs/projects/super/Base_result.js        |   6 +-
 .../internal/mxml/MXMLTagAttributeData.java     |   2 +
 .../compiler/internal/mxml/MXMLTagData.java     |   4 +
 .../compiler/internal/mxml/MXMLTextData.java    |   2 +
 .../resources/config/compile-extern-config.xml  |   4 +
 13 files changed, 167 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a36a8005/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
----------------------------------------------------------------------
diff --cc compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
index 7be2c42,657bf72..915aacf
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
@@@ -228,11 -274,22 +274,22 @@@ public class SuperCallEmitter extends J
  
          if (writeArguments)
          {
-             for (IASNode anode : anodes) {
+         	if (usingApply)
+         	{
                  writeToken(ASEmitterTokens.COMMA);
+                 writeToken(ASEmitterTokens.SQUARE_OPEN);
+         	}
 -        	
++
+             int len = anodes.length;
+             for (int i = 0; i < len; i++)
+             {
+             	if (!usingApply || i > 0)
+             		writeToken(ASEmitterTokens.COMMA);
  
-                 getWalker().walk(anode);
+                 getWalker().walk(anodes[i]);
              }
+         	if (usingApply)
+                 writeToken(ASEmitterTokens.SQUARE_CLOSE);
          }
  
          write(ASEmitterTokens.PAREN_CLOSE);


[3/5] git commit: [flex-falcon] [refs/heads/feature-autobuild/closure-classpath-sources] - add a test for FLEX-35143

Posted by cd...@apache.org.
add a test for FLEX-35143


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/f83b5b58
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/f83b5b58
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/f83b5b58

Branch: refs/heads/feature-autobuild/closure-classpath-sources
Commit: f83b5b58b7edd6236b04e65aa049d0a7d4fbd935
Parents: 90ec96e
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 2 12:40:50 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Nov 2 12:40:50 2016 -0700

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/TestFlexJSExpressions.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f83b5b58/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
index 032683a..e1bf07e 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
@@ -597,6 +597,16 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     }
 
     @Test
+    public void testVisitBinaryOperatorNode_varDynamicSlashAssignment()
+    {
+        IBinaryOperatorNode node = (IBinaryOperatorNode) getNode(
+                "public class B {public var b:Object; public function c() { b[\"\\\\\"] = 1; }}",
+                IBinaryOperatorNode.class, WRAP_LEVEL_PACKAGE);
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("this.b[\"\\\\\"] = 1");
+    }
+
+    @Test
     public void testVisitBinaryOperatorNode_StringVarAssignmentFromObject()
     {
         IBinaryOperatorNode node = (IBinaryOperatorNode) getNode(


[4/5] git commit: [flex-falcon] [refs/heads/feature-autobuild/closure-classpath-sources] - switch from goog.base (actually ClassName.base) to ClassName.superClass_.property.apply because base() doesn't seem to handle super calls to methods other than wit

Posted by cd...@apache.org.
switch from goog.base (actually ClassName.base) to ClassName.superClass_.property.apply because base() doesn't seem to handle super calls to methods other than with the same method name that was called


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2c8becbc
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2c8becbc
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2c8becbc

Branch: refs/heads/feature-autobuild/closure-classpath-sources
Commit: 2c8becbcb22052105d8a614196f1d36db6b909ec
Parents: f83b5b5
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 3 14:48:35 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Nov 3 14:48:35 2016 -0700

----------------------------------------------------------------------
 .../internal/codegen/js/JSEmitterTokens.java    |  1 +
 .../codegen/js/jx/BinaryOperatorEmitter.java    | 28 +++++----
 .../codegen/js/jx/MemberAccessEmitter.java      | 13 ++--
 .../codegen/js/jx/SuperCallEmitter.java         | 64 +++++++++++++++-----
 .../js/flexjs/TestFlexJSAccessorMembers.java    |  8 +--
 .../codegen/js/flexjs/TestFlexJSClass.java      |  6 +-
 .../js/flexjs/TestFlexJSExpressions.java        |  6 +-
 .../mxml/flexjs/TestFlexJSMXMLScript.java       |  2 +-
 .../flexjs/projects/super/Base_result.js        |  6 +-
 9 files changed, 86 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSEmitterTokens.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSEmitterTokens.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSEmitterTokens.java
index 82935af..be2aafc 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSEmitterTokens.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSEmitterTokens.java
@@ -23,6 +23,7 @@ import org.apache.flex.compiler.codegen.IEmitterTokens;
 public enum JSEmitterTokens implements IEmitterTokens
 {
     ARGUMENTS("arguments"),
+    APPLY("apply"),
     CALL("call"),
     CONFIGURABLE("configurable"),
     CONSTRUCTOR("constructor"),

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
index 0e237d2..98ada1a 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
@@ -26,6 +26,7 @@ import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.definitions.metadata.IMetaTag;
 import org.apache.flex.compiler.definitions.metadata.IMetaTagAttribute;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
+import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSDocEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
@@ -121,34 +122,35 @@ public class BinaryOperatorEmitter extends JSSubEmitter implements
                         		getModel().getCurrentClass().getQualifiedName()));
                         			
                         write(ASEmitterTokens.MEMBER_ACCESS);
-                        write(JSGoogEmitterTokens.GOOG_BASE);
-                        write(ASEmitterTokens.PAREN_OPEN);
-                        write(ASEmitterTokens.THIS);
-                        writeToken(ASEmitterTokens.COMMA);
-                        write(ASEmitterTokens.SINGLE_QUOTE);
+                        write(JSGoogEmitterTokens.SUPERCLASS);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
                         write(JSFlexJSEmitterTokens.SETTER_PREFIX);
                         write(rnodeDef.getBaseName());
-                        write(ASEmitterTokens.SINGLE_QUOTE);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        write(JSEmitterTokens.APPLY);
+                        write(ASEmitterTokens.PAREN_OPEN);
+                        write(ASEmitterTokens.THIS);
                         writeToken(ASEmitterTokens.COMMA);
-
+                        writeToken(ASEmitterTokens.SQUARE_OPEN);
                         if (op.length() > 1) // += and things like that
                         {
                             write(getEmitter().formatQualifiedName(
                                     cnode.getQualifiedName()));
                             write(ASEmitterTokens.MEMBER_ACCESS);
-                            write(JSGoogEmitterTokens.GOOG_BASE);
+                            write(JSGoogEmitterTokens.SUPERCLASS);
+                            write(ASEmitterTokens.MEMBER_ACCESS);
+                            write(JSFlexJSEmitterTokens.GETTER_PREFIX);
+                            write(rnodeDef.getBaseName());
+                            write(ASEmitterTokens.MEMBER_ACCESS);
+                            write(JSEmitterTokens.APPLY);
                             write(ASEmitterTokens.PAREN_OPEN);
                             write(ASEmitterTokens.THIS);
-                            writeToken(ASEmitterTokens.COMMA);
-                            write(ASEmitterTokens.SINGLE_QUOTE);
-                            write(JSFlexJSEmitterTokens.SETTER_PREFIX);
-                            write(rnodeDef.getBaseName());
-                            write(ASEmitterTokens.SINGLE_QUOTE);
                             write(ASEmitterTokens.PAREN_CLOSE);
                             write(op.substring(0, 1));
                         }
 
                         getWalker().walk(node.getRightOperandNode());
+                        writeToken(ASEmitterTokens.SQUARE_CLOSE);
                         write(ASEmitterTokens.PAREN_CLOSE);
                         return;
                     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
index a54dfac..105dec9 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
@@ -24,6 +24,7 @@ import org.apache.flex.compiler.codegen.js.IJSEmitter;
 import org.apache.flex.compiler.constants.IASLanguageConstants;
 import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
+import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitterTokens;
@@ -290,17 +291,17 @@ public class MemberAccessEmitter extends JSSubEmitter implements
                 write(getEmitter().formatQualifiedName(
                         getEmitter().getModel().getCurrentClass().getQualifiedName()));
                 write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSGoogEmitterTokens.GOOG_BASE);
-                write(ASEmitterTokens.PAREN_OPEN);
-                write(ASEmitterTokens.THIS);
-                writeToken(ASEmitterTokens.COMMA);
-                write(ASEmitterTokens.SINGLE_QUOTE);
+                write(JSGoogEmitterTokens.SUPERCLASS);
+                write(ASEmitterTokens.MEMBER_ACCESS);
                 write(JSFlexJSEmitterTokens.GETTER_PREFIX);
                 if (rightDef != null)
                     write(rightDef.getBaseName());
                 else
                     write(((GetterNode) rightNode).getName());
-                write(ASEmitterTokens.SINGLE_QUOTE);
+                write(ASEmitterTokens.MEMBER_ACCESS);
+                write(JSEmitterTokens.APPLY);
+                write(ASEmitterTokens.PAREN_OPEN);
+                write(ASEmitterTokens.THIS);
                 write(ASEmitterTokens.PAREN_CLOSE);
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
index 12dc411..657bf72 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/SuperCallEmitter.java
@@ -26,6 +26,7 @@ import org.apache.flex.compiler.definitions.IClassDefinition;
 import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.definitions.INamespaceDefinition;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
+import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSSessionModel;
 import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
@@ -89,17 +90,17 @@ public class SuperCallEmitter extends JSSubEmitter
                     write(getEmitter().formatQualifiedName(
                             cnode.getQualifiedName()));
                 write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSGoogEmitterTokens.GOOG_BASE);
-                write(ASEmitterTokens.PAREN_OPEN);
-                write(ASEmitterTokens.THIS);
-                writeToken(ASEmitterTokens.COMMA);
-                write(ASEmitterTokens.SINGLE_QUOTE);
+                write(JSGoogEmitterTokens.SUPERCLASS);
+                write(ASEmitterTokens.MEMBER_ACCESS);
                 if (fnode.getNodeID() == ASTNodeID.GetterID)
                     write(JSFlexJSEmitterTokens.GETTER_PREFIX);
                 else
                     write(JSFlexJSEmitterTokens.SETTER_PREFIX);
                 write(fnode.getName());
-                write(ASEmitterTokens.SINGLE_QUOTE);
+                write(ASEmitterTokens.MEMBER_ACCESS);
+                write(JSEmitterTokens.APPLY);
+                write(ASEmitterTokens.PAREN_OPEN);
+                write(ASEmitterTokens.THIS);
 
                 IASNode[] anodes = null;
                 boolean writeArguments = false;
@@ -126,18 +127,23 @@ public class SuperCallEmitter extends JSSubEmitter
                     if (pnode.getNodeID() == ASTNodeID.SetterID)
                     {
                         writeToken(ASEmitterTokens.COMMA);
+                        writeToken(ASEmitterTokens.SQUARE_OPEN);
                         getWalker().walk(bnode.getRightOperandNode());
+                        writeToken(ASEmitterTokens.SQUARE_CLOSE);
                     }
                 }
 
                 if (writeArguments)
                 {
+                	// I think len has to be 0 or 1
                     int len = anodes.length;
                     for (int i = 0; i < len; i++)
                     {
                         writeToken(ASEmitterTokens.COMMA);
+                        writeToken(ASEmitterTokens.SQUARE_OPEN);
 
                         getWalker().walk(anodes[i]);
+                        writeToken(ASEmitterTokens.SQUARE_CLOSE);
                     }
                 }
 
@@ -185,23 +191,25 @@ public class SuperCallEmitter extends JSSubEmitter
         }
         else
             write(fjs.formatQualifiedName(cnode.getQualifiedName()));
-        write(ASEmitterTokens.MEMBER_ACCESS);
-        write(JSGoogEmitterTokens.GOOG_BASE);
-        write(ASEmitterTokens.PAREN_OPEN);
-        write(ASEmitterTokens.THIS);
-
         if (fnode.isConstructor())
         {
+            write(ASEmitterTokens.MEMBER_ACCESS);
+            write(JSGoogEmitterTokens.GOOG_BASE);
+            write(ASEmitterTokens.PAREN_OPEN);
+            write(ASEmitterTokens.THIS);
+
             writeToken(ASEmitterTokens.COMMA);
             write(ASEmitterTokens.SINGLE_QUOTE);
             write(JSGoogEmitterTokens.GOOG_CONSTRUCTOR);
             write(ASEmitterTokens.SINGLE_QUOTE);
         }
 
+        boolean usingApply = false;
+        boolean isCustomNamespace = false;
         if (fnode != null && !fnode.isConstructor())
         {
-            writeToken(ASEmitterTokens.COMMA);
-            write(ASEmitterTokens.SINGLE_QUOTE);
+            write(ASEmitterTokens.MEMBER_ACCESS);
+            write(JSGoogEmitterTokens.SUPERCLASS);
             IExpressionNode namenode = fcnode.getNameNode();
             IDefinition def = namenode.resolve(getWalker().getProject());
             String superName = fnode.getName();
@@ -220,9 +228,26 @@ public class SuperCallEmitter extends JSSubEmitter
             		fjs.formatQualifiedName(nsDef.getQualifiedName()); // register with used names 
     			String s = nsDef.getURI();
     			superName = s + "::" + superName;
+    			isCustomNamespace = true;
+            }
+            if (isCustomNamespace)
+            {
+            	write(ASEmitterTokens.SQUARE_OPEN);
+            	write(ASEmitterTokens.SINGLE_QUOTE);
             }
+            else
+                write(ASEmitterTokens.MEMBER_ACCESS);
             write(superName);
-            write(ASEmitterTokens.SINGLE_QUOTE);
+            if (isCustomNamespace)
+            {
+            	write(ASEmitterTokens.SINGLE_QUOTE);
+                write(ASEmitterTokens.SQUARE_CLOSE);
+            }
+            write(ASEmitterTokens.MEMBER_ACCESS);
+            write(JSEmitterTokens.APPLY);
+            write(ASEmitterTokens.PAREN_OPEN);
+            write(ASEmitterTokens.THIS);
+            usingApply = true;
         }
 
         IASNode[] anodes = null;
@@ -249,13 +274,22 @@ public class SuperCallEmitter extends JSSubEmitter
 
         if (writeArguments)
         {
+        	if (usingApply)
+        	{
+                writeToken(ASEmitterTokens.COMMA);
+                writeToken(ASEmitterTokens.SQUARE_OPEN);
+        	}
+        	
             int len = anodes.length;
             for (int i = 0; i < len; i++)
             {
-                writeToken(ASEmitterTokens.COMMA);
+            	if (!usingApply || i > 0)
+            		writeToken(ASEmitterTokens.COMMA);
 
                 getWalker().walk(anodes[i]);
             }
+        	if (usingApply)
+                writeToken(ASEmitterTokens.SQUARE_CLOSE);
         }
 
         write(ASEmitterTokens.PAREN_CLOSE);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
index e7ad931..cfc0578 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
@@ -74,7 +74,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
-				"B.prototype.get__foo = function() {\n  return B.base(this, 'get__foo');\n};\n\n\n" +
+				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
         		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nget: B.prototype.get__foo}}\n);");
     }
 
@@ -85,7 +85,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
-				"B.prototype.get__foo = function() {\n  return B.base(this, 'get__foo');\n};\n\n\n" +
+				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
         		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
     }
     
@@ -145,7 +145,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
-				"B.prototype.set__foo = function(value) {\n  B.base(this, 'set__foo', value);\n};\n\n\n" +
+				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
         		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nset: B.prototype.set__foo}}\n);");
     }
 
@@ -168,7 +168,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
         		IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
-				"B.prototype.set__foo = function(value) {\n  B.base(this, 'set__foo', value);\n};\n\n\n" +
+				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
         		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
     }
     

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
index a597afa..54f4f03 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
@@ -168,7 +168,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {super.foo();};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n  org.apache.flex.B.base(this, 'foo');\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n  org.apache.flex.B.superClass_.foo.apply(this);\n};";
         assertOut(expected);
     }
 
@@ -186,7 +186,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B extends A {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};} class A {public function set foo(value:Object):void {}}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n * @extends {org.apache.flex.A}\n */\norg.apache.flex.B = function() {\n  org.apache.flex.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.B, org.apache.flex.A);\n\n\norg.apache.flex.B.prototype.set__foo = function(value) {\n  org.apache.flex.B.base(this, 'set__foo', value);\n};\n\n\nObject.defineProperties(org.apache.flex.B.prototype, /** @lends {org.apache.flex.B.prototype} */ {\n/** @export */\nfoo: {\nset: org.apache.flex.B.prototype.set__foo}}\n);";
+        String expected = "/**\n * @constructor\n * @extends {org.apache.flex.A}\n */\norg.apache.flex.B = function() {\n  org.apache.flex.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.B, org.apache.flex.A);\n\n\norg.apache.flex.B.prototype.set__foo = function(value) {\n  org.apache.flex.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.flex.B.prototype, /** @lends {org.apache.flex.B.prototype} */ {\n/** @export */\nfoo: {\nset: org.apache.flex.B.prototype.set__foo}}\n);";
         assertOut(expected);
     }
 
@@ -299,7 +299,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "public static function foo7(value:Object):void{}"
                 + "flash_proxy static function foo7(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n  return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n  return null;\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n  return org.apache.flex.A.base(this, 'foo1b');\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo6\"] = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apac
 he.flex.A.foo7 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo7\"] = function(value) {\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n  return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n  return null;\n};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n  return org.apache.flex.A.superClass_.foo1b.apply(this);\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo6\"] = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */
 \norg.apache.flex.A.foo7 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo7\"] = function(value) {\n};");
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
index e1bf07e..153e648 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
@@ -81,7 +81,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){if (a) super.foo();}");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.foo = function() {\n  if (a)\n    FalconTest_A.base(this, 'foo');\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  if (a)\n    FalconTest_A.superClass_.foo.apply(this);\n}");
     }
 
     @Override
@@ -90,7 +90,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){if (a) super.foo(a, b, c);}");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.foo = function() {\n  if (a)\n    FalconTest_A.base(this, 'foo', a, b, c);\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  if (a)\n    FalconTest_A.superClass_.foo.apply(this, [ a, b, c] );\n}");
     }
     
     @Test
@@ -99,7 +99,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
         IFunctionNode node = (IFunctionNode)getNode("import flash.utils.Proxy;import flash.utils.flash_proxy;use namespace flash_proxy;public class FalconTest_A extends Proxy { flash_proxy function foo(){if (a) super.setProperty(a, b);}}",
         					IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n */\nFalconTest_A.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo\"] = function() {\n  if (a)\n    FalconTest_A.base(this, 'http://www.adobe.com/2006/actionscript/flash/proxy::setProperty', a, b);\n}");
+        assertOut("/**\n */\nFalconTest_A.prototype[\"http://www.adobe.com/2006/actionscript/flash/proxy::foo\"] = function() {\n  if (a)\n    FalconTest_A.superClass_['http://www.adobe.com/2006/actionscript/flash/proxy::setProperty'].apply(this, [ a, b] );\n}");
     }
 
     //----------------------------------

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
index 2f2d0de..4ecfbc7 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
@@ -85,7 +85,7 @@ public class TestFlexJSMXMLScript extends FlexJSTestBase
 				" * @override\n" +
 				" */\n" +
 				"AppName.prototype.addedToParent = function() {\n" +
-				"  AppName.base(this, 'addedToParent');\n" +
+				"  AppName.superClass_.addedToParent.apply(this);\n" +
 				"};\n" +
 				"\n" +
 				"\n" +

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2c8becbc/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js b/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
index 326c395..2e5c7ec 100644
--- a/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
+++ b/compiler-jx/src/test/resources/flexjs/projects/super/Base_result.js
@@ -36,13 +36,13 @@ goog.inherits(Base, Super);
 
 
 Base.prototype.get__text = function() {
-  return "A" + Base.base(this, 'get__text');
+  return "A" + Base.superClass_.get__text.apply(this);
 };
 
 
 Base.prototype.set__text = function(value) {
-  if (value != Base.base(this, 'get__text')) {
-    Base.base(this, 'set__text', "B" + value);
+  if (value != Base.superClass_.get__text.apply(this)) {
+    Base.superClass_.set__text.apply(this, [ "B" + value] );
   }
 };
 


[2/5] git commit: [flex-falcon] [refs/heads/feature-autobuild/closure-classpath-sources] - set mxml.children-as-data for the 'extern' or xxJS.swc so the dependencies are the same as the transpile

Posted by cd...@apache.org.
set mxml.children-as-data for the 'extern' or xxJS.swc so the dependencies are the same as the transpile


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/90ec96e5
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/90ec96e5
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/90ec96e5

Branch: refs/heads/feature-autobuild/closure-classpath-sources
Commit: 90ec96e500a1d58e18fb39311e26b7da9fe796b9
Parents: 39b119a
Author: Alex Harui <ah...@apache.org>
Authored: Tue Nov 1 23:18:57 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 1 23:18:57 2016 -0700

----------------------------------------------------------------------
 .../src/main/resources/config/compile-extern-config.xml          | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/90ec96e5/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml b/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
index 6be6202..dce12d2 100644
--- a/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
+++ b/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
@@ -48,6 +48,10 @@
 
         <warn-no-constructor>false</warn-no-constructor>
 
+        <mxml>
+            <children-as-data>true</children-as-data>
+        </mxml>
+
         <show-deprecation-warnings>false</show-deprecation-warnings>
 
 #foreach($define in $defines)        <define>