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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java

Issue 10826047: Replace parsed and resolved maps with cache interface (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java (revision 9990)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalysisUtility.java (working copy)
@@ -16,6 +16,7 @@
import com.google.dart.compiler.CommandLineOptions.CompilerOptions;
import com.google.dart.compiler.CompilerConfiguration;
import com.google.dart.compiler.DartCompilationError;
+import com.google.dart.compiler.DartCompiler.SelectiveCache;
import com.google.dart.compiler.DartCompilerErrorCode;
import com.google.dart.compiler.DartCompilerListener;
import com.google.dart.compiler.DartSource;
@@ -108,24 +109,21 @@
/**
* Resolve the specified library and any imported libraries that have not already been resolved.
*
- * @param parsedUnits A collection of unresolved ASTs that should be used instead of parsing the
- * associated source from storage. Units are removed from this map as they are used.
+ * @param selectiveCache Provides cached parse and resolution results during selective compilation
+ * or <code>null</code> if no cache available
* @return a map of newly resolved libraries
*/
- static Map<URI, LibraryUnit> resolve(SystemLibraryManager libraryManager, File libraryFile,
- LibrarySource librarySource, Map<URI, LibraryUnit> resolvedLibs,
- Map<URI, DartUnit> parsedUnits, DartCompilerListener errorListener) {
+ static Map<URI, LibraryUnit> resolve(File libraryFile, LibrarySource librarySource,
+ SelectiveCache selectiveCache, DartCompilerListener errorListener) {
provider.clearCachedArtifacts();
Map<URI, LibraryUnit> newlyResolved = null;
try {
newlyResolved = DartCompilerUtilities.secureAnalyzeLibraries(
librarySource,
- resolvedLibs,
- parsedUnits,
+ selectiveCache,
config,
provider,
- libraryManager,
errorListener,
true);
} catch (IOException e) {

Powered by Google App Engine
This is Rietveld 408576698