| 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; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * A bit flag used by [LibraryInfo] indicating that a library is used by the VM | 13 * A bit flag used by [LibraryInfo] indicating that a library is used by the VM |
| 14 */ | 14 */ |
| 15 const int VM_PLATFORM = 2; | 15 const int VM_PLATFORM = 2; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Mapping of "dart:" library name (e.g. "core") to information about that libra
ry. | 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 | 19 * This information is structured such that Dart Editor can parse this file |
| 20 * and extract the necessary information without executing it | 20 * and extract the necessary information without executing it |
| 21 * while other tools can access via execution. | 21 * while other tools can access via execution. |
| 22 */ | 22 */ |
| 23 const Map<String, LibraryInfo> LIBRARIES = const { | 23 const Map<String, LibraryInfo> LIBRARIES = const { |
| 24 | 24 |
| 25 "annotation": const LibraryInfo( |
| 26 "annotation/annotation.dart", |
| 27 maturity: Maturity.EXPERIMENTAL), |
| 28 |
| 25 "async": const LibraryInfo( | 29 "async": const LibraryInfo( |
| 26 "async/async.dart", | 30 "async/async.dart", |
| 27 maturity: Maturity.STABLE, | 31 maturity: Maturity.STABLE, |
| 28 dart2jsPatchPath: "_internal/lib/async_patch.dart"), | 32 dart2jsPatchPath: "_internal/lib/async_patch.dart"), |
| 29 | 33 |
| 30 "_chrome": const LibraryInfo( | 34 "_chrome": const LibraryInfo( |
| 31 "_chrome/dart2js/chrome_dart2js.dart", | 35 "_chrome/dart2js/chrome_dart2js.dart", |
| 32 documented: false, | 36 documented: false, |
| 33 category: "Client"), | 37 category: "Client"), |
| 34 | 38 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 "json/json.dart", | 92 "json/json.dart", |
| 89 maturity: Maturity.DEPRECATED), | 93 maturity: Maturity.DEPRECATED), |
| 90 | 94 |
| 91 "math": const LibraryInfo( | 95 "math": const LibraryInfo( |
| 92 "math/math.dart", | 96 "math/math.dart", |
| 93 maturity: Maturity.STABLE, | 97 maturity: Maturity.STABLE, |
| 94 dart2jsPatchPath: "_internal/lib/math_patch.dart"), | 98 dart2jsPatchPath: "_internal/lib/math_patch.dart"), |
| 95 | 99 |
| 96 "mirrors": const LibraryInfo( | 100 "mirrors": const LibraryInfo( |
| 97 "mirrors/mirrors.dart", | 101 "mirrors/mirrors.dart", |
| 98 maturity: Maturity.UNSTABLE, | 102 maturity: Maturity.UNSTABLE, |
| 99 dart2jsPatchPath: "_internal/lib/mirrors_patch.dart"), | 103 dart2jsPatchPath: "_internal/lib/mirrors_patch.dart"), |
| 100 | 104 |
| 101 "nativewrappers": const LibraryInfo( | 105 "nativewrappers": const LibraryInfo( |
| 102 "html/dartium/nativewrappers.dart", | 106 "html/dartium/nativewrappers.dart", |
| 103 category: "Client", | 107 category: "Client", |
| 104 implementation: true, | 108 implementation: true, |
| 105 documented: false, | 109 documented: false, |
| 106 platforms: VM_PLATFORM), | 110 platforms: VM_PLATFORM), |
| 107 | 111 |
| 108 "typed_data": const LibraryInfo( | 112 "typed_data": const LibraryInfo( |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 263 |
| 260 | 264 |
| 261 | 265 |
| 262 /** | 266 /** |
| 263 * Abstraction to capture the maturity of a library. | 267 * Abstraction to capture the maturity of a library. |
| 264 */ | 268 */ |
| 265 class Maturity { | 269 class Maturity { |
| 266 final int level; | 270 final int level; |
| 267 final String name; | 271 final String name; |
| 268 final String description; | 272 final String description; |
| 269 | 273 |
| 270 const Maturity(this.level, this.name, this.description); | 274 const Maturity(this.level, this.name, this.description); |
| 271 | 275 |
| 272 String toString() => "$name: $level\n$description\n"; | 276 String toString() => "$name: $level\n$description\n"; |
| 273 | 277 |
| 274 static const Maturity DEPRECATED = const Maturity(0, "Deprecated", | 278 static const Maturity DEPRECATED = const Maturity(0, "Deprecated", |
| 275 "This library will be remove before next major release."); | 279 "This library will be remove before next major release."); |
| 276 | 280 |
| 277 static const Maturity EXPERIMENTAL = const Maturity(1, "Experimental", | 281 static const Maturity EXPERIMENTAL = const Maturity(1, "Experimental", |
| 278 "This library is experimental and will likely change or be removed\n" | 282 "This library is experimental and will likely change or be removed\n" |
| 279 "in future versions."); | 283 "in future versions."); |
| 280 | 284 |
| 281 static const Maturity UNSTABLE = const Maturity(2, "Unstable", | 285 static const Maturity UNSTABLE = const Maturity(2, "Unstable", |
| 282 "This library is in still changing and have not yet endured\n" | 286 "This library is in still changing and have not yet endured\n" |
| 283 "sufficient real-world testing.\n" | 287 "sufficient real-world testing.\n" |
| 284 "Backwards-compatibility is NOT guaranteed."); | 288 "Backwards-compatibility is NOT guaranteed."); |
| 285 | 289 |
| 286 static const Maturity WEB_STABLE = const Maturity(3, "Web Stable", | 290 static const Maturity WEB_STABLE = const Maturity(3, "Web Stable", |
| 287 "This library is tracking the DOM evolution as defined by WC3.\n" | 291 "This library is tracking the DOM evolution as defined by WC3.\n" |
| 288 "Backwards-compatibility is NOT guaranteed."); | 292 "Backwards-compatibility is NOT guaranteed."); |
| 289 | 293 |
| 290 static const Maturity STABLE = const Maturity(4, "Stable", | 294 static const Maturity STABLE = const Maturity(4, "Stable", |
| 291 "The library is stable. API backwards-compatibility is guaranteed.\n" | 295 "The library is stable. API backwards-compatibility is guaranteed.\n" |
| 292 "However implementation details might change."); | 296 "However implementation details might change."); |
| 293 | 297 |
| 294 static const Maturity LOCKED = const Maturity(5, "Locked", | 298 static const Maturity LOCKED = const Maturity(5, "Locked", |
| 295 "This library will not change except when serious bugs are encountered."); | 299 "This library will not change except when serious bugs are encountered."); |
| 296 | 300 |
| 297 static const Maturity UNSPECIFIED = const Maturity(-1, "Unspecified", | 301 static const Maturity UNSPECIFIED = const Maturity(-1, "Unspecified", |
| 298 "The maturity for this library has not been specified."); | 302 "The maturity for this library has not been specified."); |
| 299 } | 303 } |
| 300 | 304 |
| OLD | NEW |