| 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 '../compiler.dart' show | 7 import '../compiler.dart' show |
| 8 Compiler; | 8 Compiler; |
| 9 import '../constants/values.dart' show | 9 import '../constants/values.dart' show |
| 10 ConstantValue; | 10 ConstantValue; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 Element get currentElement => treeElements.analyzedElement; | 51 Element get currentElement => treeElements.analyzedElement; |
| 52 | 52 |
| 53 // TODO(johnniwinther): Remove this getter when [Registry] creates a | 53 // TODO(johnniwinther): Remove this getter when [Registry] creates a |
| 54 // dependency node. | 54 // dependency node. |
| 55 Setlet<Element> get otherDependencies => treeElements.otherDependencies; | 55 Setlet<Element> get otherDependencies => treeElements.otherDependencies; |
| 56 | 56 |
| 57 CodegenEnqueuer get world => compiler.enqueuer.codegen; | 57 CodegenEnqueuer get world => compiler.enqueuer.codegen; |
| 58 JavaScriptBackend get backend => compiler.backend; | 58 JavaScriptBackend get backend => compiler.backend; |
| 59 | 59 |
| 60 void registerAssert(bool hasMessage) { | |
| 61 // Codegen does not register asserts. They have been lowered to calls. | |
| 62 assert(false); | |
| 63 } | |
| 64 | |
| 65 void registerDependency(Element element) { | 60 void registerDependency(Element element) { |
| 66 treeElements.registerDependency(element); | 61 treeElements.registerDependency(element); |
| 67 } | 62 } |
| 68 | 63 |
| 69 void registerInlining(Element inlinedElement, Element context) { | 64 void registerInlining(Element inlinedElement, Element context) { |
| 70 if (compiler.dumpInfo) { | 65 if (compiler.dumpInfo) { |
| 71 compiler.dumpInfoTask.registerInlined(inlinedElement, context); | 66 compiler.dumpInfoTask.registerInlined(inlinedElement, context); |
| 72 } | 67 } |
| 73 } | 68 } |
| 74 | 69 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 198 |
| 204 TreeElements get resolutionTree => element.resolvedAst.elements; | 199 TreeElements get resolutionTree => element.resolvedAst.elements; |
| 205 | 200 |
| 206 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { | 201 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { |
| 207 if (world.isProcessed(element)) return const WorldImpact(); | 202 if (world.isProcessed(element)) return const WorldImpact(); |
| 208 | 203 |
| 209 registry = new CodegenRegistry(compiler, resolutionTree); | 204 registry = new CodegenRegistry(compiler, resolutionTree); |
| 210 return compiler.codegen(this, world); | 205 return compiler.codegen(this, world); |
| 211 } | 206 } |
| 212 } | 207 } |
| OLD | NEW |