| 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 <LibraryInfo> { | 23 const Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> { |
| 24 | 24 |
| 25 "core": const LibraryInfo( | 25 "core": const LibraryInfo( |
| 26 "core/core.dart", | 26 "core/core.dart", |
| 27 dart2jsPath: "compiler/implementation/lib/core.dart", | |
| 28 dart2jsPatchPath: "compiler/implementation/lib/core_patch.dart"), | 27 dart2jsPatchPath: "compiler/implementation/lib/core_patch.dart"), |
| 29 | 28 |
| 30 "coreimpl": const LibraryInfo( | 29 "coreimpl": const LibraryInfo( |
| 31 "coreimpl/coreimpl.dart", | 30 "coreimpl/coreimpl.dart", |
| 32 implementation: true, | 31 implementation: true, |
| 33 dart2jsPath: "compiler/implementation/lib/coreimpl.dart", | |
| 34 dart2jsPatchPath: "compiler/implementation/lib/coreimpl_patch.dart"), | 32 dart2jsPatchPath: "compiler/implementation/lib/coreimpl_patch.dart"), |
| 35 | 33 |
| 36 "crypto": const LibraryInfo( | 34 "crypto": const LibraryInfo( |
| 37 "crypto/crypto.dart"), | 35 "crypto/crypto.dart"), |
| 38 | 36 |
| 39 "html": const LibraryInfo( | 37 "html": const LibraryInfo( |
| 40 "html/dartium/html_dartium.dart", | 38 "html/dartium/html_dartium.dart", |
| 41 category: "Client", | 39 category: "Client", |
| 42 dart2jsPath: "html/dart2js/html_dart2js.dart"), | 40 dart2jsPath: "html/dart2js/html_dart2js.dart"), |
| 43 | 41 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 this.category = "Shared", | 140 this.category = "Shared", |
| 143 this.dart2jsPath, | 141 this.dart2jsPath, |
| 144 this.dart2jsPatchPath, | 142 this.dart2jsPatchPath, |
| 145 this.implementation = false, | 143 this.implementation = false, |
| 146 this.documented = true, | 144 this.documented = true, |
| 147 this.platforms = DART2JS_PLATFORM | VM_PLATFORM]); | 145 this.platforms = DART2JS_PLATFORM | VM_PLATFORM]); |
| 148 | 146 |
| 149 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; | 147 bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; |
| 150 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; | 148 bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; |
| 151 } | 149 } |
| OLD | NEW |