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 | 8 |
9 import '../../common.dart'; | 9 import '../../common.dart'; |
10 | 10 |
11 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue; | 11 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue; |
12 import '../../compiler.dart' show Compiler; | 12 import '../../compiler.dart' show Compiler; |
| 13 import '../../diagnostics/messages.dart' show |
| 14 MessageKind; |
| 15 |
13 import '../../elements/elements.dart' show ClassElement, FunctionElement; | 16 import '../../elements/elements.dart' show ClassElement, FunctionElement; |
14 import '../../hash/sha1.dart' show Hasher; | 17 import '../../hash/sha1.dart' show Hasher; |
15 | 18 |
16 import '../../io/code_output.dart'; | 19 import '../../io/code_output.dart'; |
17 | 20 |
18 import '../../io/line_column_provider.dart' show | 21 import '../../io/line_column_provider.dart' show |
19 LineColumnCollector, | 22 LineColumnCollector, |
20 LineColumnProvider; | 23 LineColumnProvider; |
21 | 24 |
22 import '../../io/source_map_builder.dart' show | 25 import '../../io/source_map_builder.dart' show |
23 SourceMapBuilder; | 26 SourceMapBuilder; |
24 | 27 |
25 import '../../js/js.dart' as js; | 28 import '../../js/js.dart' as js; |
26 import '../../js_backend/js_backend.dart' show | 29 import '../../js_backend/js_backend.dart' show |
27 JavaScriptBackend, | 30 JavaScriptBackend, |
28 Namer, | 31 Namer, |
29 ConstantEmitter; | 32 ConstantEmitter; |
30 | 33 |
31 import '../../messages.dart' show | |
32 MessageKind; | |
33 | |
34 import '../../diagnostics/spannable.dart' show | 34 import '../../diagnostics/spannable.dart' show |
35 NO_LOCATION_SPANNABLE; | 35 NO_LOCATION_SPANNABLE; |
36 | 36 |
37 import '../../util/uri_extras.dart' show | 37 import '../../util/uri_extras.dart' show |
38 relativize; | 38 relativize; |
39 | 39 |
40 import '../headers.dart'; | 40 import '../headers.dart'; |
41 import '../js_emitter.dart' show AstContainer, NativeEmitter; | 41 import '../js_emitter.dart' show AstContainer, NativeEmitter; |
42 | 42 |
43 import 'package:js_runtime/shared/embedded_names.dart' show | 43 import 'package:js_runtime/shared/embedded_names.dart' show |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // Json does not support comments, so we embed the explanation in the | 400 // Json does not support comments, so we embed the explanation in the |
401 // data. | 401 // data. |
402 mapping["_comment"] = "This mapping shows which compiled `.js` files are " | 402 mapping["_comment"] = "This mapping shows which compiled `.js` files are " |
403 "needed for a given deferred library import."; | 403 "needed for a given deferred library import."; |
404 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); | 404 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); |
405 compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map') | 405 compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map') |
406 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) | 406 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) |
407 ..close(); | 407 ..close(); |
408 } | 408 } |
409 } | 409 } |
OLD | NEW |