OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 deferred_load; | 5 library deferred_load; |
6 | 6 |
7 import 'constants/values.dart' show | 7 import 'constants/values.dart' show |
8 ConstantValue, | 8 ConstantValue, |
9 ConstructedConstantValue, | 9 ConstructedConstantValue, |
10 DeferredConstantValue, | 10 DeferredConstantValue, |
11 StringConstantValue; | 11 StringConstantValue; |
12 | |
13 import 'dart2jslib.dart' show | 12 import 'dart2jslib.dart' show |
14 Backend, | 13 Backend, |
15 Compiler, | 14 Compiler, |
16 CompilerTask, | 15 CompilerTask, |
17 invariant, | 16 invariant; |
18 MessageKind; | 17 import 'dart_types.dart'; |
19 | |
20 import 'js_backend/js_backend.dart' show | |
21 JavaScriptBackend; | |
22 | |
23 import 'elements/elements.dart' show | 18 import 'elements/elements.dart' show |
24 AccessorElement, | 19 AccessorElement, |
25 AstElement, | 20 AstElement, |
26 ClassElement, | 21 ClassElement, |
27 Element, | 22 Element, |
28 ElementKind, | 23 ElementKind, |
29 Elements, | 24 Elements, |
30 FunctionElement, | 25 FunctionElement, |
31 LibraryElement, | 26 LibraryElement, |
32 MetadataAnnotation, | 27 MetadataAnnotation, |
33 PrefixElement, | 28 PrefixElement, |
34 ScopeContainerElement, | 29 ScopeContainerElement, |
35 TypedefElement, | 30 TypedefElement, |
36 VoidElement; | 31 VoidElement; |
37 | 32 import 'js_backend/js_backend.dart' show |
38 import 'dart_types.dart'; | 33 JavaScriptBackend; |
39 | 34 import 'messages.dart' show MessageKind; |
40 import 'util/util.dart' show | 35 import 'resolution/resolution.dart' show |
41 Link, makeUnique; | 36 AnalyzableElementX, |
42 import 'util/uri_extras.dart' as uri_extras; | 37 TreeElements; |
43 | 38 import 'tree/tree.dart' as ast; |
44 import 'util/setlet.dart' show | |
45 Setlet; | |
46 | |
47 import 'tree/tree.dart' show | 39 import 'tree/tree.dart' show |
48 Import, | 40 Import, |
49 LibraryTag, | 41 LibraryTag, |
50 LibraryDependency, | 42 LibraryDependency, |
51 LiteralDartString, | 43 LiteralDartString, |
52 LiteralString, | 44 LiteralString, |
53 NewExpression, | 45 NewExpression, |
54 Node; | 46 Node; |
55 | 47 import 'util/setlet.dart' show |
56 import 'tree/tree.dart' as ast; | 48 Setlet; |
57 | 49 import 'util/uri_extras.dart' as uri_extras; |
58 import 'resolution/resolution.dart' show | 50 import 'util/util.dart' show |
59 AnalyzableElementX, | 51 Link, makeUnique; |
60 TreeElements; | |
61 | 52 |
62 /// A "hunk" of the program that will be loaded whenever one of its [imports] | 53 /// A "hunk" of the program that will be loaded whenever one of its [imports] |
63 /// are loaded. | 54 /// are loaded. |
64 /// | 55 /// |
65 /// Elements that are only used in one deferred import, is in an OutputUnit with | 56 /// Elements that are only used in one deferred import, is in an OutputUnit with |
66 /// the deferred import as single element in the [imports] set. | 57 /// the deferred import as single element in the [imports] set. |
67 /// | 58 /// |
68 /// Whenever a deferred Element is shared between several deferred imports it is | 59 /// Whenever a deferred Element is shared between several deferred imports it is |
69 /// in an output unit with those imports in the [imports] Set. | 60 /// in an output unit with those imports in the [imports] Set. |
70 /// | 61 /// |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 _importingLibrary = importingLibrary; | 881 _importingLibrary = importingLibrary; |
891 | 882 |
892 String get importingLibraryName { | 883 String get importingLibraryName { |
893 String libraryName = _importingLibrary.getLibraryName(); | 884 String libraryName = _importingLibrary.getLibraryName(); |
894 return libraryName == "" | 885 return libraryName == "" |
895 ? "<unnamed>" | 886 ? "<unnamed>" |
896 : libraryName; | 887 : libraryName; |
897 } | 888 } |
898 | 889 |
899 } | 890 } |
OLD | NEW |