flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [2/8] git commit: Fix bug in for/foreach handling
Date Fri, 12 Apr 2013 07:02:28 GMT
Fix bug in for/foreach handling


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

Branch: refs/heads/develop
Commit: 4eb9af881ee9681291a6550768267516785f35ff
Parents: 645e6e6
Author: Alex Harui <aharui@apache.org>
Authored: Sun Apr 7 21:13:17 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Apr 11 17:24:47 2013 -0700

----------------------------------------------------------------------
 .../internal/as/codegen/JSGeneratingReducer.java   |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4eb9af88/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
----------------------------------------------------------------------
diff --git a/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
b/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
index f1ffd63..8d6eb76 100644
--- a/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
+++ b/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
@@ -98,6 +98,7 @@ import org.apache.flex.compiler.internal.semantics.SemanticUtils;
 import org.apache.flex.compiler.internal.tree.as.BaseDefinitionNode;
 import org.apache.flex.compiler.internal.tree.as.BaseVariableNode;
 import org.apache.flex.compiler.internal.tree.as.ExpressionNodeBase;
+import org.apache.flex.compiler.internal.tree.as.ForLoopNode;
 import org.apache.flex.compiler.internal.tree.as.FunctionCallNode;
 import org.apache.flex.compiler.internal.tree.as.FunctionNode;
 import org.apache.flex.compiler.internal.tree.as.FunctionObjectNode;
@@ -123,6 +124,7 @@ import org.apache.flex.compiler.problems.UnknownNamespaceProblem;
 import org.apache.flex.compiler.problems.VoidTypeProblem;
 import org.apache.flex.compiler.projects.ICompilerProject;
 import org.apache.flex.compiler.scopes.IASScope;
+import org.apache.flex.compiler.tree.ASTNodeID;
 import org.apache.flex.compiler.tree.as.IASNode;
 import org.apache.flex.compiler.tree.as.IDynamicAccessNode;
 import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
@@ -3243,8 +3245,9 @@ public class JSGeneratingReducer
 
     public String reduce_forKeyValueStmt(IASNode iNode, Binding it, String base, String body,
int opcode)
     {
+    	boolean isForInLoop = iNode.getNodeID() == ASTNodeID.ForLoopID;
         String result = generateForKeyOrValueLoop(iNode, opcode, it, base, body);
-        result += reduce_forLoop(iNode, it, base, body, false);
+        result += reduce_forLoop(iNode, it, base, body, isForInLoop);
         return result;
     }
 


Mime
View raw message