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

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: Remove withCurrentElementAsync Created 7 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: tests/compiler/dart2js/analyze_helper.dart
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index a9c081df39e758ed31cfceed96514b76798719dd..3eee5f881953e5f9d49b556eecec53da2dced97a 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';
@@ -122,7 +123,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);
@@ -134,6 +135,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((_) {
ahe 2013/08/06 16:29:17 Needs dart/tests/async_helper.dart.
Johnni Winther 2013/08/27 11:05:00 Added to all callers.
+ handler.checkResults();
+ });
}

Powered by Google App Engine
This is Rietveld 408576698