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 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 import '../../util/util.dart' show | 31 import '../../util/util.dart' show |
32 NO_LOCATION_SPANNABLE; | 32 NO_LOCATION_SPANNABLE; |
33 | 33 |
34 import '../../util/uri_extras.dart' show | 34 import '../../util/uri_extras.dart' show |
35 relativize; | 35 relativize; |
36 | 36 |
37 import '../js_emitter.dart' show AstContainer, NativeEmitter; | 37 import '../js_emitter.dart' show AstContainer, NativeEmitter; |
38 | 38 |
39 import 'package:js_runtime/shared/embedded_names.dart' show | 39 import 'package:js_runtime/shared/embedded_names.dart' show |
| 40 CLASS_FIELDS_EXTRACTOR, |
| 41 CLASS_ID_EXTRACTOR, |
40 CREATE_NEW_ISOLATE, | 42 CREATE_NEW_ISOLATE, |
41 DEFERRED_INITIALIZED, | 43 DEFERRED_INITIALIZED, |
42 DEFERRED_LIBRARY_URIS, | 44 DEFERRED_LIBRARY_URIS, |
43 DEFERRED_LIBRARY_HASHES, | 45 DEFERRED_LIBRARY_HASHES, |
44 GET_TYPE_FROM_NAME, | 46 GET_TYPE_FROM_NAME, |
| 47 INITIALIZE_EMPTY_INSTANCE, |
45 INITIALIZE_LOADED_HUNK, | 48 INITIALIZE_LOADED_HUNK, |
| 49 INSTANCE_FROM_CLASS_ID, |
46 INTERCEPTORS_BY_TAG, | 50 INTERCEPTORS_BY_TAG, |
47 IS_HUNK_INITIALIZED, | 51 IS_HUNK_INITIALIZED, |
48 IS_HUNK_LOADED, | 52 IS_HUNK_LOADED, |
49 LEAF_TAGS, | 53 LEAF_TAGS, |
50 MANGLED_GLOBAL_NAMES, | 54 MANGLED_GLOBAL_NAMES, |
51 MANGLED_NAMES, | 55 MANGLED_NAMES, |
52 METADATA, | 56 METADATA, |
53 NATIVE_SUPERCLASS_TAG_NAME, | 57 NATIVE_SUPERCLASS_TAG_NAME, |
| 58 STATIC_FUNCTION_NAME_TO_CLOSURE, |
54 TYPE_TO_INTERCEPTOR_MAP, | 59 TYPE_TO_INTERCEPTOR_MAP, |
55 TYPES; | 60 TYPES; |
56 | 61 |
57 import '../js_emitter.dart' show NativeGenerator, buildTearOffCode; | 62 import '../js_emitter.dart' show NativeGenerator, buildTearOffCode; |
58 import '../model.dart'; | 63 import '../model.dart'; |
59 | 64 |
60 part 'deferred_fragment_hash.dart'; | 65 part 'deferred_fragment_hash.dart'; |
61 part 'fragment_emitter.dart'; | 66 part 'fragment_emitter.dart'; |
62 | 67 |
63 class ModelEmitter { | 68 class ModelEmitter { |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // Json does not support comments, so we embed the explanation in the | 389 // Json does not support comments, so we embed the explanation in the |
385 // data. | 390 // data. |
386 mapping["_comment"] = "This mapping shows which compiled `.js` files are " | 391 mapping["_comment"] = "This mapping shows which compiled `.js` files are " |
387 "needed for a given deferred library import."; | 392 "needed for a given deferred library import."; |
388 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); | 393 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); |
389 compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map') | 394 compiler.outputProvider(compiler.deferredMapUri.path, 'deferred_map') |
390 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) | 395 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) |
391 ..close(); | 396 ..close(); |
392 } | 397 } |
393 } | 398 } |
OLD | NEW |