flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - handle standalone function dependencies better
Date Tue, 18 Jul 2017 14:38:16 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 90b35848c -> a8777986a


handle standalone function dependencies better


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

Branch: refs/heads/develop
Commit: a8777986a9ba11ee8d8710c015cd7a77d6bc1d89
Parents: 90b3584
Author: Alex Harui <aharui@apache.org>
Authored: Mon Jul 17 23:39:54 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Jul 17 23:39:54 2017 -0700

----------------------------------------------------------------------
 .../org/apache/flex/compiler/internal/graph/GoogDepsWriter.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a8777986/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index 00682e3..9ada634 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -412,9 +412,12 @@ public class GoogDepsWriter {
             FileInfo fi = gd.fileInfo;
             int suppressCount = 0;
             int i = 0;
+            int stopLine = fi.constructorLine;
+            if (fi.constructorLine == -1) // standalone functions
+            	stopLine = fi.googProvideLine + 4; // search a few more lines after goog.provide
             for (String line : fileLines)
             {
-            	if (i < fi.constructorLine)
+            	if (i < stopLine)
             	{
                     int c = line.indexOf(JSGoogEmitterTokens.FLEXJS_DEPENDENCY_LIST.getToken());
                     if (c > -1)


Mime
View raw message