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

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

Issue 2110323003: Support serialization of loadLibrary (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 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
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.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show EventSink, Future; 7 import 'dart:async' show EventSink, Future;
8 8
9 import '../compiler_new.dart' as api; 9 import '../compiler_new.dart' as api;
10 import 'cache_strategy.dart' show CacheStrategy; 10 import 'cache_strategy.dart' show CacheStrategy;
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 backend.sourceInformationStrategy.onComplete(); 913 backend.sourceInformationStrategy.onComplete();
914 914
915 checkQueues(); 915 checkQueues();
916 }); 916 });
917 917
918 void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) { 918 void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) {
919 void enqueueAll(Element element) { 919 void enqueueAll(Element element) {
920 fullyEnqueueTopLevelElement(element, world); 920 fullyEnqueueTopLevelElement(element, world);
921 } 921 }
922 library.implementation.forEachLocalMember(enqueueAll); 922 library.implementation.forEachLocalMember(enqueueAll);
923 library.imports.forEach((ImportElement import) {
924 if (import.isDeferred) {
925 world.addToWorkList(import.prefix.loadLibrary);
926 }
927 });
923 } 928 }
924 929
925 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { 930 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) {
926 if (element.isClass) { 931 if (element.isClass) {
927 ClassElement cls = element; 932 ClassElement cls = element;
928 cls.ensureResolved(resolution); 933 cls.ensureResolved(resolution);
929 cls.forEachLocalMember(enqueuer.resolution.addToWorkList); 934 cls.forEachLocalMember(enqueuer.resolution.addToWorkList);
930 backend.registerInstantiatedType(cls.rawType, world, globalDependencies); 935 backend.registerInstantiatedType(cls.rawType, world, globalDependencies);
931 } else { 936 } else {
932 world.addToWorkList(element); 937 world.addToWorkList(element);
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 _ElementScanner(this.scanner); 2118 _ElementScanner(this.scanner);
2114 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2119 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2115 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2120 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2116 } 2121 }
2117 2122
2118 class _EmptyEnvironment implements Environment { 2123 class _EmptyEnvironment implements Environment {
2119 const _EmptyEnvironment(); 2124 const _EmptyEnvironment();
2120 2125
2121 String valueOf(String key) => null; 2126 String valueOf(String key) => null;
2122 } 2127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698