flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [3/4] git commit: [flex-falcon] [refs/heads/develop] - eliminate duplicate requires
Date Fri, 06 Jan 2017 18:20:44 GMT
eliminate duplicate requires


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

Branch: refs/heads/develop
Commit: 7ad51932e5aca09fa36e80bda75571f272184547
Parents: a5c260d
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jan 6 10:17:57 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 6 10:17:57 2017 -0800

----------------------------------------------------------------------
 .../internal/codegen/js/jx/ClassEmitter.java         | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7ad51932/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
index 5a3dcc3..1717a64 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/ClassEmitter.java
@@ -24,6 +24,7 @@ import org.apache.flex.compiler.clients.MXMLJSC;
 import org.apache.flex.compiler.codegen.ISubEmitter;
 import org.apache.flex.compiler.codegen.js.IJSEmitter;
 import org.apache.flex.compiler.definitions.IClassDefinition;
+import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.definitions.IFunctionDefinition;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
@@ -87,15 +88,11 @@ public class ClassEmitter extends JSSubEmitter implements
         				IASNode afterChild = child.getChild(j + 1);
         				if (afterChild.getNodeID() == ASTNodeID.IdentifierID)
         				{
-                            write(JSGoogEmitterTokens.GOOG_REQUIRE);
-                            write(ASEmitterTokens.PAREN_OPEN);
-                            write(ASEmitterTokens.SINGLE_QUOTE);
-                            getEmitter().emitIdentifier((IdentifierNode)afterChild);    
                       
-                            write(ASEmitterTokens.SINGLE_QUOTE);
-                            write(ASEmitterTokens.PAREN_CLOSE);
-                            writeNewline(ASEmitterTokens.SEMICOLON);
-                            writeNewline();
-                            writeNewline();
+        					IDefinition def = ((IdentifierNode)afterChild).resolve(project);
+        					if (def instanceof IClassDefinition)
+        					{
+        						fjs.usedNames.add(def.getQualifiedName());
+        					}
         				}
         			}
         		}


Mime
View raw message