| 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 LibraryPatchPath { | 13 class LibraryInfo { |
| 14 final String libraryPath; | 14 final String libraryPath; |
| 15 final String patchPath; | 15 final String patchPath; |
| 16 const LibraryPatchPath(this.libraryPath, this.patchPath); | 16 |
| 17 /** If [:true:], the library is not part of the public API. */ |
| 18 final bool isInternal; |
| 19 |
| 20 const LibraryInfo(this.libraryPath, |
| 21 [this.patchPath = null, this.isInternal = false]); |
| 17 } | 22 } |
| 18 | 23 |
| 19 /** | 24 /** |
| 20 * Specifies the location of Dart platform libraries. | 25 * Specifies the location of Dart platform libraries. |
| 21 */ | 26 */ |
| 22 final Map<String,LibraryPatchPath> DART2JS_LIBRARY_MAP | 27 final Map<String, LibraryInfo> DART2JS_LIBRARY_MAP |
| 23 = const <LibraryPatchPath> { | 28 = const <LibraryInfo> { |
| 24 "core": const LibraryPatchPath( | 29 "core": const LibraryInfo( |
| 25 "lib/compiler/implementation/lib/core.dart", null), | 30 "lib/compiler/implementation/lib/core.dart"), |
| 26 "coreimpl": const LibraryPatchPath( | 31 "coreimpl": const LibraryInfo( |
| 27 "lib/compiler/implementation/lib/coreimpl.dart", null), | 32 "lib/compiler/implementation/lib/coreimpl.dart"), |
| 28 "_js_helper": const LibraryPatchPath( | 33 "_js_helper": const LibraryInfo( |
| 29 "lib/compiler/implementation/lib/js_helper.dart", null), | 34 "lib/compiler/implementation/lib/js_helper.dart", isInternal: true), |
| 30 "_interceptors": const LibraryPatchPath( | 35 "_interceptors": const LibraryInfo( |
| 31 "lib/compiler/implementation/lib/interceptors.dart", null), | 36 "lib/compiler/implementation/lib/interceptors.dart", isInternal: true), |
| 32 "crypto": const LibraryPatchPath( | 37 "crypto": const LibraryInfo( |
| 33 "lib/crypto/crypto.dart", null), | 38 "lib/crypto/crypto.dart"), |
| 34 "dom_deprecated": const LibraryPatchPath( | 39 "dom_deprecated": const LibraryInfo( |
| 35 "lib/dom/frog/dom_frog.dart", null), | 40 "lib/dom/frog/dom_frog.dart", isInternal: true), |
| 36 "html": const LibraryPatchPath( | 41 "html": const LibraryInfo( |
| 37 "lib/html/frog/html_frog.dart", null), | 42 "lib/html/frog/html_frog.dart"), |
| 38 "io": const LibraryPatchPath( | 43 "io": const LibraryInfo( |
| 39 "lib/compiler/implementation/lib/io.dart", null), | 44 "lib/compiler/implementation/lib/io.dart"), |
| 40 "isolate": const LibraryPatchPath( | 45 "isolate": const LibraryInfo( |
| 41 "lib/isolate/isolate_leg.dart", null), | 46 "lib/isolate/isolate_leg.dart"), |
| 42 "json": const LibraryPatchPath( | 47 "json": const LibraryInfo( |
| 43 "lib/json/json.dart", null), | 48 "lib/json/json.dart"), |
| 44 "math": const LibraryPatchPath( | 49 "math": const LibraryInfo( |
| 45 "corelib/unified/math/math.dart", | 50 "corelib/unified/math/math.dart", |
| 46 "lib/compiler/implementation/lib/math.dartp"), | 51 "lib/compiler/implementation/lib/math.dartp", isInternal: true), |
| 47 "uri": const LibraryPatchPath( | 52 "uri": const LibraryInfo( |
| 48 "lib/uri/uri.dart", null), | 53 "lib/uri/uri.dart"), |
| 49 "utf": const LibraryPatchPath( | 54 "utf": const LibraryInfo( |
| 50 "lib/utf/utf.dart", null), | 55 "lib/utf/utf.dart"), |
| 51 "web": const LibraryPatchPath( | 56 "web": const LibraryInfo( |
| 52 "lib/web/web.dart", null), | 57 "lib/web/web.dart"), |
| 53 }; | 58 }; |
| OLD | NEW |