flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [4/8] git commit: [flex-falcon] [refs/heads/develop] - handle square-bracket access for functions
Date Thu, 08 Oct 2015 19:06:22 GMT
handle square-bracket access for functions


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

Branch: refs/heads/develop
Commit: a8188f87355ebe8e04d8b79007e2889631d60048
Parents: 2a04421
Author: Alex Harui <aharui@apache.org>
Authored: Thu Oct 8 11:54:01 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Oct 8 11:54:01 2015 -0700

----------------------------------------------------------------------
 .../compiler/internal/codegen/js/jx/MemberAccessEmitter.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a8188f87/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
index d0ac2a4..6db5614 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
@@ -70,8 +70,9 @@ public class MemberAccessEmitter extends JSSubEmitter implements
 				ASTNodeID parentNodeId = parentNode.getNodeID();
 				// we need a closure if this MAE is the top-level in a chain
 				// of MAE and not in a function call.
-				needClosure = parentNodeId != ASTNodeID.FunctionCallID &&
-							parentNodeId != ASTNodeID.MemberAccessExpressionID;
+				needClosure = !isStatic && parentNodeId != ASTNodeID.FunctionCallID &&
+							parentNodeId != ASTNodeID.MemberAccessExpressionID &&
+							parentNodeId != ASTNodeID.ArrayIndexExpressionID;
         		
         	}
         }


Mime
View raw message