| 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.common.codegen; | 5 library dart2js.common.codegen; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../compiler.dart' show | 8 import '../compiler.dart' show |
| 9 Compiler; | 9 Compiler; |
| 10 import '../constants/values.dart' show | 10 import '../constants/values.dart' show |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 CodegenRegistry(this.compiler, this.treeElements); | 46 CodegenRegistry(this.compiler, this.treeElements); |
| 47 | 47 |
| 48 bool get isForResolution => false; | 48 bool get isForResolution => false; |
| 49 | 49 |
| 50 Element get currentElement => treeElements.analyzedElement; | 50 Element get currentElement => treeElements.analyzedElement; |
| 51 | 51 |
| 52 String toString() => 'CodegenRegistry for $currentElement'; | 52 String toString() => 'CodegenRegistry for $currentElement'; |
| 53 | 53 |
| 54 // TODO(johnniwinther): Remove this getter when [Registry] creates a | 54 // TODO(johnniwinther): Remove this getter when [Registry] creates a |
| 55 // dependency node. | 55 // dependency node. |
| 56 Setlet<Element> get otherDependencies => treeElements.otherDependencies; | 56 Iterable<Element> get otherDependencies => treeElements.otherDependencies; |
| 57 | 57 |
| 58 CodegenEnqueuer get world => compiler.enqueuer.codegen; | 58 CodegenEnqueuer get world => compiler.enqueuer.codegen; |
| 59 JavaScriptBackend get backend => compiler.backend; | 59 JavaScriptBackend get backend => compiler.backend; |
| 60 | 60 |
| 61 void registerAssert(bool hasMessage) { | 61 void registerAssert(bool hasMessage) { |
| 62 // Codegen does not register asserts. They have been lowered to calls. | 62 // Codegen does not register asserts. They have been lowered to calls. |
| 63 assert(false); | 63 assert(false); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void registerDependency(Element element) { | 66 void registerDependency(Element element) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 TreeElements get resolutionTree => element.resolvedAst.elements; | 205 TreeElements get resolutionTree => element.resolvedAst.elements; |
| 206 | 206 |
| 207 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { | 207 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { |
| 208 if (world.isProcessed(element)) return const WorldImpact(); | 208 if (world.isProcessed(element)) return const WorldImpact(); |
| 209 | 209 |
| 210 registry = new CodegenRegistry(compiler, resolutionTree); | 210 registry = new CodegenRegistry(compiler, resolutionTree); |
| 211 return compiler.codegen(this, world); | 211 return compiler.codegen(this, world); |
| 212 } | 212 } |
| 213 } | 213 } |
| OLD | NEW |