| 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/isolate_data.h" | 8 #include "bin/isolate_data.h" |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_native_api.h" | 10 #include "include/dart_native_api.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const char* name, | 108 const char* name, |
| 109 int64_t val); | 109 int64_t val); |
| 110 static Dart_Handle SetStringField(Dart_Handle handle, | 110 static Dart_Handle SetStringField(Dart_Handle handle, |
| 111 const char* name, | 111 const char* name, |
| 112 const char* val); | 112 const char* val); |
| 113 static bool IsDartSchemeURL(const char* url_name); | 113 static bool IsDartSchemeURL(const char* url_name); |
| 114 static bool IsDartExtensionSchemeURL(const char* url_name); | 114 static bool IsDartExtensionSchemeURL(const char* url_name); |
| 115 static bool IsDartIOLibURL(const char* url_name); | 115 static bool IsDartIOLibURL(const char* url_name); |
| 116 static bool IsDartBuiltinLibURL(const char* url_name); | 116 static bool IsDartBuiltinLibURL(const char* url_name); |
| 117 static bool IsHttpSchemeURL(const char* url_name); | 117 static bool IsHttpSchemeURL(const char* url_name); |
| 118 static const char* RemoveScheme(const char* url); |
| 118 static void* MapExecutable(const char* name, intptr_t* file_len); | 119 static void* MapExecutable(const char* name, intptr_t* file_len); |
| 119 static void* OpenFile(const char* name, bool write); | 120 static void* OpenFile(const char* name, bool write); |
| 120 static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream); | 121 static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream); |
| 121 static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream); | 122 static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream); |
| 122 static void CloseFile(void* stream); | 123 static void CloseFile(void* stream); |
| 123 static bool EntropySource(uint8_t* buffer, intptr_t length); | 124 static bool EntropySource(uint8_t* buffer, intptr_t length); |
| 124 static Dart_Handle ReadStringFromFile(const char* filename); | 125 static Dart_Handle ReadStringFromFile(const char* filename); |
| 125 static Dart_Handle MakeUint8Array(const uint8_t* buffer, intptr_t length); | 126 static Dart_Handle MakeUint8Array(const uint8_t* buffer, intptr_t length); |
| 126 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, | 127 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, |
| 127 Dart_Handle library, | 128 Dart_Handle library, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 static const char* const kIOLibURL; | 226 static const char* const kIOLibURL; |
| 226 static const char* const kIOLibPatchURL; | 227 static const char* const kIOLibPatchURL; |
| 227 static const char* const kUriLibURL; | 228 static const char* const kUriLibURL; |
| 228 static const char* const kHttpScheme; | 229 static const char* const kHttpScheme; |
| 229 static const char* const kVMServiceLibURL; | 230 static const char* const kVMServiceLibURL; |
| 230 | 231 |
| 231 static const uint8_t magic_number[]; | 232 static const uint8_t magic_number[]; |
| 232 | 233 |
| 233 private: | 234 private: |
| 234 static Dart_Handle SetWorkingDirectory(); | 235 static Dart_Handle SetWorkingDirectory(); |
| 235 static Dart_Handle ExtensionPathFromUri(Dart_Handle extension_uri); | 236 static Dart_Handle LibraryFilePath(Dart_Handle library_uri); |
| 236 | |
| 237 static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib, | 237 static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib, |
| 238 Dart_Handle internal_lib, | 238 Dart_Handle internal_lib, |
| 239 bool is_service_isolate, | 239 bool is_service_isolate, |
| 240 bool trace_loading); | 240 bool trace_loading); |
| 241 static Dart_Handle PrepareCoreLibrary(Dart_Handle core_lib, | 241 static Dart_Handle PrepareCoreLibrary(Dart_Handle core_lib, |
| 242 Dart_Handle builtin_lib, | 242 Dart_Handle builtin_lib, |
| 243 bool is_service_isolate); | 243 bool is_service_isolate); |
| 244 static Dart_Handle PrepareAsyncLibrary(Dart_Handle async_lib, | 244 static Dart_Handle PrepareAsyncLibrary(Dart_Handle async_lib, |
| 245 Dart_Handle isolate_lib); | 245 Dart_Handle isolate_lib); |
| 246 static Dart_Handle PrepareIOLibrary(Dart_Handle io_lib); | 246 static Dart_Handle PrepareIOLibrary(Dart_Handle io_lib); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 bool is_typed_data_; | 663 bool is_typed_data_; |
| 664 | 664 |
| 665 DISALLOW_ALLOCATION(); | 665 DISALLOW_ALLOCATION(); |
| 666 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer); | 666 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer); |
| 667 }; | 667 }; |
| 668 | 668 |
| 669 } // namespace bin | 669 } // namespace bin |
| 670 } // namespace dart | 670 } // namespace dart |
| 671 | 671 |
| 672 #endif // BIN_DARTUTILS_H_ | 672 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |