Chromium Code Reviews| Index: lib/_internal/libraries.dart |
| diff --git a/lib/_internal/libraries.dart b/lib/_internal/libraries.dart |
| index 0f79683bfed3611fddb3ff899ca8364bbd6a4704..43e7cb565253d570f55f696d1085a0812970ca1d 100644 |
| --- a/lib/_internal/libraries.dart |
| +++ b/lib/_internal/libraries.dart |
| @@ -5,17 +5,17 @@ |
| #library('libraries'); |
| /** |
| - * Mapping of "dart:" library name (e.g. "core") to information about that library. |
| - * This information is structured such that Dart Editor can parse this file |
| - * and extract the necessary information without executing it |
| - * while other tools can access via execution. |
| + * Mapping of "dart:" library name (e.g. "core") to information about that |
| + * library. This information is structured such that Dart Editor can parse this |
| + * file and extract the necessary information without executing it while other |
| + * tools can access via execution. |
| */ |
| final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
| - // Used by VM applications |
| "builtin": const LibraryInfo( |
| "builtin/builtin_runtime.dart", |
| - category: "Server"), |
| + category: "Server", |
| + internalFor: "VM"), |
| "compiler": const LibraryInfo( |
| "compiler/compiler.dart", |
| @@ -29,7 +29,7 @@ final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
| "coreimpl/coreimpl_runtime.dart", |
| implementation: true, |
| dart2jsPath: "compiler/implementation/lib/coreimpl.dart", |
| - dart2jsPatchPath: "compiler/implementation/lib/coreimpl.dartp"), |
| + dart2jsPatchPath: "compiler/implementation/lib/coreimpl_patch.dart"), |
| "crypto": const LibraryInfo( |
| "crypto/crypto.dart"), |
| @@ -38,7 +38,7 @@ final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
| "dom_deprecated": const LibraryInfo( |
| "dom/dom_dart2js.dart", |
| dart2jsPath: "dom/dart2js/dom_dart2js.dart", |
| - internal: true), |
| + undocumented: false), |
|
Johnni Winther
2012/08/24 13:15:55
I guess this should be true.
|
| "html": const LibraryInfo( |
| "html/html_dartium.dart", |
| @@ -51,27 +51,24 @@ final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
| dart2jsPath: "compiler/implementation/lib/io.dart"), |
| "isolate": const LibraryInfo( |
| - "isolate/isolate.dart"), |
| + "isolate/isolate.dart", |
| + dart2jsPatchPath: "compiler/implementation/lib/isolate_patch.dart"), |
| "json": const LibraryInfo( |
| "json/json.dart"), |
| "math": const LibraryInfo( |
| "math/math.dart", |
| - dart2jsPatchPath: "compiler/implementation/lib/math.dartp"), |
| + dart2jsPatchPath: "compiler/implementation/lib/math_patch.dart"), |
| "mirrors": const LibraryInfo( |
| "mirrors/mirrors.dart"), |
| - // Used by Dartium applications |
| "nativewrappers": const LibraryInfo( |
| "html/nativewrappers.dart", |
| category: "Client", |
| - implementation: true), |
| - |
| - "unittest": const LibraryInfo( |
| - "unittest/unittest.dart", |
| - category: "Tools"), |
| + implementation: true, |
| + internalFor: "Dartium"), |
| "uri": const LibraryInfo( |
| "uri/uri.dart"), |
| @@ -82,17 +79,15 @@ final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
| "web": const LibraryInfo( |
| "web/web.dart"), |
| - // Used by dart2js |
| "_js_helper": const LibraryInfo( |
| "compiler/implementation/lib/js_helper.dart", |
| category: "Internal", |
| - internal: true), |
| + internalFor: "dart2js"), |
| - // Used by dart2js |
| "_interceptors": const LibraryInfo( |
| "compiler/implementation/lib/interceptors.dart", |
| category: "Internal", |
| - internal: true), |
| + internalFor: "dart2js"), |
| }; |
| /** |
| @@ -114,6 +109,8 @@ class LibraryInfo { |
| /** |
| * Path to the dart2js library's *.dart file relative to this file |
| * or null if dart2js uses the common library path defined above. |
| + * |
| + * TODO(lrn): This should go away when the library has been unified. |
| */ |
| final String dart2jsPath; |
| @@ -124,20 +121,32 @@ class LibraryInfo { |
| final String dart2jsPatchPath; |
| /** |
| - * True if this library is internal and should not be shown to the user |
| + * A [String] representing a specific backend that this library is for. |
| + * |
| + * Each backend can decide their own name, as long as they are distinct. |
| + * A backend should ignore a library that is internal for any other backend |
| + * than itself. Internal libraries might contain non-standard syntax. |
| */ |
| - final bool internal; |
| + final String internalFor; |
| + |
| + /** |
| + * This library is not part of the SDK documentation. |
| + */ |
| + final bool undocumented; |
| /** |
| * True if the library contains implementation details for another library. |
| * The implication is that these libraries are less commonly used |
| * and that tools like Dart Editor should not show these libraries |
| - * in a list of all libraries unless the user specifically asks the tool to do so. |
| - * (e.g. "coreimpl" contains implementation for the "core" library). |
| + * in a list of all libraries unless the user specifically asks the tool to |
| + * do so. (E.g. "coreimpl" contains implementation for the "core" library). |
| */ |
| final bool implementation; |
| const LibraryInfo(this.path, [this.category = "Shared", |
| this.dart2jsPath, this.dart2jsPatchPath, |
| - this.implementation = false, this.internal = false]); |
| + this.implementation = false, this.undocumented = false, |
| + this.internalFor]); |
| + |
| + bool get internal => internalFor != null; |
| } |