Chromium Code Reviews| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 906 } | 906 } |
| 907 for (MetadataAnnotation metadata in import.metadata) { | 907 for (MetadataAnnotation metadata in import.metadata) { |
| 908 metadata.ensureResolved(resolution); | 908 metadata.ensureResolved(resolution); |
| 909 } | 909 } |
| 910 }); | 910 }); |
| 911 library.exports.forEach((ExportElement export) { | 911 library.exports.forEach((ExportElement export) { |
| 912 for (MetadataAnnotation metadata in export.metadata) { | 912 for (MetadataAnnotation metadata in export.metadata) { |
| 913 metadata.ensureResolved(resolution); | 913 metadata.ensureResolved(resolution); |
| 914 } | 914 } |
| 915 }); | 915 }); |
| 916 library.compilationUnits.forEach((CompilationUnitElement unit) { | |
|
Siggi Cherem (dart-lang)
2016/08/18 15:30:58
same here - guard to only do this when serializati
Johnni Winther
2016/08/19 08:57:17
Done.
| |
| 917 for (MetadataAnnotation metadata in unit.metadata) { | |
| 918 metadata.ensureResolved(resolution); | |
| 919 } | |
| 920 }); | |
| 916 } | 921 } |
| 917 | 922 |
| 918 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { | 923 void fullyEnqueueTopLevelElement(Element element, Enqueuer world) { |
| 919 if (element.isClass) { | 924 if (element.isClass) { |
| 920 ClassElement cls = element; | 925 ClassElement cls = element; |
| 921 cls.ensureResolved(resolution); | 926 cls.ensureResolved(resolution); |
| 922 cls.forEachLocalMember(enqueuer.resolution.addToWorkList); | 927 cls.forEachLocalMember(enqueuer.resolution.addToWorkList); |
| 923 backend.registerInstantiatedType(cls.rawType, world, globalDependencies); | 928 backend.registerInstantiatedType(cls.rawType, world, globalDependencies); |
| 924 } else { | 929 } else { |
| 925 world.addToWorkList(element); | 930 world.addToWorkList(element); |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2184 _ElementScanner(this.scanner); | 2189 _ElementScanner(this.scanner); |
| 2185 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2190 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
| 2186 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2191 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
| 2187 } | 2192 } |
| 2188 | 2193 |
| 2189 class _EmptyEnvironment implements Environment { | 2194 class _EmptyEnvironment implements Environment { |
| 2190 const _EmptyEnvironment(); | 2195 const _EmptyEnvironment(); |
| 2191 | 2196 |
| 2192 String valueOf(String key) => null; | 2197 String valueOf(String key) => null; |
| 2193 } | 2198 } |
| OLD | NEW |