Repository: flex-falcon Updated Branches: refs/heads/develop 1d404c91b -> 19140007c
EmitterUtils: do not write this for functions that are members of a package or a file Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/7e412ea8 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/7e412ea8 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/7e412ea8 Branch: refs/heads/develop Commit: 7e412ea8e1efb5f31129e1f3621c12cb44cfb107 Parents: 1d404c9 Author: Josh Tynjala <[email protected]> Authored: Mon Jan 11 14:59:00 2016 -0800 Committer: Josh Tynjala <[email protected]> Committed: Mon Jan 11 14:59:00 2016 -0800 ---------------------------------------------------------------------- .../internal/codegen/js/utils/EmitterUtils.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7e412ea8/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/utils/EmitterUtils.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/utils/EmitterUtils.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/utils/EmitterUtils.java index 9afeb77..471e5b7 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/utils/EmitterUtils.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/utils/EmitterUtils.java @@ -324,9 +324,20 @@ public class EmitterUtils } else { + boolean isFileOrPackageMember = false; + if(nodeDef instanceof FunctionDefinition) + { + FunctionClassification classification = ((FunctionDefinition) nodeDef).getFunctionClassification(); + if(classification == FunctionClassification.FILE_MEMBER || + classification == FunctionClassification.PACKAGE_MEMBER) + { + isFileOrPackageMember = true; + } + } return parentNodeId == ASTNodeID.FunctionCallID && !(nodeDef instanceof AccessorDefinition) - && !identifierIsMemberAccess; + && !identifierIsMemberAccess + && !isFileOrPackageMember; } } else
