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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); |
183 typeTestRegistry = new TypeTestRegistry(codegenWorldBuilder, closedWorld); | 183 typeTestRegistry = new TypeTestRegistry( |
| 184 codegenWorldBuilder, closedWorld, compiler.elementEnvironment); |
184 }); | 185 }); |
185 } | 186 } |
186 | 187 |
187 int assembleProgram(Namer namer, ClosedWorld closedWorld) { | 188 int assembleProgram(Namer namer, ClosedWorld closedWorld) { |
188 return measure(() { | 189 return measure(() { |
189 _finalizeRti(); | 190 _finalizeRti(); |
190 ProgramBuilder programBuilder = new ProgramBuilder( | 191 ProgramBuilder programBuilder = new ProgramBuilder( |
191 compiler.options, | 192 compiler.options, |
192 compiler.reporter, | 193 compiler.reporter, |
193 compiler.elementEnvironment, | 194 compiler.elementEnvironment, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 279 |
279 /// Returns the JS code for accessing the given [constant]. | 280 /// Returns the JS code for accessing the given [constant]. |
280 jsAst.Expression constantReference(ConstantValue constant); | 281 jsAst.Expression constantReference(ConstantValue constant); |
281 | 282 |
282 /// Returns the JS template for the given [builtin]. | 283 /// Returns the JS template for the given [builtin]. |
283 jsAst.Template templateForBuiltin(JsBuiltin builtin); | 284 jsAst.Template templateForBuiltin(JsBuiltin builtin); |
284 | 285 |
285 /// Returns the size of the code generated for a given output [unit]. | 286 /// Returns the size of the code generated for a given output [unit]. |
286 int generatedSize(OutputUnit unit); | 287 int generatedSize(OutputUnit unit); |
287 } | 288 } |
OLD | NEW |