You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/10/31 16:44:37 UTC

git commit: [flex-falcon] [refs/heads/develop] - that is only for mxml data

Repository: flex-falcon
Updated Branches:
  refs/heads/develop c1a72014c -> f05424470


that is only for mxml data


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

Branch: refs/heads/develop
Commit: f054244706e1716740227a3116d005d198f9c8ca
Parents: c1a7201
Author: Alex Harui <ah...@apache.org>
Authored: Fri Oct 31 08:44:30 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Oct 31 08:44:30 2014 -0700

----------------------------------------------------------------------
 .../as/codegen/MXMLClassDirectiveProcessor.java | 27 +++++++++++---------
 1 file changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f0542447/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java b/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
index 5064326..2bc1347 100644
--- a/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
+++ b/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
@@ -1232,22 +1232,25 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             // call the Binding helper to get all the data binding setup code
             addBindingCodeForCtor(ctor_insns);
 
-            // if we have state dependent instance nodes add descriptors for them
-            if (indexToNodeMap!=null && indexToNodeMap.size() > 0)
+            if (getProject().getTargetSettings().getMxmlChildrenAsData())
             {
-                ctor_insns.addInstruction(OP_getlocal0);           
-                int numNodes = indexToNodeMap.size();
-                for (int i = 0; i < numNodes; i++)
+                // if we have state dependent instance nodes add descriptors for them
+                if (indexToNodeMap!=null && indexToNodeMap.size() > 0)
                 {
-                    IMXMLNode node = indexToNodeMap.get(Integer.valueOf(i));
-                    InstructionList il = nodeToInstanceDescriptorMap.get(node);
-                    ctor_insns.addAll(il);
+                    ctor_insns.addInstruction(OP_getlocal0);           
+                    int numNodes = indexToNodeMap.size();
+                    for (int i = 0; i < numNodes; i++)
+                    {
+                        IMXMLNode node = indexToNodeMap.get(Integer.valueOf(i));
+                        InstructionList il = nodeToInstanceDescriptorMap.get(node);
+                        ctor_insns.addAll(il);
+                    }
+                    ctor_insns.addInstruction(OP_newarray, numNodes);           
+                    
+                    ctor_insns.addInstruction(OP_setproperty, NAME_MXML_STATE_DESCRIPTOR);
                 }
-                ctor_insns.addInstruction(OP_newarray, numNodes);           
-                
-                ctor_insns.addInstruction(OP_setproperty, NAME_MXML_STATE_DESCRIPTOR);
             }
-
+            
             // add call to MXMLAttributes
             if (getProject().getTargetSettings().getMxmlChildrenAsData() && numElements > 0)
             {