| 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 "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| 11 | 11 |
| 12 #include "bin/extensions.h" | 12 #include "bin/extensions.h" |
| 13 #include "bin/directory.h" | 13 #include "bin/directory.h" |
| 14 #include "bin/file.h" | 14 #include "bin/file.h" |
| 15 #include "bin/io_buffer.h" | 15 #include "bin/io_buffer.h" |
| 16 #include "bin/utils.h" | 16 #include "bin/utils.h" |
| 17 | 17 |
| 18 namespace dart { | 18 namespace dart { |
| 19 namespace bin { | 19 namespace bin { |
| 20 | 20 |
| 21 const char* DartUtils::original_working_directory = NULL; | 21 const char* DartUtils::original_working_directory = NULL; |
| 22 const char* DartUtils::kDartScheme = "dart:"; | 22 const char* DartUtils::kDartScheme = "dart:"; |
| 23 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; | 23 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; |
| 24 const char* DartUtils::kAsyncLibURL = "dart:async"; | 24 const char* DartUtils::kAsyncLibURL = "dart:async"; |
| 25 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; | 25 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; |
| 26 const char* DartUtils::kCoreLibURL = "dart:core"; | 26 const char* DartUtils::kCoreLibURL = "dart:core"; |
| 27 const char* DartUtils::kIOLibURL = "dart:io"; | 27 const char* DartUtils::kIOLibURL = "dart:io"; |
| 28 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; | 28 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; |
| 29 const char* DartUtils::kUriLibURL = "dart:uri"; | |
| 30 | 29 |
| 31 const char* DartUtils::kIdFieldName = "_id"; | 30 const char* DartUtils::kIdFieldName = "_id"; |
| 32 | 31 |
| 33 uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc }; | 32 uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc }; |
| 34 | 33 |
| 35 static bool IsWindowsHost() { | 34 static bool IsWindowsHost() { |
| 36 #if defined(TARGET_OS_WINDOWS) | 35 #if defined(TARGET_OS_WINDOWS) |
| 37 return true; | 36 return true; |
| 38 #else // defined(TARGET_OS_WINDOWS) | 37 #else // defined(TARGET_OS_WINDOWS) |
| 39 return false; | 38 return false; |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 new CObjectString(CObject::NewString(os_error->message())); | 806 new CObjectString(CObject::NewString(os_error->message())); |
| 808 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); | 807 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); |
| 809 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); | 808 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); |
| 810 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); | 809 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); |
| 811 result->SetAt(2, error_message); | 810 result->SetAt(2, error_message); |
| 812 return result; | 811 return result; |
| 813 } | 812 } |
| 814 | 813 |
| 815 } // namespace bin | 814 } // namespace bin |
| 816 } // namespace dart | 815 } // namespace dart |
| OLD | NEW |