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] - Fix multiple beads on a strand
Date Tue, 30 Apr 2013 18:27:30 GMT
Updated Branches:
  refs/heads/develop c4babfdcb -> 444371793


Fix multiple beads on a strand


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

Branch: refs/heads/develop
Commit: 444371793c6599decb0a0629e0e5913e4d332a7d
Parents: c4babfd
Author: Alex Harui <aharui@apache.org>
Authored: Tue Apr 30 11:27:14 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Apr 30 11:27:14 2013 -0700

----------------------------------------------------------------------
 .../as/codegen/MXMLClassDirectiveProcessor.java    |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/44437179/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 293fdb2..bebf953 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
@@ -2831,6 +2831,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             }
             else if (context.makingArrayValues)
             {
+                context.addInstruction(OP_newarray, context.numArrayValues);      
                 return;
             }
         }
@@ -3065,7 +3066,12 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             if (context.parentContext.isContentFactory)
                 context.parentContext.incrementCounter(IL.MXML_CONTENT_FACTORY, numElements);
             else if (!context.parentContext.isContentFactory)
-                context.addInstruction(OP_newarray, numElements); // if not in content factory,
create the array now
+            {
+                if (context.parentContext.makingArrayValues)
+                    context.parentContext.numArrayValues += numElements;
+                else    
+                    context.addInstruction(OP_newarray, numElements); // if not in content
factory, create the array now
+            }
         }
     }
     
@@ -4819,6 +4825,11 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
          * in an array (other than contextFactory)
          */
         boolean makingArrayValues;
+
+        /**
+         * number of elements in array when makingArrayValues
+         */
+        int numArrayValues = 0;
         
         /**
          * This flag used in instance contexts to keep track


Mime
View raw message