| 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 library.implementation.forEachLocalMember(enqueueAll); | 897 library.implementation.forEachLocalMember(enqueueAll); |
| 898 library.imports.forEach((ImportElement import) { | 898 library.imports.forEach((ImportElement import) { |
| 899 if (import.isDeferred) { | 899 if (import.isDeferred) { |
| 900 // `import.prefix` and `loadLibrary` may be `null` when the deferred | 900 // `import.prefix` and `loadLibrary` may be `null` when the deferred |
| 901 // import has compile-time errors. | 901 // import has compile-time errors. |
| 902 GetterElement loadLibrary = import.prefix?.loadLibrary; | 902 GetterElement loadLibrary = import.prefix?.loadLibrary; |
| 903 if (loadLibrary != null) { | 903 if (loadLibrary != null) { |
| 904 world.addToWorkList(loadLibrary); | 904 world.addToWorkList(loadLibrary); |
| 905 } | 905 } |
| 906 } | 906 } |
| 907 if (serialization.supportSerialization) { |
| 908 for (MetadataAnnotation metadata in import.metadata) { |
| 909 metadata.ensureResolved(resolution); |
| 910 } |
| 911 } |
| 907 }); | 912 }); |
| 913 if (serialization.supportSerialization) { |
| 914 library.exports.forEach((ExportElement export) { |
| 915 for (MetadataAnnotation metadata in export.metadata) { |
| 916 metadata.ensureResolved(resolution); |
| 917 } |
| 918 }); |
| 919 } |
| 908 } | 920 } |
| 909 | 921 |
| 910 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { | 922 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { |
| 911 if (element.isClass) { | 923 if (element.isClass) { |
| 912 ClassElement cls = element; | 924 ClassElement cls = element; |
| 913 cls.ensureResolved(resolution); | 925 cls.ensureResolved(resolution); |
| 914 cls.forEachLocalMember(enqueuer.resolution.addToWorkList); | 926 cls.forEachLocalMember(enqueuer.resolution.addToWorkList); |
| 915 backend.registerInstantiatedType(cls.rawType, world, globalDependencies); | 927 backend.registerInstantiatedType(cls.rawType, world, globalDependencies); |
| 916 } else { | 928 } else { |
| 917 world.addToWorkList(element); | 929 world.addToWorkList(element); |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2176 _ElementScanner(this.scanner); | 2188 _ElementScanner(this.scanner); |
| 2177 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2189 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
| 2178 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2190 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
| 2179 } | 2191 } |
| 2180 | 2192 |
| 2181 class _EmptyEnvironment implements Environment { | 2193 class _EmptyEnvironment implements Environment { |
| 2182 const _EmptyEnvironment(); | 2194 const _EmptyEnvironment(); |
| 2183 | 2195 |
| 2184 String valueOf(String key) => null; | 2196 String valueOf(String key) => null; |
| 2185 } | 2197 } |
| OLD | NEW |