flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [15/50] git commit: [flex-falcon] [refs/heads/master] - output Language on a per-file basis
Date Mon, 26 Jun 2017 15:44:55 GMT
output Language on a per-file basis


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

Branch: refs/heads/master
Commit: f9c92e4958387ba497debf66f2b092f9a2b2eb13
Parents: 31fd9d6
Author: Alex Harui <aharui@apache.org>
Authored: Wed May 10 22:33:33 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed May 10 22:33:33 2017 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/codegen/js/JSSessionModel.java | 2 ++
 .../compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java     | 3 ++-
 .../apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java | 2 +-
 .../compiler/internal/codegen/js/jx/FunctionCallEmitter.java     | 4 ++++
 4 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f9c92e49/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
index ca47881..3ace9e5 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSSessionModel.java
@@ -77,6 +77,8 @@ public class JSSessionModel
     }
     private Stack<Context> stack = new Stack<Context>();
 
+    public boolean needLanguage = false;
+    
     public boolean isExterns = false;
 
     public boolean inE4xFilter = false;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f9c92e49/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index 2d7b257..d07cf4f 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -215,7 +215,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                     if (project instanceof FlexJSProject)
                     {
                         FlexJSProject flexJSProject = (FlexJSProject) project;
-                        boolean needLanguage = flexJSProject.needLanguage;
+                        boolean needLanguage = getModel().needLanguage;
                         if (needLanguage && !foundLanguage)
                         {
                             StringBuilder appendString = new StringBuilder();
@@ -941,6 +941,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         ICompilerProject project = getWalker().getProject();;
         if (project instanceof FlexJSProject)
         	((FlexJSProject)project).needLanguage = true;
+        getModel().needLanguage = true;
         write(JSFlexJSEmitterTokens.CLOSURE_FUNCTION_NAME);
         write(ASEmitterTokens.PAREN_OPEN);
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f9c92e49/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
index c99d4d9..3260ef9 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
@@ -131,7 +131,7 @@ public class AsIsEmitter extends JSSubEmitter
         ICompilerProject project = this.getProject();
         if (project instanceof FlexJSProject)
         	((FlexJSProject)project).needLanguage = true;
-        
+        getEmitter().getModel().needLanguage = true;
         if (node instanceof IBinaryOperatorNode)
         {
             IBinaryOperatorNode binaryOperatorNode = (IBinaryOperatorNode) node; 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f9c92e49/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
index d125eeb..5a8a64e 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
@@ -128,6 +128,7 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
                         ICompilerProject project = this.getProject();
                         if (project instanceof FlexJSProject)
                             ((FlexJSProject) project).needLanguage = true;
+                        getEmitter().getModel().needLanguage = true;
                         write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
                         write(ASEmitterTokens.MEMBER_ACCESS);
                         if (isInt)
@@ -190,6 +191,7 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
                         ICompilerProject project = this.getProject();
                         if (project instanceof FlexJSProject)
                             ((FlexJSProject) project).needLanguage = true;
+                        getEmitter().getModel().needLanguage = true;
                         startMapping(node.getNameNode());
                         write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
                         write(ASEmitterTokens.MEMBER_ACCESS);
@@ -205,6 +207,7 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
                             ICompilerProject project = this.getProject();
                             if (project instanceof FlexJSProject)
                                 ((FlexJSProject) project).needLanguage = true;
+                            getEmitter().getModel().needLanguage = true;
                             write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
                             write(ASEmitterTokens.MEMBER_ACCESS);
                             write("sortOn");
@@ -228,6 +231,7 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
 	                			{
 		                            if (project instanceof FlexJSProject)
 		                                ((FlexJSProject) project).needLanguage = true;
+		                            getEmitter().getModel().needLanguage = true;
 		                            write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
 		                            write(ASEmitterTokens.MEMBER_ACCESS);
 		                            write("sort");


Mime
View raw message