| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 world.registerFieldSetter(element); | 105 world.registerFieldSetter(element); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void registerIsCheck(DartType type) { | 108 void registerIsCheck(DartType type) { |
| 109 world.registerIsCheck(type); | 109 world.registerIsCheck(type); |
| 110 backend.registerIsCheckForCodegen(type, world, this); | 110 backend.registerIsCheckForCodegen(type, world, this); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void registerCompileTimeConstant(ConstantValue constant) { | 113 void registerCompileTimeConstant(ConstantValue constant) { |
| 114 backend.registerCompileTimeConstant(constant, this); | 114 backend.registerCompileTimeConstant(constant, this); |
| 115 backend.constants.addCompileTimeConstantForEmission(constant); | |
| 116 } | 115 } |
| 117 | 116 |
| 118 void registerTypeVariableBoundsSubtypeCheck(DartType subtype, | 117 void registerTypeVariableBoundsSubtypeCheck(DartType subtype, |
| 119 DartType supertype) { | 118 DartType supertype) { |
| 120 backend.registerTypeVariableBoundsSubtypeCheck(subtype, supertype); | 119 backend.registerTypeVariableBoundsSubtypeCheck(subtype, supertype); |
| 121 } | 120 } |
| 122 | 121 |
| 123 void registerInstantiatedClosure(LocalFunctionElement element) { | 122 void registerInstantiatedClosure(LocalFunctionElement element) { |
| 124 backend.registerInstantiatedClosure(element, this); | 123 backend.registerInstantiatedClosure(element, this); |
| 125 } | 124 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 139 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { | 138 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { |
| 140 backend.registerSpecializedGetInterceptor(classes); | 139 backend.registerSpecializedGetInterceptor(classes); |
| 141 } | 140 } |
| 142 | 141 |
| 143 void registerUseInterceptor() { | 142 void registerUseInterceptor() { |
| 144 backend.registerUseInterceptor(world); | 143 backend.registerUseInterceptor(world); |
| 145 } | 144 } |
| 146 | 145 |
| 147 void registerTypeConstant(ClassElement element) { | 146 void registerTypeConstant(ClassElement element) { |
| 148 backend.customElementsAnalysis.registerTypeConstant(element, world); | 147 backend.customElementsAnalysis.registerTypeConstant(element, world); |
| 148 backend.lookupMapAnalysis.registerTypeConstant(element); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void registerStaticInvocation(Element element) { | 151 void registerStaticInvocation(Element element) { |
| 152 world.registerStaticUse(element); | 152 world.registerStaticUse(element); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void registerSuperInvocation(Element element) { | 155 void registerSuperInvocation(Element element) { |
| 156 world.registerStaticUse(element); | 156 world.registerStaticUse(element); |
| 157 } | 157 } |
| 158 | 158 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 TreeElements get resolutionTree => element.resolvedAst.elements; | 198 TreeElements get resolutionTree => element.resolvedAst.elements; |
| 199 | 199 |
| 200 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { | 200 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { |
| 201 if (world.isProcessed(element)) return const WorldImpact(); | 201 if (world.isProcessed(element)) return const WorldImpact(); |
| 202 | 202 |
| 203 registry = new CodegenRegistry(compiler, resolutionTree); | 203 registry = new CodegenRegistry(compiler, resolutionTree); |
| 204 return compiler.codegen(this, world); | 204 return compiler.codegen(this, world); |
| 205 } | 205 } |
| 206 } | 206 } |
| OLD | NEW |