| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.startup_emitter; | 5 library dart2js.js_emitter.startup_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 18 matching lines...) Expand all Loading... |
| 29 import '../../util/util.dart' show | 29 import '../../util/util.dart' show |
| 30 NO_LOCATION_SPANNABLE; | 30 NO_LOCATION_SPANNABLE; |
| 31 | 31 |
| 32 class Emitter implements emitterTask.Emitter { | 32 class Emitter implements emitterTask.Emitter { |
| 33 final Compiler _compiler; | 33 final Compiler _compiler; |
| 34 final Namer namer; | 34 final Namer namer; |
| 35 final ModelEmitter _emitter; | 35 final ModelEmitter _emitter; |
| 36 | 36 |
| 37 JavaScriptBackend get _backend => _compiler.backend; | 37 JavaScriptBackend get _backend => _compiler.backend; |
| 38 | 38 |
| 39 Emitter(Compiler compiler, Namer namer, NativeEmitter nativeEmitter) | 39 Emitter(Compiler compiler, Namer namer, NativeEmitter nativeEmitter, |
| 40 bool shouldGenerateSourceMap) |
| 40 : this._compiler = compiler, | 41 : this._compiler = compiler, |
| 41 this.namer = namer, | 42 this.namer = namer, |
| 42 _emitter = new ModelEmitter(compiler, namer, nativeEmitter); | 43 _emitter = new ModelEmitter( |
| 44 compiler, namer, nativeEmitter, shouldGenerateSourceMap); |
| 43 | 45 |
| 44 @override | 46 @override |
| 45 String get patchVersion => "startup"; | 47 String get patchVersion => "startup"; |
| 46 | 48 |
| 47 @override | 49 @override |
| 48 int emitProgram(ProgramBuilder programBuilder) { | 50 int emitProgram(ProgramBuilder programBuilder) { |
| 49 Program program = programBuilder.buildProgram(); | 51 Program program = programBuilder.buildProgram(); |
| 50 return _emitter.emitProgram(program); | 52 return _emitter.emitProgram(program); |
| 51 } | 53 } |
| 52 | 54 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 _compiler.internalError(NO_LOCATION_SPANNABLE, | 181 _compiler.internalError(NO_LOCATION_SPANNABLE, |
| 180 "Unhandled Builtin: $builtin"); | 182 "Unhandled Builtin: $builtin"); |
| 181 return null; | 183 return null; |
| 182 } | 184 } |
| 183 } | 185 } |
| 184 | 186 |
| 185 @override | 187 @override |
| 186 void invalidateCaches() { | 188 void invalidateCaches() { |
| 187 } | 189 } |
| 188 } | 190 } |
| OLD | NEW |