flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gregd...@apache.org
Subject [1/6] git commit: [flex-falcon] [refs/heads/develop] - [FIX] Do not treat bindable const values in the same way as regular 'bindable' variables
Date Tue, 11 Oct 2016 07:17:16 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 557cd7978 -> 86644a94b


[FIX] Do not treat bindable const values in the same way as regular 'bindable' variables


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

Branch: refs/heads/develop
Commit: ba963ac2377f638c968fb10b4e375b7626cbb2c2
Parents: 09b76c2
Author: greg-dove <greg.dove@gmail.com>
Authored: Mon Oct 10 17:37:12 2016 +1300
Committer: greg-dove <greg.dove@gmail.com>
Committed: Mon Oct 10 17:37:12 2016 +1300

----------------------------------------------------------------------
 .../flex/compiler/internal/codegen/js/jx/FieldEmitter.java  | 9 +++++----
 .../internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java     | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ba963ac2/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
index 23459c4..b3b6bdb 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
@@ -31,9 +31,11 @@ import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSSessionModel.BindableVarInfo;
 import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
 import org.apache.flex.compiler.internal.codegen.js.utils.EmitterUtils;
+import org.apache.flex.compiler.internal.definitions.VariableDefinition;
 import org.apache.flex.compiler.internal.tree.as.ChainedVariableNode;
 import org.apache.flex.compiler.internal.tree.as.GetterNode;
 import org.apache.flex.compiler.internal.tree.as.SetterNode;
+import org.apache.flex.compiler.internal.tree.as.VariableNode;
 import org.apache.flex.compiler.internal.tree.as.parts.FunctionContentsPart;
 import org.apache.flex.compiler.parsing.IASToken;
 import org.apache.flex.compiler.tree.ASTNodeID;
@@ -103,7 +105,7 @@ public class FieldEmitter extends JSSubEmitter implements
             endMapping(node.getNameExpressionNode());
         }
 
-        if (node.getNodeID() == ASTNodeID.BindableVariableID)
+        if (node.getNodeID() == ASTNodeID.BindableVariableID && !node.isConst())
         {
             // add an underscore to convert this var to be the
             // backing var for the get/set pair that will be generated later.
@@ -153,7 +155,7 @@ public class FieldEmitter extends JSSubEmitter implements
                 }
             }
         }
-        if (node.getNodeID() == ASTNodeID.BindableVariableID)
+        if (node.getNodeID() == ASTNodeID.BindableVariableID && !node.isConst())
         {
             if (getModel().getBindableVars().get(node.getName()) == null) {
                 BindableVarInfo bindableVarInfo = new BindableVarInfo();
@@ -201,7 +203,7 @@ public class FieldEmitter extends JSSubEmitter implements
                         + ASEmitterTokens.MEMBER_ACCESS.getToken());
                 write(node.getName());
 	
-	            if (node.getNodeID() == ASTNodeID.BindableVariableID)
+	            if (node.getNodeID() == ASTNodeID.BindableVariableID && !node.isConst())
 	            {
 	                // add an underscore to convert this var to be the
 	                // backing var for the get/set pair that will be generated later.
@@ -211,7 +213,6 @@ public class FieldEmitter extends JSSubEmitter implements
 	            writeToken(ASEmitterTokens.EQUAL);
 	            write(vnodeString);
 	            write(ASEmitterTokens.SEMICOLON);
-	
 	        }
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ba963ac2/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
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 f42692f..3e8dfac 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
@@ -676,7 +676,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         for (IVariableNode varNode : vars)
         {
             String ns = varNode.getNamespace();
-            if (ns == IASKeywordConstants.PUBLIC)
+            if (ns == IASKeywordConstants.PUBLIC && !varNode.isConst())
             {
             	PackageFooterEmitter.VariableData data = asEmitter.packageFooterEmitter.new
VariableData();
             	varData.add(data);


Mime
View raw message