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 #include "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
6 | 6 |
7 #include "bin/extensions.h" | 7 #include "bin/extensions.h" |
8 #include "bin/directory.h" | 8 #include "bin/directory.h" |
9 #include "bin/file.h" | 9 #include "bin/file.h" |
10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
11 #include "platform/assert.h" | 11 #include "platform/assert.h" |
12 #include "platform/globals.h" | 12 #include "platform/globals.h" |
13 | 13 |
14 const char* DartUtils::original_working_directory = NULL; | 14 const char* DartUtils::original_working_directory = NULL; |
15 const char* DartUtils::kDartScheme = "dart:"; | 15 const char* DartUtils::kDartScheme = "dart:"; |
16 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; | 16 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; |
17 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; | 17 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; |
18 const char* DartUtils::kCoreLibURL = "dart:core"; | 18 const char* DartUtils::kCoreLibURL = "dart:core"; |
19 const char* DartUtils::kCoreImplLibURL = "dart:coreimpl"; | 19 const char* DartUtils::kCoreImplLibURL = "dart:coreimpl"; |
20 const char* DartUtils::kCryptoLibURL = "dart:crypto"; | 20 const char* DartUtils::kCryptoLibURL = "dart:crypto"; |
21 const char* DartUtils::kIOLibURL = "dart:io"; | 21 const char* DartUtils::kIOLibURL = "dart:io"; |
| 22 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; |
22 const char* DartUtils::kJsonLibURL = "dart:json"; | 23 const char* DartUtils::kJsonLibURL = "dart:json"; |
23 const char* DartUtils::kUriLibURL = "dart:uri"; | 24 const char* DartUtils::kUriLibURL = "dart:uri"; |
24 const char* DartUtils::kUtfLibURL = "dart:utf"; | 25 const char* DartUtils::kUtfLibURL = "dart:utf"; |
25 const char* DartUtils::kIsolateLibURL = "dart:isolate"; | 26 const char* DartUtils::kIsolateLibURL = "dart:isolate"; |
26 | 27 |
27 | 28 |
28 const char* DartUtils::kIdFieldName = "_id"; | 29 const char* DartUtils::kIdFieldName = "_id"; |
29 | 30 |
30 | 31 |
31 static bool IsWindowsHost() { | 32 static bool IsWindowsHost() { |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 656 |
656 CObject* CObject::NewOSError(OSError* os_error) { | 657 CObject* CObject::NewOSError(OSError* os_error) { |
657 CObject* error_message = | 658 CObject* error_message = |
658 new CObjectString(CObject::NewString(os_error->message())); | 659 new CObjectString(CObject::NewString(os_error->message())); |
659 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); | 660 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); |
660 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); | 661 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); |
661 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); | 662 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); |
662 result->SetAt(2, error_message); | 663 result->SetAt(2, error_message); |
663 return result; | 664 return result; |
664 } | 665 } |
OLD | NEW |