| 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 "async": const LibraryInfo( | 25 "async": const LibraryInfo( |
| 26 "async/async.dart", | 26 "async/async.dart", |
| 27 dart2jsPatchPath: "_internal/compiler/implementation/lib/async_patch.dart"
), | 27 dart2jsPatchPath: "_internal/lib/async_patch.dart"), |
| 28 | 28 |
| 29 "chrome": const LibraryInfo( | 29 "chrome": const LibraryInfo( |
| 30 "chrome/dart2js/chrome_dart2js.dart", | 30 "chrome/dart2js/chrome_dart2js.dart", |
| 31 category: "Client"), | 31 category: "Client"), |
| 32 | 32 |
| 33 "collection": const LibraryInfo( | 33 "collection": const LibraryInfo( |
| 34 "collection/collection.dart", | 34 "collection/collection.dart", |
| 35 dart2jsPatchPath: "_internal/compiler/implementation/lib/collection_patch.
dart"), | 35 dart2jsPatchPath: "_internal/lib/collection_patch.dart"), |
| 36 | 36 |
| 37 "core": const LibraryInfo( | 37 "core": const LibraryInfo( |
| 38 "core/core.dart", | 38 "core/core.dart", |
| 39 dart2jsPatchPath: "_internal/compiler/implementation/lib/core_patch.dart")
, | 39 dart2jsPatchPath: "_internal/lib/core_patch.dart"), |
| 40 | 40 |
| 41 "html": const LibraryInfo( | 41 "html": const LibraryInfo( |
| 42 "html/dartium/html_dartium.dart", | 42 "html/dartium/html_dartium.dart", |
| 43 category: "Client", | 43 category: "Client", |
| 44 dart2jsPath: "html/dart2js/html_dart2js.dart"), | 44 dart2jsPath: "html/dart2js/html_dart2js.dart"), |
| 45 | 45 |
| 46 "html_common": const LibraryInfo( | 46 "html_common": const LibraryInfo( |
| 47 "html/html_common/html_common.dart", | 47 "html/html_common/html_common.dart", |
| 48 category: "Client", | 48 category: "Client", |
| 49 dart2jsPath: "html/html_common/html_common_dart2js.dart", | 49 dart2jsPath: "html/html_common/html_common_dart2js.dart", |
| 50 documented: false, | 50 documented: false, |
| 51 implementation: true), | 51 implementation: true), |
| 52 | 52 |
| 53 "indexed_db": const LibraryInfo( | 53 "indexed_db": const LibraryInfo( |
| 54 "indexed_db/dartium/indexed_db_dartium.dart", | 54 "indexed_db/dartium/indexed_db_dartium.dart", |
| 55 category: "Client", | 55 category: "Client", |
| 56 dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"), | 56 dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"), |
| 57 | 57 |
| 58 "io": const LibraryInfo( | 58 "io": const LibraryInfo( |
| 59 "io/io.dart", | 59 "io/io.dart", |
| 60 category: "Server", | 60 category: "Server", |
| 61 dart2jsPatchPath: "_internal/compiler/implementation/lib/io_patch.dart"), | 61 dart2jsPatchPath: "_internal/lib/io_patch.dart"), |
| 62 | 62 |
| 63 "isolate": const LibraryInfo( | 63 "isolate": const LibraryInfo( |
| 64 "isolate/isolate.dart", | 64 "isolate/isolate.dart", |
| 65 dart2jsPatchPath: "_internal/compiler/implementation/lib/isolate_patch.dar
t"), | 65 dart2jsPatchPath: "_internal/lib/isolate_patch.dart"), |
| 66 | 66 |
| 67 "json": const LibraryInfo( | 67 "json": const LibraryInfo( |
| 68 "json/json.dart", | 68 "json/json.dart", |
| 69 dart2jsPatchPath: "_internal/compiler/implementation/lib/json_patch.dart")
, | 69 dart2jsPatchPath: "_internal/lib/json_patch.dart"), |
| 70 | 70 |
| 71 "math": const LibraryInfo( | 71 "math": const LibraryInfo( |
| 72 "math/math.dart", | 72 "math/math.dart", |
| 73 dart2jsPatchPath: "_internal/compiler/implementation/lib/math_patch.dart")
, | 73 dart2jsPatchPath: "_internal/lib/math_patch.dart"), |
| 74 | 74 |
| 75 "mirrors": const LibraryInfo( | 75 "mirrors": const LibraryInfo( |
| 76 "mirrors/mirrors.dart", | 76 "mirrors/mirrors.dart", |
| 77 dart2jsPatchPath: "_internal/compiler/implementation/lib/mirrors_patch.dar
t"), | 77 dart2jsPatchPath: "_internal/lib/mirrors_patch.dart"), |
| 78 | 78 |
| 79 "nativewrappers": const LibraryInfo( | 79 "nativewrappers": const LibraryInfo( |
| 80 "html/dartium/nativewrappers.dart", | 80 "html/dartium/nativewrappers.dart", |
| 81 category: "Client", | 81 category: "Client", |
| 82 implementation: true, | 82 implementation: true, |
| 83 documented: false, | 83 documented: false, |
| 84 platforms: VM_PLATFORM), | 84 platforms: VM_PLATFORM), |
| 85 | 85 |
| 86 "mdv_observe_impl": const LibraryInfo( | 86 "mdv_observe_impl": const LibraryInfo( |
| 87 "mdv_observe_impl/mdv_observe_impl.dart", | 87 "mdv_observe_impl/mdv_observe_impl.dart", |
| (...skipping 26 matching lines...) Expand all Loading... |
| 114 "web_sql": const LibraryInfo( | 114 "web_sql": const LibraryInfo( |
| 115 "web_sql/dartium/web_sql_dartium.dart", | 115 "web_sql/dartium/web_sql_dartium.dart", |
| 116 category: "Client", | 116 category: "Client", |
| 117 dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"), | 117 dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"), |
| 118 | 118 |
| 119 "_collection-dev": const LibraryInfo( | 119 "_collection-dev": const LibraryInfo( |
| 120 "_collection_dev/collection_dev.dart", | 120 "_collection_dev/collection_dev.dart", |
| 121 category: "Internal", | 121 category: "Internal", |
| 122 documented: false, | 122 documented: false, |
| 123 dart2jsPatchPath: | 123 dart2jsPatchPath: |
| 124 "_internal/compiler/implementation/lib/collection_dev_patch.dart"), | 124 "_internal/lib/collection_dev_patch.dart"), |
| 125 | 125 |
| 126 "_js_helper": const LibraryInfo( | 126 "_js_helper": const LibraryInfo( |
| 127 "_internal/compiler/implementation/lib/js_helper.dart", | 127 "_internal/lib/js_helper.dart", |
| 128 category: "Internal", | 128 category: "Internal", |
| 129 documented: false, | 129 documented: false, |
| 130 platforms: DART2JS_PLATFORM), | 130 platforms: DART2JS_PLATFORM), |
| 131 | 131 |
| 132 "_interceptors": const LibraryInfo( | 132 "_interceptors": const LibraryInfo( |
| 133 "_internal/compiler/implementation/lib/interceptors.dart", | 133 "_internal/lib/interceptors.dart", |
| 134 category: "Internal", | 134 category: "Internal", |
| 135 documented: false, | 135 documented: false, |
| 136 platforms: DART2JS_PLATFORM), | 136 platforms: DART2JS_PLATFORM), |
| 137 | 137 |
| 138 "_foreign_helper": const LibraryInfo( | 138 "_foreign_helper": const LibraryInfo( |
| 139 "_internal/compiler/implementation/lib/foreign_helper.dart", | 139 "_internal/lib/foreign_helper.dart", |
| 140 category: "Internal", | 140 category: "Internal", |
| 141 documented: false, | 141 documented: false, |
| 142 platforms: DART2JS_PLATFORM), | 142 platforms: DART2JS_PLATFORM), |
| 143 | 143 |
| 144 "_isolate_helper": const LibraryInfo( | 144 "_isolate_helper": const LibraryInfo( |
| 145 "_internal/compiler/implementation/lib/isolate_helper.dart", | 145 "_internal/lib/isolate_helper.dart", |
| 146 category: "Internal", | 146 category: "Internal", |
| 147 documented: false, | 147 documented: false, |
| 148 platforms: DART2JS_PLATFORM), | 148 platforms: DART2JS_PLATFORM), |
| 149 | 149 |
| 150 "_js_mirrors": const LibraryInfo( | 150 "_js_mirrors": const LibraryInfo( |
| 151 "_internal/compiler/implementation/lib/js_mirrors.dart", | 151 "_internal/lib/js_mirrors.dart", |
| 152 category: "Internal", | 152 category: "Internal", |
| 153 documented: false, | 153 documented: false, |
| 154 platforms: DART2JS_PLATFORM), | 154 platforms: DART2JS_PLATFORM), |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 /** | 157 /** |
| 158 * Information about a "dart:" library. | 158 * Information about a "dart:" library. |
| 159 */ | 159 */ |
| 160 class LibraryInfo { | 160 class LibraryInfo { |
| 161 | 161 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 this.category: "Shared", | 209 this.category: "Shared", |
| 210 this.dart2jsPath, | 210 this.dart2jsPath, |
| 211 this.dart2jsPatchPath, | 211 this.dart2jsPatchPath, |
| 212 this.implementation: false, | 212 this.implementation: false, |
| 213 this.documented: true, | 213 this.documented: true, |
| 214 this.platforms: DART2JS_PLATFORM | VM_PLATFORM}); | 214 this.platforms: DART2JS_PLATFORM | VM_PLATFORM}); |
| 215 | 215 |
| 216 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; | 216 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; |
| 217 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; | 217 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; |
| 218 } | 218 } |
| OLD | NEW |