Chromium Code Reviews| 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 | 7 |
| 8 // Corelib 'print' implementation. | 8 // Corelib 'print' implementation. |
| 9 void _print(arg) { | 9 void _print(arg) { |
| 10 _Logger._printString(arg.toString()); | 10 _Logger._printString(arg.toString()); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 } | 303 } |
| 304 _logResolution('# Package: $uri -> $path'); | 304 _logResolution('# Package: $uri -> $path'); |
| 305 return path; | 305 return path; |
| 306 } | 306 } |
| 307 | 307 |
| 308 | 308 |
| 309 String _filePathFromHttpUri(Uri uri) { | 309 String _filePathFromHttpUri(Uri uri) { |
| 310 _logResolution('# Path: $uri -> $uri'); | 310 _logResolution('# Path: $uri -> $uri'); |
| 311 return uri.toString(); | 311 return uri.toString(); |
| 312 } | 312 } |
| 313 | |
| 314 | |
| 315 class _PlatformHook { | |
| 316 int get numberOfProcessors => Platform.numberOfProcessors; | |
|
Ivan Posva
2013/10/25 17:26:44
I am assuming that we will remove the Platform fro
Bill Hesse
2013/10/25 17:50:00
Comment added in CL 43773004.
| |
| 317 String get pathSeparator => Platform.pathSeparator; | |
| 318 String get operatingSystem => Platform.operatingSystem; | |
| 319 String get localHostname => Platform.localHostname; | |
| 320 String get version => Platform.version; | |
| 321 Map<String, String> get environment => Platform.environment; | |
| 322 Uri get script => new Uri.file(Platform.script); | |
| 323 String get executable => Platform.executable; | |
| 324 List<String> get executableArguments => Platform.executableArguments; | |
| 325 String get packageRoot => Platform.packageRoot; | |
| 326 } | |
| 327 | |
| 328 | |
| 329 _getPlatform() => new _PlatformHook(); | |
| 330 | |
| 331 | |
| 332 | |
| OLD | NEW |