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