Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: test/generated_sdk/lib/_internal/libraries.dart

Issue 1162723007: remove generated_sdk from checked in code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library libraries;
6
7 /**
8 * A bit flag used by [LibraryInfo] indicating that a library is used by dart2js
9 */
10 const int DART2JS_PLATFORM = 1;
11
12 /**
13 * A bit flag used by [LibraryInfo] indicating that a library is used by the VM
14 */
15 const int VM_PLATFORM = 2;
16
17 /**
18 * Mapping of "dart:" library name (e.g. "core") to information about that libra ry.
19 * This information is structured such that Dart Editor can parse this file
20 * and extract the necessary information without executing it
21 * while other tools can access via execution.
22 */
23 const Map<String, LibraryInfo> LIBRARIES = const {
24
25 "async": const LibraryInfo(
26 "async/async.dart",
27 maturity: Maturity.STABLE,
28 dart2jsPatchPath: "_internal/compiler/js_lib/async_patch.dart"),
29
30 "_blink": const LibraryInfo(
31 "_blink/dartium/_blink_dartium.dart",
32 category: "Client",
33 implementation: true,
34 documented: false,
35 platforms: VM_PLATFORM),
36
37 "_chrome": const LibraryInfo(
38 "_chrome/dart2js/chrome_dart2js.dart",
39 documented: false,
40 category: "Client"),
41
42 "collection": const LibraryInfo(
43 "collection/collection.dart",
44 maturity: Maturity.STABLE,
45 dart2jsPatchPath: "_internal/compiler/js_lib/collection_patch.dart"),
46
47 "convert": const LibraryInfo(
48 "convert/convert.dart",
49 maturity: Maturity.STABLE,
50 dart2jsPatchPath: "_internal/compiler/js_lib/convert_patch.dart"),
51
52 "core": const LibraryInfo(
53 "core/core.dart",
54 maturity: Maturity.STABLE,
55 dart2jsPatchPath: "_internal/compiler/js_lib/core_patch.dart"),
56
57 "html": const LibraryInfo(
58 "html/dartium/html_dartium.dart",
59 category: "Client",
60 maturity: Maturity.WEB_STABLE,
61 dart2jsPath: "html/dart2js/html_dart2js.dart"),
62
63 "html_common": const LibraryInfo(
64 "html/html_common/html_common.dart",
65 category: "Client",
66 maturity: Maturity.WEB_STABLE,
67 dart2jsPath: "html/html_common/html_common_dart2js.dart",
68 documented: false,
69 implementation: true),
70
71 "indexed_db": const LibraryInfo(
72 "indexed_db/dartium/indexed_db_dartium.dart",
73 category: "Client",
74 maturity: Maturity.WEB_STABLE,
75 dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"),
76
77 "io": const LibraryInfo(
78 "io/io.dart",
79 category: "Server",
80 maturity: Maturity.STABLE,
81 dart2jsPatchPath: "_internal/compiler/js_lib/io_patch.dart"),
82
83 "isolate": const LibraryInfo(
84 "isolate/isolate.dart",
85 maturity: Maturity.STABLE,
86 dart2jsPatchPath: "_internal/compiler/js_lib/isolate_patch.dart"),
87
88 "js": const LibraryInfo(
89 "js/dartium/js_dartium.dart",
90 category: "Client",
91 maturity: Maturity.STABLE,
92 dart2jsPath: "js/dart2js/js_dart2js.dart"),
93
94 "math": const LibraryInfo(
95 "math/math.dart",
96 maturity: Maturity.STABLE,
97 dart2jsPatchPath: "_internal/compiler/js_lib/math_patch.dart"),
98
99 "mirrors": const LibraryInfo(
100 "mirrors/mirrors.dart",
101 maturity: Maturity.UNSTABLE,
102 dart2jsPatchPath: "_internal/compiler/js_lib/mirrors_patch.dart"),
103
104 "profiler": const LibraryInfo(
105 "profiler/profiler.dart",
106 maturity: Maturity.UNSTABLE),
107
108 "nativewrappers": const LibraryInfo(
109 "html/dartium/nativewrappers.dart",
110 category: "Client",
111 implementation: true,
112 documented: false,
113 platforms: VM_PLATFORM),
114
115 "typed_data": const LibraryInfo(
116 "typed_data/typed_data.dart",
117 maturity: Maturity.STABLE,
118 dart2jsPatchPath: "_internal/compiler/js_lib/typed_data_patch.dart"),
119
120 "_native_typed_data": const LibraryInfo(
121 "_internal/compiler/js_lib/native_typed_data.dart",
122 category: "Internal",
123 implementation: true,
124 documented: false,
125 platforms: DART2JS_PLATFORM),
126
127 "svg": const LibraryInfo(
128 "svg/dartium/svg_dartium.dart",
129 category: "Client",
130 maturity: Maturity.WEB_STABLE,
131 dart2jsPath: "svg/dart2js/svg_dart2js.dart"),
132
133 "web_audio": const LibraryInfo(
134 "web_audio/dartium/web_audio_dartium.dart",
135 category: "Client",
136 maturity: Maturity.WEB_STABLE,
137 dart2jsPath: "web_audio/dart2js/web_audio_dart2js.dart"),
138
139 "web_gl": const LibraryInfo(
140 "web_gl/dartium/web_gl_dartium.dart",
141 category: "Client",
142 maturity: Maturity.WEB_STABLE,
143 dart2jsPath: "web_gl/dart2js/web_gl_dart2js.dart"),
144
145 "web_sql": const LibraryInfo(
146 "web_sql/dartium/web_sql_dartium.dart",
147 category: "Client",
148 maturity: Maturity.WEB_STABLE,
149 dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"),
150
151 "_internal": const LibraryInfo(
152 "internal/internal.dart",
153 category: "Internal",
154 documented: false,
155 dart2jsPatchPath:
156 "_internal/compiler/js_lib/internal_patch.dart"),
157
158 "_js_helper": const LibraryInfo(
159 "_internal/compiler/js_lib/js_helper.dart",
160 category: "Internal",
161 documented: false,
162 platforms: DART2JS_PLATFORM),
163
164 "_interceptors": const LibraryInfo(
165 "_internal/compiler/js_lib/interceptors.dart",
166 category: "Internal",
167 documented: false,
168 platforms: DART2JS_PLATFORM),
169
170 "_foreign_helper": const LibraryInfo(
171 "_internal/compiler/js_lib/foreign_helper.dart",
172 category: "Internal",
173 documented: false,
174 platforms: DART2JS_PLATFORM),
175
176 "_isolate_helper": const LibraryInfo(
177 "_internal/compiler/js_lib/isolate_helper.dart",
178 category: "Internal",
179 documented: false,
180 platforms: DART2JS_PLATFORM),
181
182 "_js_mirrors": const LibraryInfo(
183 "_internal/compiler/js_lib/js_mirrors.dart",
184 category: "Internal",
185 documented: false,
186 platforms: DART2JS_PLATFORM),
187
188 "_js_names": const LibraryInfo(
189 "_internal/compiler/js_lib/js_names.dart",
190 category: "Internal",
191 documented: false,
192 platforms: DART2JS_PLATFORM),
193
194 "_js_primitives": const LibraryInfo(
195 "_internal/compiler/js_lib/js_primitives.dart",
196 category: "Internal",
197 documented: false,
198 platforms: DART2JS_PLATFORM),
199
200 // TODO(ahe): This library is only for dart2dart, perhaps it should use a
201 // different platform.
202 "_mirror_helper": const LibraryInfo(
203 "_internal/compiler/js_lib/mirror_helper.dart",
204 category: "Internal",
205 documented: false,
206 platforms: DART2JS_PLATFORM),
207
208 "_js_embedded_names": const LibraryInfo(
209 "_internal/compiler/js_lib/shared/embedded_names.dart",
210 category: "Internal",
211 documented: false,
212 platforms: DART2JS_PLATFORM),
213
214 "_metadata": const LibraryInfo(
215 "html/html_common/metadata.dart",
216 category: "Internal",
217 documented: false,
218 platforms: DART2JS_PLATFORM),
219 };
220
221 /**
222 * Information about a "dart:" library.
223 */
224 class LibraryInfo {
225
226 /**
227 * Path to the library's *.dart file relative to this file.
228 */
229 final String path;
230
231 /**
232 * The category in which the library should appear in the editor
233 * (e.g. "Shared", "Client", "Server", ...).
234 * If a category is not specified it defaults to "Shared".
235 */
236 final String category;
237
238 /**
239 * Path to the dart2js library's *.dart file relative to this file
240 * or null if dart2js uses the common library path defined above.
241 * Access using the [#getDart2JsPath()] method.
242 */
243 final String dart2jsPath;
244
245 /**
246 * Path to the dart2js library's patch file relative to this file
247 * or null if no dart2js patch file associated with this library.
248 * Access using the [#getDart2JsPatchPath()] method.
249 */
250 final String dart2jsPatchPath;
251
252 /**
253 * True if this library is documented and should be shown to the user.
254 */
255 final bool documented;
256
257 /**
258 * Bit flags indicating which platforms consume this library.
259 * See [DART2JS_LIBRARY] and [VM_LIBRARY].
260 */
261 final int platforms;
262
263 /**
264 * True if the library contains implementation details for another library.
265 * The implication is that these libraries are less commonly used
266 * and that tools like Dart Editor should not show these libraries
267 * in a list of all libraries unless the user specifically asks the tool to
268 * do so.
269 */
270 final bool implementation;
271
272 /**
273 * States the current maturity of this library.
274 */
275 final Maturity maturity;
276
277 const LibraryInfo(this.path, {
278 this.category: "Shared",
279 this.dart2jsPath,
280 this.dart2jsPatchPath,
281 this.implementation: false,
282 this.documented: true,
283 this.maturity: Maturity.UNSPECIFIED,
284 this.platforms: DART2JS_PLATFORM | VM_PLATFORM});
285
286 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0;
287 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0;
288 }
289
290
291
292 /**
293 * Abstraction to capture the maturity of a library.
294 */
295 class Maturity {
296 final int level;
297 final String name;
298 final String description;
299
300 const Maturity(this.level, this.name, this.description);
301
302 String toString() => "$name: $level\n$description\n";
303
304 static const Maturity DEPRECATED = const Maturity(0, "Deprecated",
305 "This library will be remove before next major release.");
306
307 static const Maturity EXPERIMENTAL = const Maturity(1, "Experimental",
308 "This library is experimental and will likely change or be removed\n"
309 "in future versions.");
310
311 static const Maturity UNSTABLE = const Maturity(2, "Unstable",
312 "This library is in still changing and have not yet endured\n"
313 "sufficient real-world testing.\n"
314 "Backwards-compatibility is NOT guaranteed.");
315
316 static const Maturity WEB_STABLE = const Maturity(3, "Web Stable",
317 "This library is tracking the DOM evolution as defined by WC3.\n"
318 "Backwards-compatibility is NOT guaranteed.");
319
320 static const Maturity STABLE = const Maturity(4, "Stable",
321 "The library is stable. API backwards-compatibility is guaranteed.\n"
322 "However implementation details might change.");
323
324 static const Maturity LOCKED = const Maturity(5, "Locked",
325 "This library will not change except when serious bugs are encountered.");
326
327 static const Maturity UNSPECIFIED = const Maturity(-1, "Unspecified",
328 "The maturity for this library has not been specified.");
329 }
OLDNEW
« no previous file with comments | « test/generated_sdk/lib/_internal/compiler/js_lib/string_helper.dart ('k') | test/generated_sdk/lib/async/async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698