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

Side by Side Diff: pkg/compiler/lib/src/library_loader.dart

Issue 1254453002: Remove (for the time being) async-await from dart2js. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.library_loader; 5 library dart2js.library_loader;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'dart2jslib.dart' show 9 import 'dart2jslib.dart' show
10 Compiler, 10 Compiler,
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 }); 523 });
524 }); 524 });
525 } 525 }
526 526
527 /// Loads the deserialized [library] with the [handler]. 527 /// Loads the deserialized [library] with the [handler].
528 /// 528 ///
529 /// All libraries imported or exported transitively from [library] will be 529 /// All libraries imported or exported transitively from [library] will be
530 /// loaded as well. 530 /// loaded as well.
531 Future<LibraryElement> loadDeserializedLibrary( 531 Future<LibraryElement> loadDeserializedLibrary(
532 LibraryDependencyHandler handler, 532 LibraryDependencyHandler handler,
533 LibraryElement library) async { 533 LibraryElement library) async {
Siggi Cherem (dart-lang) 2015/07/23 00:03:06 might be good to remove `async` as well to avoid c
534 compiler.onLibraryCreated(library); 534 compiler.onLibraryCreated(library);
535 libraryCanonicalUriMap[library.canonicalUri] = library; 535 libraryCanonicalUriMap[library.canonicalUri] = library;
536 await compiler.onLibraryScanned(library, handler); 536 return compiler.onLibraryScanned(library, handler).then((_) {
537 for (LibraryTag tag in library.tags) { 537 return future.forEach(library.tags, (LibraryTag tag) {
538 LibraryElement dependency = library.getLibraryFromTag(tag); 538 LibraryElement dependency = library.getLibraryFromTag(tag);
539 await createLibrary(handler, library, dependency.canonicalUri); 539 return createLibrary(handler, library, dependency.canonicalUri);
540 } 540 }).then((_) => library);
541 return library; 541 });
542 } 542 }
543 543
544 /** 544 /**
545 * Create (or reuse) a library element for the library specified by the 545 * Create (or reuse) a library element for the library specified by the
546 * [resolvedUri]. 546 * [resolvedUri].
547 * 547 *
548 * If a new library is created, the [handler] is notified. 548 * If a new library is created, the [handler] is notified.
549 */ 549 */
550 Future<LibraryElement> createLibrary(LibraryDependencyHandler handler, 550 Future<LibraryElement> createLibrary(LibraryDependencyHandler handler,
551 LibraryElement importingLibrary, 551 LibraryElement importingLibrary,
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 } 1216 }
1217 suffixes.add(const Link<Uri>().prepend(canonicalUri)); 1217 suffixes.add(const Link<Uri>().prepend(canonicalUri));
1218 } 1218 }
1219 suffixChainMap[library] = suffixes; 1219 suffixChainMap[library] = suffixes;
1220 return; 1220 return;
1221 } 1221 }
1222 1222
1223 computeSuffixes(rootLibrary, const Link<Uri>()); 1223 computeSuffixes(rootLibrary, const Link<Uri>());
1224 } 1224 }
1225 } 1225 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698