| 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 part of dart_backend; | 5 part of dart_backend; |
| 6 | 6 |
| 7 // TODO(ahe): This class is simply wrong. This backend should use | 7 // TODO(ahe): This class is simply wrong. This backend should use |
| 8 // elements when it can, not AST nodes. Perhaps a [Map<Element, | 8 // elements when it can, not AST nodes. Perhaps a [Map<Element, |
| 9 // TreeElements>] is what is needed. | 9 // TreeElements>] is what is needed. |
| 10 class ElementAst { | 10 class ElementAst { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (library.isPlatformLibrary) { | 223 if (library.isPlatformLibrary) { |
| 224 library.forEachLocalMember((Element element) { | 224 library.forEachLocalMember((Element element) { |
| 225 if (element.isClass) { | 225 if (element.isClass) { |
| 226 ClassElement classElement = element; | 226 ClassElement classElement = element; |
| 227 classElement.ensureResolved(compiler); | 227 classElement.ensureResolved(compiler); |
| 228 } | 228 } |
| 229 }); | 229 }); |
| 230 } | 230 } |
| 231 }); | 231 }); |
| 232 if (useMirrorHelperLibrary && | 232 if (useMirrorHelperLibrary && |
| 233 loadedLibraries.containsLibrary(Compiler.DART_MIRRORS)) { | 233 loadedLibraries.containsLibrary(Uris.dart_mirrors)) { |
| 234 return compiler.libraryLoader.loadLibrary( | 234 return compiler.libraryLoader.loadLibrary( |
| 235 compiler.translateResolvedUri( | 235 compiler.translateResolvedUri( |
| 236 loadedLibraries.getLibrary(Compiler.DART_MIRRORS), | 236 loadedLibraries.getLibrary(Uris.dart_mirrors), |
| 237 MirrorRenamerImpl.DART_MIRROR_HELPER, null)). | 237 MirrorRenamerImpl.DART_MIRROR_HELPER, null)). |
| 238 then((LibraryElement library) { | 238 then((LibraryElement library) { |
| 239 mirrorRenamer = new MirrorRenamerImpl(compiler, this, library); | 239 mirrorRenamer = new MirrorRenamerImpl(compiler, this, library); |
| 240 }); | 240 }); |
| 241 } | 241 } |
| 242 return new Future.value(); | 242 return new Future.value(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 @override | 245 @override |
| 246 void registerStaticUse(Element element, Enqueuer enqueuer) { | 246 void registerStaticUse(Element element, Enqueuer enqueuer) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 516 } |
| 517 | 517 |
| 518 // TODO(johnniwinther): Remove this when values are computed from the | 518 // TODO(johnniwinther): Remove this when values are computed from the |
| 519 // expressions. | 519 // expressions. |
| 520 @override | 520 @override |
| 521 void copyConstantValues(DartConstantTask task) { | 521 void copyConstantValues(DartConstantTask task) { |
| 522 constantCompiler.constantValueMap.addAll( | 522 constantCompiler.constantValueMap.addAll( |
| 523 task.constantCompiler.constantValueMap); | 523 task.constantCompiler.constantValueMap); |
| 524 } | 524 } |
| 525 } | 525 } |
| OLD | NEW |