| 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 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; | 26 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; |
| 27 const char* DartUtils::kAsyncLibURL = "dart:async"; | 27 const char* DartUtils::kAsyncLibURL = "dart:async"; |
| 28 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; | 28 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; |
| 29 const char* DartUtils::kCollectionDevLibURL = "dart:_collection-dev"; | 29 const char* DartUtils::kCollectionDevLibURL = "dart:_collection-dev"; |
| 30 const char* DartUtils::kCoreLibURL = "dart:core"; | 30 const char* DartUtils::kCoreLibURL = "dart:core"; |
| 31 const char* DartUtils::kIsolateLibURL = "dart:isolate"; | 31 const char* DartUtils::kIsolateLibURL = "dart:isolate"; |
| 32 const char* DartUtils::kIOLibURL = "dart:io"; | 32 const char* DartUtils::kIOLibURL = "dart:io"; |
| 33 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; | 33 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; |
| 34 const char* DartUtils::kUriLibURL = "dart:uri"; | 34 const char* DartUtils::kUriLibURL = "dart:uri"; |
| 35 const char* DartUtils::kHttpScheme = "http:"; | 35 const char* DartUtils::kHttpScheme = "http:"; |
| 36 const char* DartUtils::kVMServiceLibURL = "dart:vmservice"; |
| 36 | 37 |
| 37 const char* DartUtils::kIdFieldName = "_id"; | 38 const char* DartUtils::kIdFieldName = "_id"; |
| 38 | 39 |
| 39 uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc }; | 40 uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc }; |
| 40 | 41 |
| 41 static bool IsWindowsHost() { | 42 static bool IsWindowsHost() { |
| 42 #if defined(TARGET_OS_WINDOWS) | 43 #if defined(TARGET_OS_WINDOWS) |
| 43 return true; | 44 return true; |
| 44 #else // defined(TARGET_OS_WINDOWS) | 45 #else // defined(TARGET_OS_WINDOWS) |
| 45 return false; | 46 return false; |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 new CObjectString(CObject::NewString(os_error->message())); | 1077 new CObjectString(CObject::NewString(os_error->message())); |
| 1077 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); | 1078 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); |
| 1078 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); | 1079 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); |
| 1079 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); | 1080 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); |
| 1080 result->SetAt(2, error_message); | 1081 result->SetAt(2, error_message); |
| 1081 return result; | 1082 return result; |
| 1082 } | 1083 } |
| 1083 | 1084 |
| 1084 } // namespace bin | 1085 } // namespace bin |
| 1085 } // namespace dart | 1086 } // namespace dart |
| OLD | NEW |