| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 RUNTIME_BIN_LOADER_H_ | 5 #ifndef RUNTIME_BIN_LOADER_H_ |
| 6 #define RUNTIME_BIN_LOADER_H_ | 6 #define RUNTIME_BIN_LOADER_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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 static void InitForSnapshot(const char* snapshot_uri); | 23 static void InitForSnapshot(const char* snapshot_uri); |
| 24 | 24 |
| 25 static Dart_Handle ReloadNativeExtensions(); | 25 static Dart_Handle ReloadNativeExtensions(); |
| 26 | 26 |
| 27 // Loads contents of the specified url. | 27 // Loads contents of the specified url. |
| 28 static Dart_Handle LoadUrlContents(Dart_Handle url, | 28 static Dart_Handle LoadUrlContents(Dart_Handle url, |
| 29 uint8_t** payload, | 29 uint8_t** payload, |
| 30 intptr_t* payload_length); | 30 intptr_t* payload_length); |
| 31 | 31 |
| 32 static Dart_Handle ResolveAsFilePath(Dart_Handle url, | 32 static void ResolveDependenciesAsFilePaths(); |
| 33 uint8_t** payload, | |
| 34 intptr_t* payload_length); | |
| 35 | 33 |
| 36 // A static tag handler that hides all usage of a loader for an isolate. | 34 // A static tag handler that hides all usage of a loader for an isolate. |
| 37 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, | 35 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, |
| 38 Dart_Handle library, | 36 Dart_Handle library, |
| 39 Dart_Handle url); | 37 Dart_Handle url); |
| 40 | 38 |
| 41 Dart_Handle error() const { return error_; } | 39 Dart_Handle error() const { return error_; } |
| 42 | 40 |
| 43 static void InitOnce(); | 41 static void InitOnce(); |
| 44 | 42 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void SendImportExtensionRequest(Dart_Handle url, Dart_Handle library_url); | 90 void SendImportExtensionRequest(Dart_Handle url, Dart_Handle library_url); |
| 93 | 91 |
| 94 // Send a request from the tag handler to the service isolate. | 92 // Send a request from the tag handler to the service isolate. |
| 95 void SendRequest(intptr_t tag, Dart_Handle url, Dart_Handle library_url); | 93 void SendRequest(intptr_t tag, Dart_Handle url, Dart_Handle library_url); |
| 96 | 94 |
| 97 static Dart_Handle SendAndProcessReply(intptr_t tag, | 95 static Dart_Handle SendAndProcessReply(intptr_t tag, |
| 98 Dart_Handle url, | 96 Dart_Handle url, |
| 99 uint8_t** payload, | 97 uint8_t** payload, |
| 100 intptr_t* payload_length); | 98 intptr_t* payload_length); |
| 101 | 99 |
| 100 static Dart_Handle ResolveAsFilePath(Dart_Handle url, |
| 101 uint8_t** payload, |
| 102 intptr_t* payload_length); |
| 103 |
| 102 // Send a request from the tag handler to the kernel isolate. | 104 // Send a request from the tag handler to the kernel isolate. |
| 103 void SendKernelRequest(Dart_LibraryTag tag, Dart_Handle url); | 105 void SendKernelRequest(Dart_LibraryTag tag, Dart_Handle url); |
| 104 | 106 |
| 105 /// Queue |message| and notify the loader that a message is available. | 107 /// Queue |message| and notify the loader that a message is available. |
| 106 void QueueMessage(Dart_CObject* message); | 108 void QueueMessage(Dart_CObject* message); |
| 107 | 109 |
| 108 /// Blocks the caller until the loader is finished. | 110 /// Blocks the caller until the loader is finished. |
| 109 void BlockUntilComplete(ProcessResult process_result); | 111 void BlockUntilComplete(ProcessResult process_result); |
| 110 | 112 |
| 111 /// Saves a script dependency when applicable. | 113 /// Saves a script dependency when applicable. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 153 |
| 152 // This is the global callback for the native message handlers. | 154 // This is the global callback for the native message handlers. |
| 153 static void NativeMessageHandler(Dart_Port dest_port_id, | 155 static void NativeMessageHandler(Dart_Port dest_port_id, |
| 154 Dart_CObject* message); | 156 Dart_CObject* message); |
| 155 }; | 157 }; |
| 156 | 158 |
| 157 } // namespace bin | 159 } // namespace bin |
| 158 } // namespace dart | 160 } // namespace dart |
| 159 | 161 |
| 160 #endif // RUNTIME_BIN_LOADER_H_ | 162 #endif // RUNTIME_BIN_LOADER_H_ |
| OLD | NEW |