| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) { |
| 67 treeElements.registerDependency(element); | 67 treeElements.registerDependency(element); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void registerInlining(Element inlinedElement, Element context) { | |
| 71 if (compiler.dumpInfo) { | |
| 72 compiler.dumpInfoTask.registerInlined(inlinedElement, context); | |
| 73 } | |
| 74 } | |
| 75 | |
| 76 void registerInstantiatedClass(ClassElement element) { | 70 void registerInstantiatedClass(ClassElement element) { |
| 77 backend.registerInstantiatedType(element.rawType, world, this); | 71 backend.registerInstantiatedType(element.rawType, world, this); |
| 78 } | 72 } |
| 79 | 73 |
| 80 void registerInstantiatedType(InterfaceType type) { | 74 void registerInstantiatedType(InterfaceType type) { |
| 81 backend.registerInstantiatedType(type, world, this); | 75 backend.registerInstantiatedType(type, world, this); |
| 82 } | 76 } |
| 83 | 77 |
| 84 void registerStaticUse(Element element) { | 78 void registerStaticUse(Element element) { |
| 85 world.registerStaticUse(element); | 79 world.registerStaticUse(element); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 198 |
| 205 TreeElements get resolutionTree => element.resolvedAst.elements; | 199 TreeElements get resolutionTree => element.resolvedAst.elements; |
| 206 | 200 |
| 207 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { | 201 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { |
| 208 if (world.isProcessed(element)) return const WorldImpact(); | 202 if (world.isProcessed(element)) return const WorldImpact(); |
| 209 | 203 |
| 210 registry = new CodegenRegistry(compiler, resolutionTree); | 204 registry = new CodegenRegistry(compiler, resolutionTree); |
| 211 return compiler.codegen(this, world); | 205 return compiler.codegen(this, world); |
| 212 } | 206 } |
| 213 } | 207 } |
| OLD | NEW |