| 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 /** | |
| 10 * Simple struct holding the path to a library and an optional path | |
| 11 * to a patch file for the library. | |
| 12 */ | |
| 13 class LibraryPatchPath { | |
| 14 final String libraryPath; | |
| 15 final String patchPath; | |
| 16 const LibraryPatchPath(this.libraryPath, this.patchPath); | |
| 17 } | |
| 18 | 9 |
| 19 /** | 10 /** |
| 20 * Specifies the location of Dart platform libraries. | 11 * Specifies the location of Dart platform libraries. |
| 21 */ | 12 */ |
| 22 final Map<String,LibraryPatchPath> DART2JS_LIBRARY_MAP | 13 final Map<String,String> DART2JS_LIBRARY_MAP = const <String> { |
| 23 = const <LibraryPatchPath> { | 14 "core": "lib/compiler/implementation/lib/core.dart", |
| 24 "core": const LibraryPatchPath( | 15 "coreimpl": "lib/compiler/implementation/lib/coreimpl.dart", |
| 25 "lib/compiler/implementation/lib/core.dart", null), | 16 "_js_helper": "lib/compiler/implementation/lib/js_helper.dart", |
| 26 "coreimpl": const LibraryPatchPath( | 17 "_interceptors": "lib/compiler/implementation/lib/interceptors.dart", |
| 27 "lib/compiler/implementation/lib/coreimpl.dart", null), | 18 "crypto": "lib/crypto/crypto.dart", |
| 28 "_js_helper": const LibraryPatchPath( | 19 "dom_deprecated": "lib/dom/frog/dom_frog.dart", |
| 29 "lib/compiler/implementation/lib/js_helper.dart", null), | 20 "html": "lib/html/frog/html_frog.dart", |
| 30 "_interceptors": const LibraryPatchPath( | 21 "io": "lib/compiler/implementation/lib/io.dart", |
| 31 "lib/compiler/implementation/lib/interceptors.dart", null), | 22 "isolate": "lib/isolate/isolate_leg.dart", |
| 32 "crypto": const LibraryPatchPath( | 23 "json": "lib/json/json.dart", |
| 33 "lib/crypto/crypto.dart", null), | 24 "uri": "lib/uri/uri.dart", |
| 34 "dom_deprecated": const LibraryPatchPath( | 25 "utf": "lib/utf/utf.dart", |
| 35 "lib/dom/frog/dom_frog.dart", null), | 26 "web": "lib/web/web.dart", |
| 36 "html": const LibraryPatchPath( | |
| 37 "lib/html/frog/html_frog.dart", null), | |
| 38 "io": const LibraryPatchPath( | |
| 39 "lib/compiler/implementation/lib/io.dart", null), | |
| 40 "isolate": const LibraryPatchPath( | |
| 41 "lib/isolate/isolate_leg.dart", null), | |
| 42 "json": const LibraryPatchPath( | |
| 43 "lib/json/json.dart", null), | |
| 44 "uri": const LibraryPatchPath( | |
| 45 "lib/uri/uri.dart", null), | |
| 46 "utf": const LibraryPatchPath( | |
| 47 "lib/utf/utf.dart", null), | |
| 48 "web": const LibraryPatchPath( | |
| 49 "lib/compiler/implementation/lib/web.dart", | |
| 50 "lib/compiler/implementation/lib/web.dartp"), | |
| 51 }; | 27 }; |
| OLD | NEW |