| 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.js_emitter.code_emitter_task; | 5 library dart2js.js_emitter.code_emitter_task; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin; | 7 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/tasks.dart' show CompilerTask; | 10 import '../common/tasks.dart' show CompilerTask; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 typeTestRegistry.computeRequiredTypeChecks(backend.rtiChecksBuilder); | 161 typeTestRegistry.computeRequiredTypeChecks(backend.rtiChecksBuilder); |
| 162 // Compute the classes needed by RTI. | 162 // Compute the classes needed by RTI. |
| 163 typeTestRegistry.computeRtiNeededClasses(backend.rtiSubstitutions, | 163 typeTestRegistry.computeRtiNeededClasses(backend.rtiSubstitutions, |
| 164 backend.mirrorsData, backend.generatedCode.keys); | 164 backend.mirrorsData, backend.generatedCode.keys); |
| 165 } | 165 } |
| 166 | 166 |
| 167 /// Creates the [Emitter] for this task. | 167 /// Creates the [Emitter] for this task. |
| 168 void createEmitter(Namer namer, ClosedWorld closedWorld, | 168 void createEmitter(Namer namer, ClosedWorld closedWorld, |
| 169 CodegenWorldBuilder codegenWorldBuilder) { | 169 CodegenWorldBuilder codegenWorldBuilder) { |
| 170 measure(() { | 170 measure(() { |
| 171 _nativeEmitter = new NativeEmitter( | 171 _nativeEmitter = new NativeEmitter(this, closedWorld, codegenWorldBuilder, |
| 172 this, closedWorld.nativeData, closedWorld.interceptorData); | 172 backend.nativeCodegenEnqueuer); |
| 173 _emitter = _emitterFactory.createEmitter(this, namer, closedWorld); | 173 _emitter = _emitterFactory.createEmitter(this, namer, closedWorld); |
| 174 metadataCollector = new MetadataCollector( | 174 metadataCollector = new MetadataCollector( |
| 175 compiler.options, | 175 compiler.options, |
| 176 compiler.reporter, | 176 compiler.reporter, |
| 177 compiler.deferredLoadTask, | 177 compiler.deferredLoadTask, |
| 178 _emitter, | 178 _emitter, |
| 179 backend.constants, | 179 backend.constants, |
| 180 backend.typeVariableCodegenAnalysis, | 180 backend.typeVariableCodegenAnalysis, |
| 181 backend.mirrorsData, | 181 backend.mirrorsData, |
| 182 backend.rtiEncoder); | 182 backend.rtiEncoder); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 /// Returns the JS code for accessing the given [constant]. | 278 /// Returns the JS code for accessing the given [constant]. |
| 279 jsAst.Expression constantReference(ConstantValue constant); | 279 jsAst.Expression constantReference(ConstantValue constant); |
| 280 | 280 |
| 281 /// Returns the JS template for the given [builtin]. | 281 /// Returns the JS template for the given [builtin]. |
| 282 jsAst.Template templateForBuiltin(JsBuiltin builtin); | 282 jsAst.Template templateForBuiltin(JsBuiltin builtin); |
| 283 | 283 |
| 284 /// Returns the size of the code generated for a given output [unit]. | 284 /// Returns the size of the code generated for a given output [unit]. |
| 285 int generatedSize(OutputUnit unit); | 285 int generatedSize(OutputUnit unit); |
| 286 } | 286 } |
| OLD | NEW |