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

Unified Diff: sdk/lib/_internal/compiler/samples/leap/leap_leg.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: Updated cf. comments Created 7 years, 3 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: sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
diff --git a/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart b/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
index 137c236e0a00e251dc7c79cdde190380c0e05810..87ba938aa883cb790c2c5b237b87920d05d4d55f 100644
--- a/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
+++ b/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
@@ -125,6 +125,8 @@ class Runner {
String init() {
Stopwatch sw = new Stopwatch()..start();
+ // TODO(rnystrom): This is broken now that scanBuiltInLibraries is async.
+ // Delete this sample.
compiler.scanBuiltinLibraries();
sw.stop();
return 'Scanned core libraries in ${sw.elapsedMilliseconds}ms';
@@ -221,10 +223,14 @@ class LeapCompiler extends Compiler {
String get legDirectory => libDir;
+ // TODO(rnystrom): This is broken now that scanBuiltInLibraries is async.
+ // Delete this sample.
LibraryElement scanBuiltinLibrary(String path) {
Uri base = Uri.parse(html.window.location.toString());
Uri libraryRoot = base.resolve(libDir);
Uri resolved = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]);
+ // TODO(rnystrom): This is broken now that scanBuiltInLibraries is async.
+ // Delete this sample.
LibraryElement library = scanner.loadLibrary(resolved, null);
return library;
}
@@ -237,6 +243,8 @@ class LeapCompiler extends Compiler {
return compilationUnit.script;
}
+ // TODO(rnystrom): This is broken now that scanBuiltInLibraries is async.
+ // Delete this sample.
Script readScript(Uri uri, [ScriptTag node]) {
String text = "";
try {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/util/util.dart ('k') | tests/compiler/dart2js/analyze_all_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698