| 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.model_emitter; | 5 library dart2js.js_emitter.startup_emitter.model_emitter; |
| 6 | 6 |
| 7 import 'dart:convert' show JsonEncoder; | 7 import 'dart:convert' show JsonEncoder; |
| 8 import 'dart:math' show Random; | 8 import 'dart:math' show Random; |
| 9 | 9 |
| 10 import 'package:js_runtime/shared/embedded_names.dart' | 10 import 'package:js_runtime/shared/embedded_names.dart' |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static const String partExtension = "part"; | 76 static const String partExtension = "part"; |
| 77 static const String deferredExtension = "part.js"; | 77 static const String deferredExtension = "part.js"; |
| 78 | 78 |
| 79 static const String typeNameProperty = r"builtin$cls"; | 79 static const String typeNameProperty = r"builtin$cls"; |
| 80 | 80 |
| 81 ModelEmitter(this.compiler, this.namer, this.nativeEmitter, this._closedWorld, | 81 ModelEmitter(this.compiler, this.namer, this.nativeEmitter, this._closedWorld, |
| 82 CodeEmitterTask task, this.shouldGenerateSourceMap) { | 82 CodeEmitterTask task, this.shouldGenerateSourceMap) { |
| 83 this.constantEmitter = new ConstantEmitter( | 83 this.constantEmitter = new ConstantEmitter( |
| 84 compiler.options, | 84 compiler.options, |
| 85 _closedWorld.commonElements, | 85 _closedWorld.commonElements, |
| 86 compiler.codegenWorldBuilder, |
| 86 compiler.backend.rtiNeed, | 87 compiler.backend.rtiNeed, |
| 87 compiler.backend.rtiEncoder, | 88 compiler.backend.rtiEncoder, |
| 88 namer, | 89 namer, |
| 89 task, | 90 task, |
| 90 this.generateConstantReference, | 91 this.generateConstantReference, |
| 91 constantListGenerator); | 92 constantListGenerator); |
| 92 } | 93 } |
| 93 | 94 |
| 94 DiagnosticReporter get reporter => compiler.reporter; | 95 DiagnosticReporter get reporter => compiler.reporter; |
| 95 | 96 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 // data. | 394 // data. |
| 394 mapping["_comment"] = "This mapping shows which compiled `.js` files are " | 395 mapping["_comment"] = "This mapping shows which compiled `.js` files are " |
| 395 "needed for a given deferred library import."; | 396 "needed for a given deferred library import."; |
| 396 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); | 397 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); |
| 397 compiler.outputProvider( | 398 compiler.outputProvider( |
| 398 compiler.options.deferredMapUri.path, '', OutputType.info) | 399 compiler.options.deferredMapUri.path, '', OutputType.info) |
| 399 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) | 400 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) |
| 400 ..close(); | 401 ..close(); |
| 401 } | 402 } |
| 402 } | 403 } |
| OLD | NEW |