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 builtin; | 5 library builtin; |
6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 // import 'root_library'; happens here from C Code |
| 8 |
| 9 // The root library (aka the script) is imported into this library. The |
| 10 // standalone embedder uses this to lookup the main entrypoint in the |
| 11 // root library's namespace. |
| 12 Function _getMainClosure() => main; |
| 13 |
7 | 14 |
8 // Corelib 'print' implementation. | 15 // Corelib 'print' implementation. |
9 void _print(arg) { | 16 void _print(arg) { |
10 _Logger._printString(arg.toString()); | 17 _Logger._printString(arg.toString()); |
11 } | 18 } |
12 | 19 |
13 | 20 |
14 class _Logger { | 21 class _Logger { |
15 static void _printString(String s) native "Logger_PrintString"; | 22 static void _printString(String s) native "Logger_PrintString"; |
16 } | 23 } |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } | 311 } |
305 _logResolution('# Package: $uri -> $path'); | 312 _logResolution('# Package: $uri -> $path'); |
306 return path; | 313 return path; |
307 } | 314 } |
308 | 315 |
309 | 316 |
310 String _filePathFromHttpUri(Uri uri) { | 317 String _filePathFromHttpUri(Uri uri) { |
311 _logResolution('# Path: $uri -> $uri'); | 318 _logResolution('# Path: $uri -> $uri'); |
312 return uri.toString(); | 319 return uri.toString(); |
313 } | 320 } |
OLD | NEW |