| 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.new_js_emitter.emitter; | 5 library dart2js.new_js_emitter.emitter; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart' show | 7 import 'package:js_runtime/shared/embedded_names.dart' show |
| 8 JsBuiltin, | 8 JsBuiltin, |
| 9 METADATA, | 9 METADATA, |
| 10 TYPES; | 10 TYPES; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 : this._compiler = compiler, | 40 : this._compiler = compiler, |
| 41 this.namer = namer, | 41 this.namer = namer, |
| 42 _emitter = new ModelEmitter(compiler, namer, nativeEmitter); | 42 _emitter = new ModelEmitter(compiler, namer, nativeEmitter); |
| 43 | 43 |
| 44 @override | 44 @override |
| 45 int emitProgram(ProgramBuilder programBuilder) { | 45 int emitProgram(ProgramBuilder programBuilder) { |
| 46 Program program = programBuilder.buildProgram(); | 46 Program program = programBuilder.buildProgram(); |
| 47 return _emitter.emitProgram(program); | 47 return _emitter.emitProgram(program); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // TODO(floitsch): copied from OldEmitter. Adjust or share. | 50 // TODO(floitsch): copied from full emitter. Adjust or share. |
| 51 @override | 51 @override |
| 52 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) { | 52 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) { |
| 53 return _emitter.isConstantInlinedOrAlreadyEmitted(constant); | 53 return _emitter.isConstantInlinedOrAlreadyEmitted(constant); |
| 54 } | 54 } |
| 55 | 55 |
| 56 // TODO(floitsch): copied from OldEmitter. Adjust or share. | 56 // TODO(floitsch): copied from full emitter. Adjust or share. |
| 57 @override | 57 @override |
| 58 int compareConstants(ConstantValue a, ConstantValue b) { | 58 int compareConstants(ConstantValue a, ConstantValue b) { |
| 59 return _emitter.compareConstants(a, b); | 59 return _emitter.compareConstants(a, b); |
| 60 } | 60 } |
| 61 | 61 |
| 62 @override | 62 @override |
| 63 js.Expression constantReference(ConstantValue value) { | 63 js.Expression constantReference(ConstantValue value) { |
| 64 return _emitter.generateConstantReference(value); | 64 return _emitter.generateConstantReference(value); |
| 65 } | 65 } |
| 66 | 66 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 _compiler.internalError(NO_LOCATION_SPANNABLE, | 175 _compiler.internalError(NO_LOCATION_SPANNABLE, |
| 176 "Unhandled Builtin: $builtin"); | 176 "Unhandled Builtin: $builtin"); |
| 177 return null; | 177 return null; |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 @override | 181 @override |
| 182 void invalidateCaches() { | 182 void invalidateCaches() { |
| 183 } | 183 } |
| 184 } | 184 } |
| OLD | NEW |