OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.lazy_emitter; | 5 library dart2js.js_emitter.lazy_emitter; |
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 '../../compiler.dart' show Compiler; | 10 import '../../compiler.dart' show Compiler; |
11 import '../../constants/values.dart' show ConstantValue; | 11 import '../../constants/values.dart' show ConstantValue; |
12 import '../../deferred_load.dart' show OutputUnit; | 12 import '../../deferred_load.dart' show OutputUnit; |
13 import '../../elements/elements.dart' | 13 import '../../elements/elements.dart' |
14 show ClassElement, FieldElement, MethodElement; | 14 show ClassElement, FieldElement, MethodElement; |
15 import '../../elements/entities.dart'; | 15 import '../../elements/entities.dart'; |
16 import '../../js/js.dart' as js; | 16 import '../../js/js.dart' as js; |
17 import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer; | 17 import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer; |
18 import '../../world.dart' show ClosedWorld; | 18 import '../../world.dart' show ClosedWorld; |
19 import '../js_emitter.dart' show CodeEmitterTask, NativeEmitter; | 19 import '../js_emitter.dart' show CodeEmitterTask, NativeEmitter; |
20 import '../js_emitter.dart' as emitterTask show EmitterBase, EmitterFactory; | 20 import '../js_emitter.dart' as emitterTask show EmitterBase, EmitterFactory; |
21 import '../model.dart'; | 21 import '../model.dart'; |
22 import '../program_builder/program_builder.dart' show ProgramBuilder; | 22 import '../program_builder/program_builder.dart' show ProgramBuilder; |
| 23 import '../sorter.dart' show Sorter; |
23 import 'model_emitter.dart'; | 24 import 'model_emitter.dart'; |
24 | 25 |
25 class EmitterFactory implements emitterTask.EmitterFactory { | 26 class EmitterFactory implements emitterTask.EmitterFactory { |
26 @override | 27 @override |
27 bool get supportsReflection => false; | 28 bool get supportsReflection => false; |
28 | 29 |
29 @override | 30 @override |
30 Emitter createEmitter( | 31 Emitter createEmitter(CodeEmitterTask task, Namer namer, |
31 CodeEmitterTask task, Namer namer, ClosedWorld closedWorld) { | 32 ClosedWorld closedWorld, Sorter sorter) { |
32 return new Emitter( | 33 return new Emitter( |
33 task.compiler, namer, task.nativeEmitter, closedWorld, task); | 34 task.compiler, namer, task.nativeEmitter, closedWorld, task); |
34 } | 35 } |
35 } | 36 } |
36 | 37 |
37 class Emitter extends emitterTask.EmitterBase { | 38 class Emitter extends emitterTask.EmitterBase { |
38 final Compiler _compiler; | 39 final Compiler _compiler; |
39 final ClosedWorld _closedWorld; | 40 final ClosedWorld _closedWorld; |
40 final Namer namer; | 41 final Namer namer; |
41 final ModelEmitter _emitter; | 42 final ModelEmitter _emitter; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 reporter.internalError( | 166 reporter.internalError( |
166 NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin"); | 167 NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin"); |
167 return null; | 168 return null; |
168 } | 169 } |
169 } | 170 } |
170 | 171 |
171 @override | 172 @override |
172 // TODO(het): Generate this correctly | 173 // TODO(het): Generate this correctly |
173 int generatedSize(OutputUnit unit) => 0; | 174 int generatedSize(OutputUnit unit) => 0; |
174 } | 175 } |
OLD | NEW |