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 /** | 5 /** |
6 * An code reader that abstracts away the distinction between internal and user | 6 * An code reader that abstracts away the distinction between internal and user |
7 * libraries. | 7 * libraries. |
8 */ | 8 */ |
9 class LibraryReader { | 9 class LibraryReader { |
10 Map _specialLibs; | 10 Map _specialLibs; |
(...skipping 16 matching lines...) Expand all Loading... |
27 'compiler/implementation/lib/io.dart'), | 27 'compiler/implementation/lib/io.dart'), |
28 'dart:isolate': joinPaths(options.libDir, | 28 'dart:isolate': joinPaths(options.libDir, |
29 'isolate/isolate_frog.dart'), | 29 'isolate/isolate_frog.dart'), |
30 'dart:uri': joinPaths(options.libDir, | 30 'dart:uri': joinPaths(options.libDir, |
31 'uri/uri.dart'), | 31 'uri/uri.dart'), |
32 'dart:utf': joinPaths(options.libDir, | 32 'dart:utf': joinPaths(options.libDir, |
33 'utf/utf.dart'), | 33 'utf/utf.dart'), |
34 }; | 34 }; |
35 } else if (options.config == 'sdk') { | 35 } else if (options.config == 'sdk') { |
36 _specialLibs = { | 36 _specialLibs = { |
37 'dart:core': joinPaths(options.libDir, 'core/core_frog.dart'), | 37 'dart:core': joinPaths(options.libDir, |
| 38 'dartdoc/frog/lib/corelib.dart'), |
38 'dart:coreimpl': joinPaths(options.libDir, | 39 'dart:coreimpl': joinPaths(options.libDir, |
39 'coreimpl/coreimpl_frog.dart'), | 40 'dartdoc/frog/lib/corelib_impl.dart'), |
40 'dart:html': joinPaths(options.libDir, 'html/html_frog.dart'), | 41 'dart:html': joinPaths(options.libDir, |
41 'dart:dom_deprecated': joinPaths(options.libDir, 'dom/dom_frog.dart'), | 42 'html/html_frog.dart'), |
| 43 'dart:dom_deprecated': joinPaths(options.libDir, |
| 44 'dom/dom_frog.dart'), |
42 // TODO(rnystrom): How should we handle dart:io here? | 45 // TODO(rnystrom): How should we handle dart:io here? |
43 'dart:isolate': joinPaths(options.libDir, 'isolate/isolate_frog.dart'), | 46 'dart:isolate': joinPaths(options.libDir, |
44 'dart:crypto': joinPaths(options.libDir, 'crypto/crypto.dart'), | 47 'isolate/isolate_frog.dart'), |
45 'dart:json': joinPaths(options.libDir, 'json/json_frog.dart'), | 48 'dart:crypto': joinPaths(options.libDir, |
46 'dart:uri': joinPaths(options.libDir, 'uri/uri.dart'), | 49 'crypto/crypto.dart'), |
47 'dart:utf': joinPaths(options.libDir, 'utf/utf.dart'), | 50 'dart:json': joinPaths(options.libDir, |
| 51 'json/json_frog.dart'), |
| 52 'dart:uri': joinPaths(options.libDir, |
| 53 'uri/uri.dart'), |
| 54 'dart:utf': joinPaths(options.libDir, |
| 55 'utf/utf.dart'), |
48 }; | 56 }; |
49 } else { | 57 } else { |
50 world.error('Invalid configuration ${options.config}'); | 58 world.error('Invalid configuration ${options.config}'); |
51 } | 59 } |
52 } | 60 } |
53 | 61 |
54 SourceFile readFile(String fullName) { | 62 SourceFile readFile(String fullName) { |
55 String filename; | 63 String filename; |
56 | 64 |
57 | 65 |
(...skipping 15 matching lines...) Expand all Loading... |
73 | 81 |
74 if (world.files.fileExists(filename)) { | 82 if (world.files.fileExists(filename)) { |
75 // TODO(jimhug): Should we cache these based on time stamps here? | 83 // TODO(jimhug): Should we cache these based on time stamps here? |
76 return new SourceFile(filename, world.files.readAll(filename)); | 84 return new SourceFile(filename, world.files.readAll(filename)); |
77 } else { | 85 } else { |
78 world.error('File not found: $filename', null); | 86 world.error('File not found: $filename', null); |
79 return new SourceFile(filename, ''); | 87 return new SourceFile(filename, ''); |
80 } | 88 } |
81 } | 89 } |
82 } | 90 } |
OLD | NEW |