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

Unified Diff: pkg/front_end/tool/fasta_perf.dart

Issue 2986303003: Switch FE to use the libraries.json format. (Closed)
Patch Set: fix issues found on bots Created 3 years, 4 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 | « pkg/front_end/test/subpackage_relationships_test.dart ('k') | tools/patch_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/tool/fasta_perf.dart
diff --git a/pkg/front_end/tool/fasta_perf.dart b/pkg/front_end/tool/fasta_perf.dart
index d8d4147c081260844cff1e7971d473e0f80c36bf..c083aaf3820c6115ed2a4b9047d6583e10333154 100644
--- a/pkg/front_end/tool/fasta_perf.dart
+++ b/pkg/front_end/tool/fasta_perf.dart
@@ -10,7 +10,7 @@ import 'dart:io';
import 'package:analyzer/src/fasta/ast_builder.dart';
import 'package:front_end/front_end.dart';
-import 'package:front_end/physical_file_system.dart';
+import 'package:front_end/src/base/processed_options.dart';
import 'package:front_end/src/fasta/parser.dart';
import 'package:front_end/src/fasta/scanner.dart';
import 'package:front_end/src/fasta/scanner/io.dart' show readBytesFromFileSync;
@@ -18,7 +18,6 @@ import 'package:front_end/src/fasta/source/directive_listener.dart';
import 'package:front_end/src/fasta/uri_translator.dart' show UriTranslator;
import 'package:front_end/src/fasta/parser/native_support.dart'
show skipNativeClause;
-import 'package:front_end/src/fasta/uri_translator_impl.dart';
/// Cumulative total number of chars scanned.
int inputSize = 0;
@@ -80,8 +79,11 @@ UriTranslator uriResolver;
/// Preliminary set up to be able to correctly resolve URIs on the given
/// program.
Future setup(Uri entryUri) async {
- uriResolver =
- await UriTranslatorImpl.parse(PhysicalFileSystem.instance, sdkRoot);
+ var options = new CompilerOptions()
+ ..sdkRoot = sdkRoot
+ ..compileSdk = true
+ ..packagesFileUri = Uri.base.resolve('.packages');
+ uriResolver = await new ProcessedOptions(options).getUriTranslator();
}
/// Scan [contents] and return the first token produced by the scanner.
« no previous file with comments | « pkg/front_end/test/subpackage_relationships_test.dart ('k') | tools/patch_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698