| 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 #ifndef BIN_DARTUTILS_H_ | 5 #ifndef BIN_DARTUTILS_H_ |
| 6 #define BIN_DARTUTILS_H_ | 6 #define BIN_DARTUTILS_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // Create a new Dart String object from a C String. | 138 // Create a new Dart String object from a C String. |
| 139 static Dart_Handle NewString(const char* str) { | 139 static Dart_Handle NewString(const char* str) { |
| 140 ASSERT(str != NULL); | 140 ASSERT(str != NULL); |
| 141 return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), | 141 return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), |
| 142 strlen(str)); | 142 strlen(str)); |
| 143 } | 143 } |
| 144 | 144 |
| 145 static void SetOriginalWorkingDirectory(); | 145 static void SetOriginalWorkingDirectory(); |
| 146 | 146 |
| 147 static const char* MapLibraryUrl(CommandLineOptions* url_mapping, |
| 148 const char* url_string); |
| 149 |
| 150 static Dart_Handle ResolveScriptUri(Dart_Handle script_uri, |
| 151 Dart_Handle builtin_lib); |
| 152 |
| 153 static Dart_Handle FilePathFromUri(Dart_Handle script_uri, |
| 154 Dart_Handle builtin_lib); |
| 155 |
| 156 static Dart_Handle ResolveUri(Dart_Handle library_url, |
| 157 Dart_Handle url, |
| 158 Dart_Handle builtin_lib); |
| 159 |
| 147 // Global state that stores the original working directory.. | 160 // Global state that stores the original working directory.. |
| 148 static const char* original_working_directory; | 161 static const char* original_working_directory; |
| 149 | 162 |
| 150 static const char* kDartScheme; | 163 static const char* kDartScheme; |
| 151 static const char* kDartExtensionScheme; | 164 static const char* kDartExtensionScheme; |
| 152 static const char* kBuiltinLibURL; | 165 static const char* kBuiltinLibURL; |
| 153 static const char* kCoreLibURL; | 166 static const char* kCoreLibURL; |
| 154 static const char* kCryptoLibURL; | 167 static const char* kCryptoLibURL; |
| 155 static const char* kIOLibURL; | 168 static const char* kIOLibURL; |
| 156 static const char* kIOLibPatchURL; | 169 static const char* kIOLibPatchURL; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } | 408 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } |
| 396 Dart_PeerFinalizer Callback() const { | 409 Dart_PeerFinalizer Callback() const { |
| 397 return cobject_->value.as_external_byte_array.callback; | 410 return cobject_->value.as_external_byte_array.callback; |
| 398 } | 411 } |
| 399 | 412 |
| 400 private: | 413 private: |
| 401 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 414 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
| 402 }; | 415 }; |
| 403 | 416 |
| 404 #endif // BIN_DARTUTILS_H_ | 417 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |