Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 9963062: Resolve all new libraries when called from AnalysisServer (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/DartCompiler.java
===================================================================
--- compiler/java/com/google/dart/compiler/DartCompiler.java (revision 6094)
+++ compiler/java/com/google/dart/compiler/DartCompiler.java (working copy)
@@ -1140,7 +1140,7 @@
CompilerConfiguration config, DartArtifactProvider provider, DartCompilerListener listener)
throws IOException {
HashMap<URI, LibraryUnit> resolvedLibs = new HashMap<URI, LibraryUnit>();
- return analyzeLibraries(lib, resolvedLibs, parsedUnits, config, provider, listener).get(lib.getUri());
+ return analyzeLibraries(lib, resolvedLibs, parsedUnits, config, provider, listener, false).get(lib.getUri());
}
/**
@@ -1158,14 +1158,16 @@
* invoked
* @param provider A mechanism for specifying where code should be generated
* @param listener An object notified when compilation errors occur
+ * @param resolveAllNewLibs <code>true</code> if all new libraries should be resolved
+ * or false if only the library specified by the "lib" parameter should be resolved
* @throws NullPointerException if any of the arguments except {@code parsedUnits}
* are {@code null}
* @throws IOException on IO errors, which are not logged
*/
public static Map<URI, LibraryUnit> analyzeLibraries(LibrarySource lib,
Map<URI, LibraryUnit> resolvedLibs, Map<URI, DartUnit> parsedUnits,
- CompilerConfiguration config, DartArtifactProvider provider, DartCompilerListener listener)
- throws IOException {
+ CompilerConfiguration config, DartArtifactProvider provider, DartCompilerListener listener,
+ boolean resolveAllNewLibs) throws IOException {
lib.getClass(); // Quick null check.
provider.getClass(); // Quick null check.
listener.getClass(); // Quick null check.
@@ -1177,9 +1179,10 @@
Map<URI, LibraryUnit> librariesToResolve;
librariesToResolve = new HashMap<URI, LibraryUnit>();
+ if (resolveAllNewLibs) {
+ librariesToResolve.putAll(compiler.getLibraries());
+ }
librariesToResolve.put(topLibUnit.getSource().getUri(), topLibUnit);
- // TODO (danrubel) revisit when AnalysisServer is turned on
- // librariesToResolve.putAll(compiler.getLibraries());
DartCompilationPhase[] phases = {new Resolver.Phase(), new TypeAnalyzer()};
Map<URI, LibraryUnit> newLibraries = Maps.newHashMap();
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698