| 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 // TODO(ahe): Long term, it would probably be better if we do not use | 5 // TODO(ahe): Long term, it would probably be better if we do not use |
| 6 // executable code to define the locations of libraries. | 6 // executable code to define the locations of libraries. |
| 7 | 7 |
| 8 #library('library_map'); | 8 #library('library_map'); |
| 9 /** | 9 /** |
| 10 * Simple struct holding the path to a library and an optional path | 10 * Simple struct holding the path to a library and an optional path |
| 11 * to a patch file for the library. | 11 * to a patch file for the library. |
| 12 */ | 12 */ |
| 13 class LibraryInfo { | 13 class LibraryInfo { |
| 14 final String libraryPath; | 14 final String libraryPath; |
| 15 final String patchPath; | 15 final String patchPath; |
| 16 | 16 |
| 17 /** If [:true:], the library is not part of the public API. */ | 17 /** If [:true:], the library is not part of the public API. */ |
| 18 final bool isInternal; | 18 final bool isInternal; |
| 19 | 19 |
| 20 const LibraryInfo(this.libraryPath, | 20 const LibraryInfo(this.libraryPath, |
| 21 [this.patchPath = null, this.isInternal = false]); | 21 [this.patchPath = null, this.isInternal = false]); |
| 22 } | 22 } |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Specifies the location of Dart platform libraries. | 25 * Specifies the location of Dart platform libraries. |
| 26 */ | 26 */ |
| 27 final Map<String, LibraryInfo> DART2JS_LIBRARY_MAP | 27 final Map<String, LibraryInfo> DART2JS_LIBRARY_MAP |
| 28 = const <LibraryInfo> { | 28 = const <String, LibraryInfo> { |
| 29 "core": const LibraryInfo( | 29 "core": const LibraryInfo( |
| 30 "lib/compiler/implementation/lib/core.dart"), | 30 "lib/compiler/implementation/lib/core.dart"), |
| 31 "coreimpl": const LibraryInfo( | 31 "coreimpl": const LibraryInfo( |
| 32 "lib/compiler/implementation/lib/coreimpl.dart", | 32 "lib/compiler/implementation/lib/coreimpl.dart", |
| 33 "lib/compiler/implementation/lib/coreimpl_patch.dart"), | 33 "lib/compiler/implementation/lib/coreimpl_patch.dart"), |
| 34 "_js_helper": const LibraryInfo( | 34 "_js_helper": const LibraryInfo( |
| 35 "lib/compiler/implementation/lib/js_helper.dart", isInternal: true), | 35 "lib/compiler/implementation/lib/js_helper.dart", isInternal: true), |
| 36 "_interceptors": const LibraryInfo( | 36 "_interceptors": const LibraryInfo( |
| 37 "lib/compiler/implementation/lib/interceptors.dart", isInternal: true), | 37 "lib/compiler/implementation/lib/interceptors.dart", isInternal: true), |
| 38 "crypto": const LibraryInfo( | 38 "crypto": const LibraryInfo( |
| 39 "lib/crypto/crypto.dart"), | 39 "lib/crypto/crypto.dart"), |
| 40 "dom_deprecated": const LibraryInfo( | 40 "dom_deprecated": const LibraryInfo( |
| 41 "lib/dom/dart2js/dom_dart2js.dart", isInternal: true), | 41 "lib/dom/dart2js/dom_dart2js.dart", isInternal: true), |
| 42 "html": const LibraryInfo( | 42 "html": const LibraryInfo( |
| 43 "lib/html/dart2js/html_dart2js.dart"), | 43 "lib/html/dart2js/html_dart2js.dart"), |
| 44 "io": const LibraryInfo( | 44 "io": const LibraryInfo( |
| 45 "lib/compiler/implementation/lib/io.dart"), | 45 "lib/compiler/implementation/lib/io.dart"), |
| 46 "isolate": const LibraryInfo( | 46 "isolate": const LibraryInfo( |
| 47 "lib/isolate/isolate_dart2js.dart"), | 47 "lib/isolate/isolate_dart2js.dart"), |
| 48 "json": const LibraryInfo("lib/json/json.dart"), | 48 "json": const LibraryInfo("lib/json/json.dart"), |
| 49 "math": const LibraryInfo( | 49 "math": const LibraryInfo( |
| 50 "lib/math/math.dart", | 50 "lib/math/math.dart", |
| 51 "lib/compiler/implementation/lib/math_patch.dart", isInternal: true), | 51 "lib/compiler/implementation/lib/math_patch.dart", isInternal: true), |
| 52 "uri": const LibraryInfo("lib/uri/uri.dart"), | 52 "uri": const LibraryInfo("lib/uri/uri.dart"), |
| 53 "utf": const LibraryInfo("lib/utf/utf.dart"), | 53 "utf": const LibraryInfo("lib/utf/utf.dart"), |
| 54 "web": const LibraryInfo("lib/web/web.dart"), | 54 "web": const LibraryInfo("lib/web/web.dart"), |
| 55 }; | 55 }; |
| OLD | NEW |