flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - bindable vars with complex initializers were not being emitted
Date Thu, 05 May 2016 05:28:01 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop ffd49309b -> b921b9b5a


bindable vars with complex initializers were not being emitted


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

Branch: refs/heads/develop
Commit: b921b9b5afdd5268839231d492d0d96fa8b85f86
Parents: ffd4930
Author: Alex Harui <aharui@apache.org>
Authored: Wed May 4 22:27:39 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed May 4 22:27:57 2016 -0700

----------------------------------------------------------------------
 .../internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b921b9b5/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 8beba40..a536f9b 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
@@ -2280,7 +2280,9 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
     			for (int j = 0; j < m; j++)
     			{
     				IASNode schild = child.getChild(j);
-    				if (schild.getNodeID() == ASTNodeID.VariableID)
+    				ASTNodeID schildID = schild.getNodeID();
+    				if (schildID == ASTNodeID.VariableID ||
+    						schildID == ASTNodeID.BindableVariableID)
     				{
     					IVariableNode varnode = (IVariableNode)schild;
     			        IExpressionNode vnode = varnode.getAssignedValueNode();
@@ -2290,6 +2292,8 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
     	                    write(ASEmitterTokens.THIS);
     	                    write(ASEmitterTokens.MEMBER_ACCESS);
     	                    write(varnode.getName());
+    	                    if (schildID == ASTNodeID.BindableVariableID)
+    	                    	write("_"); // use backing variable
     	                    write(ASEmitterTokens.SPACE);
     	                    writeToken(ASEmitterTokens.EQUAL);
     	                    JSFlexJSEmitter fjs = (JSFlexJSEmitter) ((IMXMLBlockWalker) getMXMLWalker())


Mime
View raw message