OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library mojo_builtin; | 5 library mojo_builtin; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 import 'dart:_internal'; | 9 //import 'dart:_internal'; |
10 import 'dart:mojo_core'; | 10 import 'mojo:core'; |
11 // import 'root_library'; happens here from C Code | 11 // import 'root_library'; happens here from C Code |
12 | 12 |
13 // The root library (aka the script) is imported into this library. The | 13 // The root library (aka the script) is imported into this library. The |
14 // embedder uses this to lookup the main entrypoint in the root library's | 14 // embedder uses this to lookup the main entrypoint in the root library's |
15 // namespace. | 15 // namespace. |
16 Function _getMainClosure() => main; | 16 Function _getMainClosure() => main; |
17 | 17 |
18 | 18 |
19 // Corelib 'print' implementation. | 19 // Corelib 'print' implementation. |
20 void _print(arg) { | 20 void _print(arg) { |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // _loadScript(tag, uri, libraryUri, data); | 241 // _loadScript(tag, uri, libraryUri, data); |
242 // }); | 242 // }); |
243 throw 'Cannot load http, yet.'; | 243 throw 'Cannot load http, yet.'; |
244 } else { | 244 } else { |
245 // Mojo does not expose any asynchronous file IO calls, but we'll maintain | 245 // Mojo does not expose any asynchronous file IO calls, but we'll maintain |
246 // the same structure as the standalone embedder here in case it ever does. | 246 // the same structure as the standalone embedder here in case it ever does. |
247 var data = readSync(resourceUri.toFilePath()); | 247 var data = readSync(resourceUri.toFilePath()); |
248 _loadScript(tag, uri, libraryUri, data); | 248 _loadScript(tag, uri, libraryUri, data); |
249 } | 249 } |
250 } | 250 } |
OLD | NEW |