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

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

Issue 2832353002: Add support for building patched_sdk and platform.dill for dart2js: (Closed)
Patch Set: fix .gn circularity by removing use of rebase_path Created 3 years, 8 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/tool/_fasta/generate_dart_libraries.dart ('k') | runtime/vm/BUILD.gn » ('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 5a2d6e04e00ab2c2f9d113373964c9f1ed50c1ad..1b1d4c75ab89e2f255c9db0ffaaf90e76e1ae71f 100644
--- a/pkg/front_end/tool/fasta_perf.dart
+++ b/pkg/front_end/tool/fasta_perf.dart
@@ -13,12 +13,14 @@ import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
import 'package:front_end/src/fasta/kernel/kernel_target.dart'
show KernelTarget;
import 'package:front_end/src/fasta/parser.dart';
-import 'package:front_end/src/fasta/source/directive_listener.dart';
import 'package:front_end/src/fasta/scanner.dart';
import 'package:front_end/src/fasta/scanner/io.dart' show readBytesFromFileSync;
+import 'package:front_end/src/fasta/source/directive_listener.dart';
import 'package:front_end/src/fasta/ticker.dart' show Ticker;
import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri;
import 'package:front_end/src/fasta/translate_uri.dart';
+import 'package:front_end/src/fasta/parser/dart_vm_native.dart'
+ show skipNativeClause;
/// Cumulative total number of chars scanned.
int inputSize = 0;
@@ -157,7 +159,7 @@ Future<Null> collectSources(Uri start, Map<Uri, List<int>> files) async {
/// Parse [contents] as a Dart program and return the URIs that appear in its
/// import, export, and part directives.
Set<String> extractDirectiveUris(List<int> contents) {
- var listener = new DirectiveListener(acceptsNativeClause: true);
+ var listener = new DirectiveListenerWithNative();
new TopLevelParser(listener).parseUnit(tokenize(contents));
return new Set<String>()
..addAll(listener.imports)
@@ -165,6 +167,11 @@ Set<String> extractDirectiveUris(List<int> contents) {
..addAll(listener.parts);
}
+class DirectiveListenerWithNative extends DirectiveListener {
+ @override
+ Token handleNativeClause(Token token) => skipNativeClause(token);
+}
+
/// Parses every file in [files] and reports the time spent doing so.
void parseFiles(Map<Uri, List<int>> files) {
scanTimer = new Stopwatch();
« no previous file with comments | « pkg/front_end/tool/_fasta/generate_dart_libraries.dart ('k') | runtime/vm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698