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

Unified Diff: pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart

Issue 2665043003: Simplify the API for incremental_resolved_ast_generator. (Closed)
Patch Set: Created 3 years, 11 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: pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
diff --git a/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart b/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
index a9bafc0b728035c368d24cc96ea5411c2dd91285..d0b093b50ec7cdef7695f593c80f4e2756565013 100644
--- a/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
+++ b/pkg/front_end/lib/src/incremental_resolved_ast_generator_impl.dart
@@ -69,7 +69,7 @@ class IncrementalResolvedAstGeneratorImpl
await graphForProgram([_source], _options, fileReader: _fileReader);
// TODO(paulberry): collect no-longer-referenced files from _fileState and
// _fileRepository.
- var libraries = <Uri, ResolvedLibrary>{};
+ var libraries = <Uri, Map<Uri, CompilationUnit>>{};
if (!_schedulerStarted) {
_scheduler.start();
_schedulerStarted = true;
@@ -87,8 +87,7 @@ class IncrementalResolvedAstGeneratorImpl
var result =
await _driver.getResult(_fileRepository.pathForUri(libraryUri));
// TODO(paulberry): handle errors.
- var definingCompilationUnit = result.unit;
- var partUnits = <Uri, CompilationUnit>{};
+ var units = {libraryUri: result.unit};
for (var partUri in libraryNode.parts) {
// Really we ought to have a driver API that lets us request a
// specific part of a given library. Otherwise we will run into
@@ -97,10 +96,9 @@ class IncrementalResolvedAstGeneratorImpl
var partResult =
await _driver.getResult(_fileRepository.pathForUri(partUri));
// TODO(paulberry): handle errors.
- partUnits[partUri] = partResult.unit;
+ units[partUri] = partResult.unit;
}
- libraries[libraryUri] =
- new ResolvedLibrary(definingCompilationUnit, partUnits);
+ libraries[libraryUri] = units;
}
}
_driver.addFile(_fileRepository.pathForUri(_source));

Powered by Google App Engine
This is Rietveld 408576698