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

Unified Diff: pkg/front_end/lib/src/base/processed_options.dart

Issue 2977703002: Refactorings for TranslateUri and its tests. (Closed)
Patch Set: Revert including TODO into documentation comment. Created 3 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: pkg/front_end/lib/src/base/processed_options.dart
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index d525d15ed294e48cb269033c4a57ef3ae2fa9fc4..c37a9f495d8d2ccfaf1bf6076ee36c48a752738c 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -221,17 +221,17 @@ class ProcessedOptions {
await _getPackages();
// TODO(scheglov) Load SDK libraries from whatever format we decide.
// TODO(scheglov) Remove the field "_raw.dartLibraries".
- var libraries = _raw.dartLibraries ?? await _parseLibraries();
+ var libraries = _raw.dartLibraries ?? await _parseDartLibraries();
_uriTranslator =
- new TranslateUri(_packages, libraries, const <String, List<Uri>>{});
+ new TranslateUri(libraries, const <String, List<Uri>>{}, _packages);
ticker.logMs("Read packages file");
}
return _uriTranslator;
}
- Future<Map<String, Uri>> _parseLibraries() async {
+ Future<Map<String, Uri>> _parseDartLibraries() async {
Uri librariesJson = _raw.sdkRoot?.resolve("lib/libraries.json");
- return await computeLibraries(fileSystem, librariesJson);
+ return await computeDartLibraries(fileSystem, librariesJson);
}
/// Get the package map which maps package names to URIs.
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/target_implementation.dart » ('j') | pkg/front_end/lib/src/fasta/translate_uri.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698