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; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 Emitter(this._compiler, this.namer, NativeEmitter nativeEmitter, | 45 Emitter(this._compiler, this.namer, NativeEmitter nativeEmitter, |
46 this._closedWorld, CodeEmitterTask task) | 46 this._closedWorld, CodeEmitterTask task) |
47 : _emitter = new ModelEmitter( | 47 : _emitter = new ModelEmitter( |
48 _compiler, namer, nativeEmitter, _closedWorld, task); | 48 _compiler, namer, nativeEmitter, _closedWorld, task); |
49 | 49 |
50 DiagnosticReporter get reporter => _compiler.reporter; | 50 DiagnosticReporter get reporter => _compiler.reporter; |
51 | 51 |
52 @override | 52 @override |
53 int emitProgram(ProgramBuilder programBuilder) { | 53 int emitProgram(ProgramBuilder programBuilder) { |
54 Program program = programBuilder.buildProgram(); | 54 Program program = programForTesting = programBuilder.buildProgram(); |
55 return _emitter.emitProgram(program); | 55 return _emitter.emitProgram(program); |
56 } | 56 } |
57 | 57 |
58 // TODO(floitsch): copied from full emitter. Adjust or share. | 58 // TODO(floitsch): copied from full emitter. Adjust or share. |
59 @override | 59 @override |
60 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) { | 60 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) { |
61 return _emitter.isConstantInlinedOrAlreadyEmitted(constant); | 61 return _emitter.isConstantInlinedOrAlreadyEmitted(constant); |
62 } | 62 } |
63 | 63 |
64 // TODO(floitsch): copied from full emitter. Adjust or share. | 64 // TODO(floitsch): copied from full emitter. Adjust or share. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 reporter.internalError( | 165 reporter.internalError( |
166 NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin"); | 166 NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin"); |
167 return null; | 167 return null; |
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 @override | 171 @override |
172 // TODO(het): Generate this correctly | 172 // TODO(het): Generate this correctly |
173 int generatedSize(OutputUnit unit) => 0; | 173 int generatedSize(OutputUnit unit) => 0; |
174 } | 174 } |
OLD | NEW |