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, | |
87 compiler.backend.rtiNeed, | 86 compiler.backend.rtiNeed, |
88 compiler.backend.rtiEncoder, | 87 compiler.backend.rtiEncoder, |
89 namer, | 88 namer, |
90 task, | 89 task, |
91 this.generateConstantReference, | 90 this.generateConstantReference, |
92 constantListGenerator); | 91 constantListGenerator); |
93 } | 92 } |
94 | 93 |
95 DiagnosticReporter get reporter => compiler.reporter; | 94 DiagnosticReporter get reporter => compiler.reporter; |
96 | 95 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // data. | 393 // data. |
395 mapping["_comment"] = "This mapping shows which compiled `.js` files are " | 394 mapping["_comment"] = "This mapping shows which compiled `.js` files are " |
396 "needed for a given deferred library import."; | 395 "needed for a given deferred library import."; |
397 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); | 396 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); |
398 compiler.outputProvider( | 397 compiler.outputProvider( |
399 compiler.options.deferredMapUri.path, '', OutputType.info) | 398 compiler.options.deferredMapUri.path, '', OutputType.info) |
400 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) | 399 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) |
401 ..close(); | 400 ..close(); |
402 } | 401 } |
403 } | 402 } |
OLD | NEW |