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

Unified Diff: tests/compiler/dart2js/analyze_helper.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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: tests/compiler/dart2js/analyze_helper.dart
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index c3e6729506de0ff985e053ae43b906bc7decc633..41a70ea14a46b07443abc153c723907628ec3998 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -5,6 +5,7 @@
library analyze_helper;
import "package:expect/expect.dart";
+import 'dart:async';
import 'dart:io';
import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart';
@@ -113,7 +114,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
}
}
-void analyze(List<Uri> uriList, Map<String, List<String>> whiteList) {
+Future analyze(List<Uri> uriList, Map<String, List<String>> whiteList) {
var libraryRoot = currentDirectory.resolve('sdk/');
var provider = new SourceFileProvider();
var handler = new CollectingDiagnosticHandler(whiteList, provider);
@@ -125,6 +126,7 @@ void analyze(List<Uri> uriList, Map<String, List<String>> whiteList) {
<String>['--analyze-only', '--analyze-all',
'--categories=Client,Server']);
compiler.librariesToAnalyzeWhenRun = uriList;
- compiler.run(null);
- handler.checkResults();
+ return compiler.run(null).then((_) {
+ handler.checkResults();
+ });
}

Powered by Google App Engine
This is Rietveld 408576698