You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/09/17 22:58:15 UTC
[2/2] git commit: [flex-falcon] [refs/heads/develop] - handle externs
when filtering output
handle externs when filtering output
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/41b21162
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/41b21162
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/41b21162
Branch: refs/heads/develop
Commit: 41b2116285599ecb787e96724457767c4955f8b6
Parents: 4b448f5
Author: Alex Harui <ah...@apache.org>
Authored: Thu Sep 17 13:58:46 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Sep 17 13:58:46 2015 -0700
----------------------------------------------------------------------
.../src/org/apache/flex/compiler/clients/COMPJSC.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/41b21162/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
index ea075c6..caf6577 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
@@ -45,6 +45,7 @@ import org.apache.flex.compiler.internal.driver.mxml.flexjs.MXMLFlexJSSWCBackend
import org.apache.flex.compiler.internal.driver.mxml.jsc.MXMLJSCJSSWCBackend;
import org.apache.flex.compiler.internal.driver.mxml.vf2js.MXMLVF2JSSWCBackend;
import org.apache.flex.compiler.internal.projects.CompilerProject;
+import org.apache.flex.compiler.internal.targets.FlexJSSWCTarget;
import org.apache.flex.compiler.internal.targets.JSTarget;
import org.apache.flex.compiler.problems.ICompilerProblem;
import org.apache.flex.compiler.problems.InternalCompilerProblem;
@@ -198,7 +199,9 @@ public class COMPJSC extends MXMLJSC
File outputFolder = new File(getOutputFilePath());
- Collection<ICompilationUnit> reachableCompilationUnits = project.getCompilationUnits();
+ Set<String> externs = config.getExterns();
+ Collection<ICompilationUnit> roots = ((FlexJSSWCTarget)target).getReachableCompilationUnits(errors);
+ Collection<ICompilationUnit> reachableCompilationUnits = project.getReachableCompilationUnitsInSWFOrder(roots);
for (final ICompilationUnit cu : reachableCompilationUnits)
{
ICompilationUnit.UnitType cuType = cu.getCompilationUnitType();
@@ -206,6 +209,9 @@ public class COMPJSC extends MXMLJSC
if (cuType == ICompilationUnit.UnitType.AS_UNIT
|| cuType == ICompilationUnit.UnitType.MXML_UNIT)
{
+ String symbol = cu.getQualifiedNames().get(0);
+ if (externs.contains(symbol)) continue;
+
final File outputClassFile = getOutputClassFile(
cu.getQualifiedNames().get(0), outputFolder);