| 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 // TODO(whesse): Replace uses of Platform with uses of internal _Platform | |
| 317 // class, to prepare for removal of (deprecated) Platform class. | |
| 318 // Also merge _Platform and _PlatformHook class into _Platform class | |
| 319 // at that time, since _PlatformHook is the only user of _Platform. | |
| 320 int get numberOfProcessors => Platform.numberOfProcessors; | |
| 321 String get pathSeparator => Platform.pathSeparator; | |
| 322 String get operatingSystem => Platform.operatingSystem; | |
| 323 String get localHostname => Platform.localHostname; | |
| 324 String get version => Platform.version; | |
| 325 Map<String, String> get environment => Platform.environment; | |
| 326 Uri get script => new Uri.file(Platform.script); | |
| 327 String get executable => Platform.executable; | |
| 328 List<String> get executableArguments => Platform.executableArguments; | |
| 329 String get packageRoot => Platform.packageRoot; | |
| 330 } | |
| 331 | |
| 332 | |
| 333 _getPlatform() => new _PlatformHook(); | |
| 334 | |
| 335 | |
| 336 | |
| OLD | NEW |