OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 libraries; | 5 library libraries; |
6 | 6 |
7 /** | 7 /** |
8 * A bit flag used by [LibraryInfo] indicating that a library is used by dart2js | 8 * A bit flag used by [LibraryInfo] indicating that a library is used by dart2js |
9 */ | 9 */ |
10 const int DART2JS_PLATFORM = 1; | 10 const int DART2JS_PLATFORM = 1; |
(...skipping 12 matching lines...) Expand all Loading... |
23 const Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { | 23 const Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
24 | 24 |
25 "collection": const LibraryInfo( | 25 "collection": const LibraryInfo( |
26 "collection/collection.dart", | 26 "collection/collection.dart", |
27 implementation: true), | 27 implementation: true), |
28 | 28 |
29 "core": const LibraryInfo( | 29 "core": const LibraryInfo( |
30 "core/core.dart", | 30 "core/core.dart", |
31 dart2jsPatchPath: "_internal/compiler/implementation/lib/core_patch.dart")
, | 31 dart2jsPatchPath: "_internal/compiler/implementation/lib/core_patch.dart")
, |
32 | 32 |
33 "coreimpl": const LibraryInfo( | |
34 "coreimpl/coreimpl.dart", | |
35 implementation: true, | |
36 dart2jsPatchPath: "_internal/compiler/implementation/lib/coreimpl_patch.da
rt"), | |
37 | |
38 "crypto": const LibraryInfo( | 33 "crypto": const LibraryInfo( |
39 "crypto/crypto.dart"), | 34 "crypto/crypto.dart"), |
40 | 35 |
41 "html": const LibraryInfo( | 36 "html": const LibraryInfo( |
42 "html/dartium/html_dartium.dart", | 37 "html/dartium/html_dartium.dart", |
43 category: "Client", | 38 category: "Client", |
44 dart2jsPath: "html/dart2js/html_dart2js.dart"), | 39 dart2jsPath: "html/dart2js/html_dart2js.dart"), |
45 | 40 |
46 "io": const LibraryInfo( | 41 "io": const LibraryInfo( |
47 "io/io.dart", | 42 "io/io.dart", |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 * Bit flags indicating which platforms consume this library. | 128 * Bit flags indicating which platforms consume this library. |
134 * See [DART2JS_LIBRARY] and [VM_LIBRARY]. | 129 * See [DART2JS_LIBRARY] and [VM_LIBRARY]. |
135 */ | 130 */ |
136 final int platforms; | 131 final int platforms; |
137 | 132 |
138 /** | 133 /** |
139 * True if the library contains implementation details for another library. | 134 * True if the library contains implementation details for another library. |
140 * The implication is that these libraries are less commonly used | 135 * The implication is that these libraries are less commonly used |
141 * and that tools like Dart Editor should not show these libraries | 136 * and that tools like Dart Editor should not show these libraries |
142 * in a list of all libraries unless the user specifically asks the tool to | 137 * in a list of all libraries unless the user specifically asks the tool to |
143 * do so. (E.g. "coreimpl" contains implementation for the "core" library). | 138 * do so. |
144 */ | 139 */ |
145 final bool implementation; | 140 final bool implementation; |
146 | 141 |
147 const LibraryInfo(this.path, { | 142 const LibraryInfo(this.path, { |
148 this.category: "Shared", | 143 this.category: "Shared", |
149 this.dart2jsPath, | 144 this.dart2jsPath, |
150 this.dart2jsPatchPath, | 145 this.dart2jsPatchPath, |
151 this.implementation: false, | 146 this.implementation: false, |
152 this.documented: true, | 147 this.documented: true, |
153 this.platforms: DART2JS_PLATFORM | VM_PLATFORM}); | 148 this.platforms: DART2JS_PLATFORM | VM_PLATFORM}); |
154 | 149 |
155 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; | 150 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; |
156 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; | 151 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; |
157 } | 152 } |
OLD | NEW |