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

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

Issue 10874030: Get library data from lib/_internal/libraries.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now made apidoc use the libraries.dart file directly. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/compiler/implementation/library_map.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Mapping of "dart:" library name (e.g. "core") to information about that libra ry. 8 * Mapping of "dart:" library name (e.g. "core") to information about that
9 * This information is structured such that Dart Editor can parse this file 9 * library. This information is structured such that Dart Editor can parse this
10 * and extract the necessary information without executing it 10 * file and extract the necessary information without executing it while other
11 * while other tools can access via execution. 11 * tools can access via execution.
12 */ 12 */
13 final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { 13 final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> {
14 14
15 // Used by VM applications
16 "builtin": const LibraryInfo( 15 "builtin": const LibraryInfo(
17 "builtin/builtin_runtime.dart", 16 "builtin/builtin_runtime.dart",
18 category: "Server"), 17 category: "Server",
18 internalFor: "VM"),
19 19
20 "compiler": const LibraryInfo( 20 "compiler": const LibraryInfo(
21 "compiler/compiler.dart", 21 "compiler/compiler.dart",
22 category: "Tools"), 22 category: "Tools"),
23 23
24 "core": const LibraryInfo( 24 "core": const LibraryInfo(
25 "core/core_runtime.dart", 25 "core/core_runtime.dart",
26 dart2jsPath: "compiler/implementation/lib/core.dart"), 26 dart2jsPath: "compiler/implementation/lib/core.dart"),
27 27
28 "coreimpl": const LibraryInfo( 28 "coreimpl": const LibraryInfo(
29 "coreimpl/coreimpl_runtime.dart", 29 "coreimpl/coreimpl_runtime.dart",
30 implementation: true, 30 implementation: true,
31 dart2jsPath: "compiler/implementation/lib/coreimpl.dart", 31 dart2jsPath: "compiler/implementation/lib/coreimpl.dart",
32 dart2jsPatchPath: "compiler/implementation/lib/coreimpl.dartp"), 32 dart2jsPatchPath: "compiler/implementation/lib/coreimpl_patch.dart"),
33 33
34 "crypto": const LibraryInfo( 34 "crypto": const LibraryInfo(
35 "crypto/crypto.dart"), 35 "crypto/crypto.dart"),
36 36
37 // dom/dom_frog.dart is a placeholder for dartium dom 37 // dom/dom_frog.dart is a placeholder for dartium dom
38 "dom_deprecated": const LibraryInfo( 38 "dom_deprecated": const LibraryInfo(
39 "dom/dom_dart2js.dart", 39 "dom/dom_dart2js.dart",
40 dart2jsPath: "dom/dart2js/dom_dart2js.dart", 40 dart2jsPath: "dom/dart2js/dom_dart2js.dart",
41 internal: true), 41 undocumented: false),
Johnni Winther 2012/08/24 13:15:55 I guess this should be true.
42 42
43 "html": const LibraryInfo( 43 "html": const LibraryInfo(
44 "html/html_dartium.dart", 44 "html/html_dartium.dart",
45 category: "Client", 45 category: "Client",
46 dart2jsPath: "html/dart2js/html_dart2js.dart"), 46 dart2jsPath: "html/dart2js/html_dart2js.dart"),
47 47
48 "io": const LibraryInfo( 48 "io": const LibraryInfo(
49 "io/io_runtime.dart", 49 "io/io_runtime.dart",
50 category: "Server", 50 category: "Server",
51 dart2jsPath: "compiler/implementation/lib/io.dart"), 51 dart2jsPath: "compiler/implementation/lib/io.dart"),
52 52
53 "isolate": const LibraryInfo( 53 "isolate": const LibraryInfo(
54 "isolate/isolate.dart"), 54 "isolate/isolate.dart",
55 dart2jsPatchPath: "compiler/implementation/lib/isolate_patch.dart"),
55 56
56 "json": const LibraryInfo( 57 "json": const LibraryInfo(
57 "json/json.dart"), 58 "json/json.dart"),
58 59
59 "math": const LibraryInfo( 60 "math": const LibraryInfo(
60 "math/math.dart", 61 "math/math.dart",
61 dart2jsPatchPath: "compiler/implementation/lib/math.dartp"), 62 dart2jsPatchPath: "compiler/implementation/lib/math_patch.dart"),
62 63
63 "mirrors": const LibraryInfo( 64 "mirrors": const LibraryInfo(
64 "mirrors/mirrors.dart"), 65 "mirrors/mirrors.dart"),
65 66
66 // Used by Dartium applications
67 "nativewrappers": const LibraryInfo( 67 "nativewrappers": const LibraryInfo(
68 "html/nativewrappers.dart", 68 "html/nativewrappers.dart",
69 category: "Client", 69 category: "Client",
70 implementation: true), 70 implementation: true,
71 71 internalFor: "Dartium"),
72 "unittest": const LibraryInfo(
73 "unittest/unittest.dart",
74 category: "Tools"),
75 72
76 "uri": const LibraryInfo( 73 "uri": const LibraryInfo(
77 "uri/uri.dart"), 74 "uri/uri.dart"),
78 75
79 "utf": const LibraryInfo( 76 "utf": const LibraryInfo(
80 "utf/utf.dart"), 77 "utf/utf.dart"),
81 78
82 "web": const LibraryInfo( 79 "web": const LibraryInfo(
83 "web/web.dart"), 80 "web/web.dart"),
84 81
85 // Used by dart2js
86 "_js_helper": const LibraryInfo( 82 "_js_helper": const LibraryInfo(
87 "compiler/implementation/lib/js_helper.dart", 83 "compiler/implementation/lib/js_helper.dart",
88 category: "Internal", 84 category: "Internal",
89 internal: true), 85 internalFor: "dart2js"),
90 86
91 // Used by dart2js
92 "_interceptors": const LibraryInfo( 87 "_interceptors": const LibraryInfo(
93 "compiler/implementation/lib/interceptors.dart", 88 "compiler/implementation/lib/interceptors.dart",
94 category: "Internal", 89 category: "Internal",
95 internal: true), 90 internalFor: "dart2js"),
96 }; 91 };
97 92
98 /** 93 /**
99 * Information about a "dart:" library. 94 * Information about a "dart:" library.
100 */ 95 */
101 class LibraryInfo { 96 class LibraryInfo {
102 97
103 /** 98 /**
104 * Path to the library's *.dart file relative to this file. 99 * Path to the library's *.dart file relative to this file.
105 */ 100 */
106 final String path; 101 final String path;
107 102
108 /** 103 /**
109 * The category in which the library should appear in the editor 104 * The category in which the library should appear in the editor
110 * (e.g. "Common", "Client", "Server", ...). 105 * (e.g. "Common", "Client", "Server", ...).
111 */ 106 */
112 final String category; 107 final String category;
113 108
114 /** 109 /**
115 * Path to the dart2js library's *.dart file relative to this file 110 * Path to the dart2js library's *.dart file relative to this file
116 * or null if dart2js uses the common library path defined above. 111 * or null if dart2js uses the common library path defined above.
112 *
113 * TODO(lrn): This should go away when the library has been unified.
117 */ 114 */
118 final String dart2jsPath; 115 final String dart2jsPath;
119 116
120 /** 117 /**
121 * Path to the dart2js library's patch file relative to this file 118 * Path to the dart2js library's patch file relative to this file
122 * or null if no dart2js patch file associated with this library. 119 * or null if no dart2js patch file associated with this library.
123 */ 120 */
124 final String dart2jsPatchPath; 121 final String dart2jsPatchPath;
125 122
126 /** 123 /**
127 * True if this library is internal and should not be shown to the user 124 * A [String] representing a specific backend that this library is for.
125 *
126 * Each backend can decide their own name, as long as they are distinct.
127 * A backend should ignore a library that is internal for any other backend
128 * than itself. Internal libraries might contain non-standard syntax.
128 */ 129 */
129 final bool internal; 130 final String internalFor;
131
132 /**
133 * This library is not part of the SDK documentation.
134 */
135 final bool undocumented;
130 136
131 /** 137 /**
132 * True if the library contains implementation details for another library. 138 * True if the library contains implementation details for another library.
133 * The implication is that these libraries are less commonly used 139 * The implication is that these libraries are less commonly used
134 * and that tools like Dart Editor should not show these libraries 140 * and that tools like Dart Editor should not show these libraries
135 * in a list of all libraries unless the user specifically asks the tool to do so. 141 * in a list of all libraries unless the user specifically asks the tool to
136 * (e.g. "coreimpl" contains implementation for the "core" library). 142 * do so. (E.g. "coreimpl" contains implementation for the "core" library).
137 */ 143 */
138 final bool implementation; 144 final bool implementation;
139 145
140 const LibraryInfo(this.path, [this.category = "Shared", 146 const LibraryInfo(this.path, [this.category = "Shared",
141 this.dart2jsPath, this.dart2jsPatchPath, 147 this.dart2jsPath, this.dart2jsPatchPath,
142 this.implementation = false, this.internal = false]); 148 this.implementation = false, this.undocumented = false,
149 this.internalFor]);
150
151 bool get internal => internalFor != null;
143 } 152 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/library_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698