[jit] Move mono_install_load_aot_data_hook to mono-private-unstable.h
authorAleksey Kliger <aleksey@lambdageek.org>
Tue, 24 Mar 2020 01:26:24 +0000 (21:26 -0400)
committerAleksey Kliger <aleksey@lambdageek.org>
Tue, 24 Mar 2020 01:35:48 +0000 (21:35 -0400)
We do not guarantee that this API will be stable

src/mono/mono/mini/aot-runtime.c
src/mono/mono/mini/jit.h
src/mono/mono/mini/mono-private-unstable.h
src/mono/netcore/sample/iOS/runtime.m

index c603e03..c41ee32 100644 (file)
@@ -71,6 +71,7 @@
 #include "aot-runtime.h"
 #include "jit-icalls.h"
 #include "mini-runtime.h"
+#include "mono-private-unstable.h"
 #include "llvmonly-runtime.h"
 
 #ifndef DISABLE_AOT
index 73f2bd8..011792c 100644 (file)
@@ -109,17 +109,6 @@ mono_set_use_llvm (mono_bool use_llvm);
 MONO_API MONO_RT_EXTERNAL_ONLY void
 mono_aot_register_module (void **aot_info);
 
-/* These are used to load the AOT data for aot images compiled with MONO_AOT_FILE_FLAG_SEPARATE_DATA */
-/*
- * Return the AOT data for ASSEMBLY. SIZE is the size of the data. OUT_HANDLE should be set to a handle which is later
- * passed to the free function.
- */
-typedef unsigned char* (*MonoLoadAotDataFunc)          (MonoAssembly *assembly, int size, void* user_data, void **out_handle);
-/* Not yet used */
-typedef void  (*MonoFreeAotDataFunc)          (MonoAssembly *assembly, int size, void* user_data, void *handle);
-MONO_API MONO_RT_EXTERNAL_ONLY void
-mono_install_load_aot_data_hook (MonoLoadAotDataFunc load_func, MonoFreeAotDataFunc free_func, void* user_data);
-
 MONO_API MONO_RT_EXTERNAL_ONLY
 MonoDomain* mono_jit_thread_attach (MonoDomain *domain);
 
index 805edd2..1026ef2 100644 (file)
 #define __MONO_JIT_MONO_PRIVATE_UNSTABLE_H__
 
 #include <mono/utils/mono-publib.h>
+#include <mono/metadata/image.h>
 
-
+/* These are used to load the AOT data for aot images compiled with MONO_AOT_FILE_FLAG_SEPARATE_DATA */
+/*
+ * Return the AOT data for ASSEMBLY. SIZE is the size of the data. OUT_HANDLE should be set to a handle which is later
+ * passed to the free function.
+ */
+typedef unsigned char* (*MonoLoadAotDataFunc)          (MonoAssembly *assembly, int size, void* user_data, void **out_handle);
+/* Not yet used */
+typedef void  (*MonoFreeAotDataFunc)          (MonoAssembly *assembly, int size, void* user_data, void *handle);
+MONO_API MONO_RT_EXTERNAL_ONLY void
+mono_install_load_aot_data_hook (MonoLoadAotDataFunc load_func, MonoFreeAotDataFunc free_func, void* user_data);
 
 #endif /*__MONO_JIT_MONO_PRIVATE_UNSTABLE_H__*/
index 24697df..87eb4bc 100644 (file)
@@ -6,6 +6,7 @@
 #include <mono/metadata/mono-gc.h>
 #include <mono/metadata/exception.h>
 #include <mono/jit/jit.h>
+#include <mono/jit/mono-private-unstable.h>
 
 #import <os/log.h>
 #include <sys/stat.h>