| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |