il2cpp-compat.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. #pragma once
  2. #include <mono/metadata/il2cpp-compat-metadata.h>
  3. #if defined(RUNTIME_IL2CPP)
  4. #include "il2cpp-c-types.h"
  5. #include "il2cpp-api.h"
  6. #else
  7. #include <mono/mini/mini.h>
  8. #include <mono/sgen/sgen-conf.h>
  9. #include <mono/metadata/profiler.h>
  10. #endif //RUNTIME_IL2CPP
  11. #ifdef RUNTIME_IL2CPP
  12. #ifndef THREAD_STATIC_FIELD_OFFSET
  13. #define THREAD_STATIC_FIELD_OFFSET -1
  14. #endif
  15. #define VM_DOMAIN_GET_AGENT_INFO(domain) il2cpp_domain_get_agent_info(domain)
  16. #define VM_DOMAIN_SET_AGENT_INFO(domain, value) il2cpp_domain_set_agent_info(domain, value)
  17. #define VM_METHOD_IS_STRING_CTOR(method) il2cpp_method_is_string_ctor(method)
  18. #define VM_INFLATED_METHOD_GET_DECLARING(imethod) il2cpp_method_get_generic_definition(imethod)
  19. #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) il2cpp_method_get_generic_class_inst(imethod)
  20. #define VM_OBJECT_GET_DOMAIN(object) il2cpp_mono_domain_get()
  21. #define VM_OBJECT_GET_TYPE(object) il2cpp_mono_object_get_type(object)
  22. #define VM_GENERIC_CLASS_GET_CONTAINER_CLASS(gklass) il2cpp_generic_class_get_container_class(gklass)
  23. #define VM_DEFAULTS_OBJECT_CLASS il2cpp_defaults_object_class()
  24. #define VM_DEFAULTS_EXCEPTION_CLASS il2cpp_defaults_exception_class()
  25. #define VM_DEFAULTS_CORLIB_IMAGE il2cpp_defaults_corlib_image()
  26. #define VM_DEFAULTS_VOID_CLASS il2cpp_defaults_void_class()
  27. //Fixme module name as image name seems bad
  28. #define VM_IMAGE_GET_MODULE_NAME(image) il2cpp_image_name(image)
  29. #else
  30. #define VM_DOMAIN_GET_AGENT_INFO(domain) domain_jit_info (domain)->agent_info
  31. #define VM_DOMAIN_SET_AGENT_INFO(domain, value) domain_jit_info (domain)->agent_info = value
  32. #define VM_METHOD_IS_STRING_CTOR(method) method->string_ctor
  33. #define VM_INFLATED_METHOD_GET_DECLARING(imethod) (imethod)->declaring
  34. #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) (imethod)->context.class_inst
  35. #define VM_OBJECT_GET_DOMAIN(object) ((MonoObject*)object)->vtable->domain
  36. #define VM_OBJECT_GET_TYPE(object) ((MonoReflectionType*)object->vtable->type)->type
  37. #define VM_GENERIC_CLASS_GET_CONTAINER_CLASS(gklass) (gklass)->container_class
  38. #define VM_DEFAULTS_OBJECT_CLASS mono_defaults.object_class
  39. #define VM_DEFAULTS_EXCEPTION_CLASS mono_defaults.exception_class
  40. #define VM_DEFAULTS_CORLIB_IMAGE mono_defaults.corlib
  41. #define VM_DEFAULTS_VOID_CLASS mono_defaults.void_class
  42. #define VM_IMAGE_GET_MODULE_NAME(image) (image)->module_name
  43. #endif
  44. #if defined(RUNTIME_IL2CPP)
  45. #define MonoMethodSignature Il2CppMonoMethodSignature
  46. #define MonoRuntimeExceptionHandlingCallbacks Il2CppMonoRuntimeExceptionHandlingCallbacks
  47. #define debug_options il2cpp_mono_debug_options
  48. #define MonoTypeNameParse Il2CppMonoTypeNameParse
  49. #define MonoDebugOptions Il2CppMonoDebugOptions
  50. #define MonoLMF Il2CppMonoLMF
  51. #define mono_image_get_entry_point il2cpp_mono_image_get_entry_point
  52. #define mono_image_get_filename il2cpp_mono_image_get_filename
  53. #define mono_image_get_guid il2cpp_mono_image_get_guid
  54. #define mono_image_is_dynamic il2cpp_mono_image_is_dynamic
  55. #define mono_type_get_class il2cpp_mono_type_get_class
  56. #define m_type_get_generic_class il2cpp_m_type_get_generic_class
  57. #define mono_type_is_struct il2cpp_mono_type_is_struct
  58. #define mono_type_is_reference il2cpp_mono_type_is_reference
  59. #define mono_metadata_free_mh il2cpp_mono_metadata_free_mh
  60. #define mono_method_signature il2cpp_mono_method_signature
  61. #define mono_method_get_param_names il2cpp_mono_method_get_param_names
  62. #define mono_type_generic_inst_is_valuetype il2cpp_mono_type_generic_inst_is_valuetype
  63. #define mono_method_get_header_checked il2cpp_mono_method_get_header_checked
  64. #define mono_class_init il2cpp_mono_class_init
  65. #define mono_class_vtable il2cpp_mono_class_vtable
  66. #define mono_class_get_field_from_name il2cpp_mono_class_get_field_from_name
  67. #define mono_array_element_size il2cpp_mono_array_element_size
  68. #define mono_class_instance_size il2cpp_mono_class_instance_size
  69. #define mono_class_value_size il2cpp_mono_class_value_size
  70. #define mono_class_is_assignable_from il2cpp_mono_class_is_assignable_from
  71. #define mono_class_from_mono_type il2cpp_mono_class_from_mono_type
  72. #define mono_class_get_flags il2cpp_class_get_flags
  73. #define mono_class_num_fields il2cpp_mono_class_num_fields
  74. #define mono_class_num_methods il2cpp_mono_class_num_methods
  75. #define mono_class_num_properties il2cpp_mono_class_num_properties
  76. #define mono_class_get_fields il2cpp_mono_class_get_fields
  77. #define mono_class_get_methods il2cpp_mono_class_get_methods
  78. #define mono_class_get_properties il2cpp_mono_class_get_properties
  79. #define mono_class_get_nested_types il2cpp_class_get_nested_types_accepts_generic
  80. #define mono_field_get_name il2cpp_mono_field_get_name
  81. #define mono_class_get_method_from_name il2cpp_class_get_method_from_name
  82. #define mono_string_chars il2cpp_mono_string_chars
  83. #define mono_class_is_abstract il2cpp_class_is_abstract
  84. #define mono_string_length il2cpp_mono_string_length
  85. #define mono_array_addr_with_size il2cpp_mono_array_addr_with_size
  86. #define mono_array_length il2cpp_mono_array_length
  87. #define mono_string_new il2cpp_mono_string_new
  88. #define mono_string_new_checked il2cpp_mono_string_new_checked
  89. #define mono_string_to_utf8_checked il2cpp_mono_string_to_utf8_checked
  90. #define mono_object_hash il2cpp_mono_object_hash
  91. #define mono_object_unbox il2cpp_mono_object_unbox
  92. #define mono_object_get_virtual_method il2cpp_object_get_virtual_method
  93. #define mono_field_set_value il2cpp_mono_field_set_value
  94. #define mono_field_static_set_value il2cpp_mono_field_static_set_value
  95. #define mono_gchandle_new_weakref il2cpp_mono_gchandle_new_weakref
  96. #define mono_gchandle_get_target il2cpp_mono_gchandle_get_target
  97. #define mono_gchandle_free il2cpp_mono_gchandle_free
  98. #define mono_gc_wbarrier_generic_store il2cpp_mono_gc_wbarrier_generic_store
  99. #define mono_reflection_parse_type_checked il2cpp_mono_reflection_parse_type_checked
  100. #define mono_reflection_free_type_info il2cpp_mono_reflection_free_type_info
  101. #define mono_get_root_domain il2cpp_mono_get_root_domain
  102. #define mono_runtime_quit il2cpp_mono_runtime_quit
  103. #define mono_runtime_is_shutting_down il2cpp_mono_runtime_is_shutting_down
  104. #define mono_domain_get il2cpp_mono_domain_get
  105. #define mono_domain_set il2cpp_mono_domain_set
  106. #define mono_domain_foreach il2cpp_mono_domain_foreach
  107. #define mono_jit_info_table_find il2cpp_mono_jit_info_table_find
  108. #define mono_jit_info_get_method il2cpp_mono_jit_info_get_method
  109. #define mono_debug_find_method il2cpp_mono_debug_find_method
  110. #define mono_debug_free_method_jit_info il2cpp_mono_debug_free_method_jit_info
  111. #define mono_debug_il_offset_from_address il2cpp_mono_debug_il_offset_from_address
  112. #define mono_set_is_debugger_attached il2cpp_mono_set_is_debugger_attached
  113. #define mono_type_full_name il2cpp_mono_type_full_name
  114. #define mono_method_full_name il2cpp_mono_method_full_name
  115. #define mono_thread_current il2cpp_mono_thread_current
  116. #define mono_thread_get_main il2cpp_mono_thread_get_main
  117. #define mono_thread_attach il2cpp_mono_thread_attach
  118. #define mono_thread_detach il2cpp_mono_thread_detach
  119. #define mono_domain_lock il2cpp_mono_domain_lock
  120. #define mono_domain_unlock il2cpp_mono_domain_unlock
  121. #define mono_jit_info_table_find_internal il2cpp_mono_jit_info_table_find_internal
  122. #define mono_aligned_addr_hash il2cpp_mono_aligned_addr_hash
  123. #define mono_metadata_get_generic_inst il2cpp_mono_metadata_get_generic_inst
  124. #define mono_get_method_checked il2cpp_mono_get_method_checked
  125. #define mono_class_interface_offset_with_variance il2cpp_mono_class_interface_offset_with_variance
  126. #define mono_class_setup_supertypes il2cpp_mono_class_setup_supertypes
  127. #define mono_class_setup_vtable il2cpp_mono_class_setup_vtable
  128. #define mono_class_setup_methods il2cpp_mono_class_setup_methods
  129. #define mono_class_field_is_special_static il2cpp_mono_class_field_is_special_static
  130. #define mono_class_field_get_special_static_type il2cpp_mono_class_field_get_special_static_type
  131. #define mono_class_get_context il2cpp_mono_class_get_context
  132. #define mono_method_get_context il2cpp_mono_method_get_context
  133. #define mono_method_get_generic_container il2cpp_mono_method_get_generic_container
  134. #define mono_class_inflate_generic_method_full_checked il2cpp_mono_class_inflate_generic_method_full_checked
  135. #define mono_class_inflate_generic_method_checked il2cpp_mono_class_inflate_generic_method_checked
  136. #define mono_loader_lock il2cpp_mono_loader_lock
  137. #define mono_loader_unlock il2cpp_mono_loader_unlock
  138. #define mono_loader_lock_track_ownership il2cpp_mono_loader_lock_track_ownership
  139. #define mono_loader_lock_is_owned_by_self il2cpp_mono_loader_lock_is_owned_by_self
  140. #define mono_method_get_wrapper_data il2cpp_mono_method_get_wrapper_data
  141. #define mono_type_get_name_full il2cpp_mono_type_get_name_full
  142. #define mono_class_is_nullable il2cpp_mono_class_is_nullable
  143. #define mono_class_get_generic_container il2cpp_mono_class_get_generic_container
  144. #define mono_class_setup_interfaces il2cpp_mono_class_setup_interfaces
  145. #define mono_class_get_methods_by_name il2cpp_mono_class_get_methods_by_name
  146. #define mono_class_is_valuetype il2cpp_class_is_valuetype
  147. #define mono_ldtoken_checked il2cpp_mono_ldtoken_checked
  148. #define mono_class_from_generic_parameter_internal il2cpp_mono_class_from_generic_parameter_internal
  149. #define mono_class_load_from_name il2cpp_mono_class_load_from_name
  150. #define mono_class_try_load_from_name il2cpp_class_from_name
  151. #define mono_class_get_generic_class il2cpp_mono_class_get_generic_class
  152. #define mono_thread_internal_current il2cpp_mono_thread_internal_current
  153. #define mono_thread_internal_is_current il2cpp_mono_thread_internal_is_current
  154. #define mono_thread_internal_abort il2cpp_mono_thread_internal_abort
  155. #define mono_thread_internal_reset_abort il2cpp_mono_thread_internal_reset_abort
  156. #define mono_thread_get_name il2cpp_mono_thread_get_name
  157. #define mono_thread_set_name_internal il2cpp_mono_thread_set_name_internal
  158. #define mono_thread_suspend_all_other_threads il2cpp_mono_thread_suspend_all_other_threads
  159. #define mono_stack_mark_record_size il2cpp_mono_stack_mark_record_size
  160. #define mono_get_eh_callbacks il2cpp_mono_get_eh_callbacks
  161. #define mono_nullable_init il2cpp_mono_nullable_init
  162. #define mono_value_box_checked il2cpp_mono_value_box_checked
  163. #define mono_field_static_get_value_checked il2cpp_mono_field_static_get_value_checked
  164. #define mono_field_static_get_value_for_thread il2cpp_mono_field_static_get_value_for_thread
  165. #define mono_field_get_value_object_checked il2cpp_mono_field_get_value_object_checked
  166. #define mono_field_get_offset il2cpp_field_get_offset
  167. #define mono_object_new_checked il2cpp_mono_object_new_checked
  168. #define mono_ldstr_checked il2cpp_mono_ldstr_checked
  169. #define mono_runtime_try_invoke il2cpp_mono_runtime_try_invoke
  170. #define mono_runtime_invoke_checked il2cpp_mono_runtime_invoke_checked
  171. #define mono_gc_base_init il2cpp_mono_gc_base_init
  172. #define mono_gc_register_root il2cpp_mono_gc_register_root
  173. #define mono_gc_deregister_root il2cpp_mono_gc_deregister_root
  174. #define mono_environment_exitcode_get il2cpp_mono_environment_exitcode_get
  175. #define mono_environment_exitcode_set il2cpp_mono_environment_exitcode_set
  176. #define mono_threadpool_suspend il2cpp_mono_threadpool_suspend
  177. #define mono_threadpool_resume il2cpp_mono_threadpool_resume
  178. #define mono_assembly_get_image il2cpp_mono_assembly_get_image
  179. #define mono_runtime_try_shutdown il2cpp_mono_runtime_try_shutdown
  180. #define mono_verifier_is_method_valid_generic_instantiation il2cpp_mono_verifier_is_method_valid_generic_instantiation
  181. #define mono_reflection_get_type_checked il2cpp_mono_reflection_get_type_checked
  182. #define mono_assembly_get_object_handle il2cpp_mono_assembly_get_object_handle
  183. #define mono_type_get_object_checked il2cpp_mono_type_get_object_checked
  184. #define mono_network_init il2cpp_mono_network_init
  185. #define mono_w32socket_set_blocking il2cpp_mono_w32socket_set_blocking
  186. #define mono_get_runtime_build_info il2cpp_mono_get_runtime_build_info
  187. #define mono_marshal_method_from_wrapper il2cpp_mono_marshal_method_from_wrapper
  188. #define mini_get_debug_options il2cpp_mini_get_debug_options
  189. #define mini_get_interp_callbacks il2cpp_mini_get_interp_callbacks
  190. #define mono_jit_find_compiled_method_with_jit_info il2cpp_mono_jit_find_compiled_method_with_jit_info
  191. #define mono_get_lmf_addr il2cpp_mono_get_lmf_addr
  192. #define mono_set_lmf il2cpp_mono_set_lmf
  193. #define mono_aot_get_method_checked il2cpp_mono_aot_get_method_checked
  194. #define mono_arch_setup_resume_sighandler_ctx il2cpp_mono_arch_setup_resume_sighandler_ctx
  195. #define mono_arch_set_breakpoint il2cpp_mono_arch_set_breakpoint
  196. #define mono_arch_clear_breakpoint il2cpp_mono_arch_clear_breakpoint
  197. #define mono_arch_start_single_stepping il2cpp_mono_arch_start_single_stepping
  198. #define mono_arch_stop_single_stepping il2cpp_mono_arch_stop_single_stepping
  199. #define mono_arch_skip_breakpoint il2cpp_mono_arch_skip_breakpoint
  200. #define mono_arch_skip_single_step il2cpp_mono_arch_skip_single_step
  201. #define mono_arch_context_get_int_reg il2cpp_mono_arch_context_get_int_reg
  202. #define mono_arch_context_set_int_reg il2cpp_mono_arch_context_set_int_reg
  203. #define mono_walk_stack_with_ctx il2cpp_mono_walk_stack_with_ctx
  204. #define mono_walk_stack_with_state il2cpp_mono_walk_stack_with_state
  205. #define mono_thread_state_init_from_current il2cpp_mono_thread_state_init_from_current
  206. #define mono_thread_state_init_from_monoctx il2cpp_mono_thread_state_init_from_monoctx
  207. #define mini_jit_info_table_find il2cpp_mini_jit_info_table_find
  208. #define mono_restore_context il2cpp_mono_restore_context
  209. #define mono_method_get_declaring_generic_method il2cpp_mono_method_get_declaring_generic_method
  210. #define jinfo_get_method il2cpp_jinfo_get_method
  211. #define mono_defaults il2cpp_mono_defaults
  212. #define mono_find_prev_seq_point_for_native_offset il2cpp_mono_find_prev_seq_point_for_native_offset
  213. #define mono_w32socket_accept_internal il2cpp_mono_w32socket_accept_internal
  214. #define mono_find_next_seq_point_for_native_offset il2cpp_mono_find_next_seq_point_for_native_offset
  215. #define mono_class_has_parent il2cpp_mono_class_has_parent
  216. #define mono_class_is_gtd il2cpp_class_is_generic
  217. #define mono_class_is_ginst il2cpp_class_is_inflated
  218. #define mono_generic_container_get_param il2cpp_mono_generic_container_get_param
  219. #define mono_find_seq_point il2cpp_mono_find_seq_point
  220. #define mono_seq_point_iterator_init il2cpp_mono_seq_point_iterator_init
  221. #define mono_seq_point_iterator_next il2cpp_mono_seq_point_iterator_next
  222. #define mono_seq_point_init_next il2cpp_mono_seq_point_init_next
  223. #define mono_get_seq_points il2cpp_mono_get_seq_points
  224. #define G_BREAKPOINT IL2CPP_G_BREAKPOINT
  225. #define mono_thread_info_safe_suspend_and_run il2cpp_mono_thread_info_safe_suspend_and_run
  226. #define mono_error_cleanup il2cpp_mono_error_cleanup
  227. #define mono_error_convert_to_exception il2cpp_mono_error_convert_to_exception
  228. #define mono_error_get_message il2cpp_mono_error_get_message
  229. #define mono_error_assert_ok_pos il2cpp_mono_error_assert_ok_pos
  230. #define mono_class_get_namespace il2cpp_class_get_namespace
  231. #define mono_class_get_name il2cpp_class_get_name
  232. #define mono_object_get_class il2cpp_object_get_class
  233. #define mono_field_get_parent il2cpp_field_get_parent
  234. #define mono_class_get_parent il2cpp_class_get_parent
  235. #define mono_field_get_type il2cpp_field_get_type
  236. #define mono_method_get_name il2cpp_method_get_name
  237. #define mono_class_get_type il2cpp_class_get_type
  238. #define mono_class_get_byref_type il2cpp_mono_class_get_byref_type
  239. #define mono_method_get_class il2cpp_method_get_class
  240. #define mono_class_get_image il2cpp_class_get_image
  241. #define mono_class_get_interfaces il2cpp_class_get_interfaces
  242. #undef MONO_CLASS_IS_INTERFACE
  243. #define MONO_CLASS_IS_INTERFACE il2cpp_class_is_interface
  244. #define mono_image_get_assembly il2cpp_image_get_assembly
  245. #define mono_image_get_name il2cpp_image_get_name
  246. #define mono_type_get_type il2cpp_type_get_type
  247. #define mono_class_get_rank il2cpp_class_get_rank
  248. #define mono_class_get_element_class il2cpp_class_get_element_class
  249. #define mono_class_get_type_token il2cpp_class_get_type_token
  250. #define mono_type_is_byref il2cpp_type_is_byref
  251. #define mono_type_get_attrs il2cpp_type_get_attrs
  252. #define mono_class_is_enum il2cpp_class_is_enum
  253. #define mono_method_get_flags il2cpp_method_get_flags
  254. #define mono_method_get_token il2cpp_method_get_token
  255. #define mono_method_is_generic il2cpp_method_is_generic
  256. #define mono_method_is_inflated il2cpp_method_is_inflated
  257. #undef mono_field_is_deleted
  258. #define mono_field_is_deleted il2cpp_field_is_deleted
  259. #define mono_domain_get_assemblies_iter il2cpp_domain_get_assemblies_iter
  260. #define mono_property_get_name il2cpp_property_get_name
  261. #define mono_property_get_set_method il2cpp_property_get_set_method
  262. #define mono_property_get_get_method il2cpp_property_get_get_method
  263. #define mono_property_get_parent il2cpp_property_get_parent
  264. #define m_domain_get_corlib il2cpp_m_domain_get_corlib
  265. #define mono_generic_class_get_context il2cpp_mono_generic_class_get_context
  266. #define m_class_is_initialized il2cpp_m_class_is_initialized
  267. #define mono_debug_lookup_locals il2cpp_debug_lookup_locals
  268. #define mono_debug_free_locals il2cpp_debug_free_locals
  269. #undef mono_domain_assemblies_lock
  270. #define mono_domain_assemblies_lock
  271. #undef mono_domain_assemblies_unlock
  272. #define mono_domain_assemblies_unlock
  273. #define mono_get_string_class il2cpp_mono_get_string_class
  274. #define MONO_MAX_IREGS 1
  275. #define NOT_IMPLEMENTED do { g_assert_not_reached (); } while (0)
  276. MonoMethod* il2cpp_mono_image_get_entry_point(MonoImage *image);
  277. const char* il2cpp_mono_image_get_filename(MonoImage *image);
  278. const char* il2cpp_mono_image_get_guid(MonoImage *image);
  279. MonoClass* il2cpp_mono_type_get_class(MonoType *type);
  280. mono_bool il2cpp_mono_type_is_struct(MonoType *type);
  281. mono_bool il2cpp_mono_type_is_reference(MonoType *type);
  282. void il2cpp_mono_metadata_free_mh(MonoMethodHeader *mh);
  283. Il2CppMonoMethodSignature* il2cpp_mono_method_signature(MonoMethod *m);
  284. void il2cpp_mono_method_get_param_names(MonoMethod *method, const char **names);
  285. mono_bool il2cpp_mono_type_generic_inst_is_valuetype(MonoType *type);
  286. MonoMethodHeader* il2cpp_mono_method_get_header_checked(MonoMethod *method, MonoError *error);
  287. gboolean il2cpp_mono_class_init(MonoClass *klass);
  288. MonoVTable* il2cpp_mono_class_vtable(MonoDomain *domain, MonoClass *klass);
  289. MonoClassField* il2cpp_mono_class_get_field_from_name(MonoClass *klass, const char *name);
  290. int32_t il2cpp_mono_array_element_size(MonoClass *ac);
  291. int32_t il2cpp_mono_class_instance_size(MonoClass *klass);
  292. int32_t il2cpp_mono_class_value_size(MonoClass *klass, uint32_t *align);
  293. gboolean il2cpp_mono_class_is_assignable_from(MonoClass *klass, MonoClass *oklass);
  294. MonoClass* il2cpp_mono_class_from_mono_type(MonoType *type);
  295. int il2cpp_mono_class_num_fields(MonoClass *klass);
  296. int il2cpp_mono_class_num_methods(MonoClass *klass);
  297. int il2cpp_mono_class_num_properties(MonoClass *klass);
  298. MonoClassField* il2cpp_mono_class_get_fields(MonoClass* klass, gpointer *iter);
  299. MonoMethod* il2cpp_mono_class_get_methods(MonoClass* klass, gpointer *iter);
  300. MonoProperty* il2cpp_mono_class_get_properties(MonoClass* klass, gpointer *iter);
  301. const char* il2cpp_mono_field_get_name(MonoClassField *field);
  302. mono_unichar2* il2cpp_mono_string_chars(MonoString *s);
  303. int il2cpp_mono_string_length(MonoString *s);
  304. char* il2cpp_mono_array_addr_with_size(MonoArray *array, int size, uintptr_t idx);
  305. uintptr_t il2cpp_mono_array_length(MonoArray *array);
  306. MonoString* il2cpp_mono_string_new(MonoDomain *domain, const char *text);
  307. MonoString* il2cpp_mono_string_new(MonoDomain *domain, const char *text);
  308. MonoString* il2cpp_mono_string_new_checked(MonoDomain *domain, const char *text, MonoError *merror);
  309. char* il2cpp_mono_string_to_utf8_checked(MonoString *string_obj, MonoError *error);
  310. int il2cpp_mono_object_hash(MonoObject* obj);
  311. void* il2cpp_mono_object_unbox(MonoObject *obj);
  312. void il2cpp_mono_field_set_value(MonoObject *obj, MonoClassField *field, void *value);
  313. void il2cpp_mono_field_static_set_value(MonoVTable *vt, MonoClassField *field, void *value);
  314. uint32_t il2cpp_mono_gchandle_new_weakref(MonoObject *obj, mono_bool track_resurrection);
  315. MonoObject* il2cpp_mono_gchandle_get_target(uint32_t gchandle);
  316. void il2cpp_mono_gchandle_free(uint32_t gchandle);
  317. void il2cpp_mono_gc_wbarrier_generic_store(void* ptr, MonoObject* value);
  318. int il2cpp_mono_reflection_parse_type_checked(char *name, Il2CppMonoTypeNameParse *info, MonoError *error);
  319. void il2cpp_mono_reflection_free_type_info(Il2CppMonoTypeNameParse *info);
  320. MonoDomain* il2cpp_mono_get_root_domain(void);
  321. void il2cpp_mono_runtime_quit(void);
  322. gboolean il2cpp_mono_runtime_is_shutting_down(void);
  323. MonoDomain* il2cpp_mono_domain_get(void);
  324. gboolean il2cpp_mono_domain_set(MonoDomain *domain, gboolean force);
  325. void il2cpp_mono_domain_foreach(MonoDomainFunc func, gpointer user_data);
  326. MonoJitInfo* il2cpp_mono_jit_info_table_find(MonoDomain* domain, char* addr);
  327. MonoMethod* il2cpp_mono_jit_info_get_method(MonoJitInfo* ji);
  328. MonoDebugMethodJitInfo* il2cpp_mono_debug_find_method(MonoMethod *method, MonoDomain *domain);
  329. gint32 il2cpp_mono_debug_il_offset_from_address(MonoMethod* method, MonoDomain* domain, guint32 native_offset);
  330. void il2cpp_mono_set_is_debugger_attached(gboolean attached);
  331. char* il2cpp_mono_type_full_name(MonoType* type);
  332. char* il2cpp_mono_method_full_name(MonoMethod* method, gboolean signature);
  333. MonoThread* il2cpp_mono_thread_current();
  334. MonoThread* il2cpp_mono_thread_get_main();
  335. MonoThread* il2cpp_mono_thread_attach(MonoDomain* domain);
  336. void il2cpp_mono_domain_lock(MonoDomain* domain);
  337. void il2cpp_mono_domain_unlock(MonoDomain* domain);
  338. MonoJitInfo* il2cpp_mono_jit_info_table_find_internal(MonoDomain* domain, char* addr, gboolean try_aot, gboolean allow_trampolines);
  339. guint il2cpp_mono_aligned_addr_hash(gconstpointer ptr);
  340. MonoGenericInst* il2cpp_mono_metadata_get_generic_inst(int type_argc, MonoType** type_argv);
  341. MonoMethod* il2cpp_mono_get_method_checked(MonoImage* image, guint32 token, MonoClass* klass, MonoGenericContext* context, MonoError* error);
  342. int il2cpp_mono_class_interface_offset_with_variance(MonoClass* klass, MonoClass* itf, gboolean* non_exact_match);
  343. void il2cpp_mono_class_setup_supertypes(MonoClass* klass);
  344. void il2cpp_mono_class_setup_vtable(MonoClass* klass);
  345. void il2cpp_mono_class_setup_methods(MonoClass* klass);
  346. gboolean il2cpp_mono_class_field_is_special_static(MonoClassField* field);
  347. guint32 il2cpp_mono_class_field_get_special_static_type(MonoClassField* field);
  348. MonoGenericContext* il2cpp_mono_class_get_context(MonoClass* klass);
  349. MonoGenericContext* il2cpp_mono_method_get_context(MonoMethod* method);
  350. MonoGenericContainer* il2cpp_mono_method_get_generic_container(MonoMethod* method);
  351. MonoMethod* il2cpp_mono_class_inflate_generic_method_full_checked(MonoMethod* method, MonoClass* klass_hint, MonoGenericContext* context, MonoError* error);
  352. MonoMethod* il2cpp_mono_class_inflate_generic_method_checked(MonoMethod* method, MonoGenericContext* context, MonoError* error);
  353. void il2cpp_mono_loader_lock();
  354. void il2cpp_mono_loader_unlock();
  355. void il2cpp_mono_loader_lock_track_ownership(gboolean track);
  356. gboolean il2cpp_mono_loader_lock_is_owned_by_self();
  357. gpointer il2cpp_mono_method_get_wrapper_data(MonoMethod* method, guint32 id);
  358. char* il2cpp_mono_type_get_name_full(MonoType* type, MonoTypeNameFormat format);
  359. gboolean il2cpp_mono_class_is_nullable(MonoClass* klass);
  360. MonoGenericContainer* il2cpp_mono_class_get_generic_container(MonoClass* klass);
  361. void il2cpp_mono_class_setup_interfaces(MonoClass* klass, MonoError* error);
  362. GPtrArray* il2cpp_mono_class_get_methods_by_name(MonoClass* klass, const char* name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoError* error);
  363. gpointer il2cpp_mono_ldtoken_checked(MonoImage* image, guint32 token, MonoClass** handle_class, MonoGenericContext* context, MonoError* error);
  364. MonoClass* il2cpp_mono_class_from_generic_parameter_internal(MonoGenericParam* param);
  365. MonoClass* il2cpp_mono_class_load_from_name(MonoImage* image, const char* name_space, const char* name);
  366. MonoGenericClass* il2cpp_mono_class_get_generic_class(MonoClass* klass);
  367. MonoInternalThread* il2cpp_mono_thread_internal_current();
  368. gboolean il2cpp_mono_thread_internal_is_current(MonoInternalThread* thread);
  369. void il2cpp_mono_thread_internal_abort(MonoInternalThread* thread, gboolean appdomain_unload);
  370. void il2cpp_mono_thread_internal_reset_abort(MonoInternalThread* thread);
  371. gunichar2* il2cpp_mono_thread_get_name(MonoInternalThread* this_obj, guint32* name_len);
  372. void il2cpp_mono_thread_set_name_internal(MonoInternalThread* this_obj, MonoString* name, gboolean permanent, gboolean reset, MonoError* error);
  373. void il2cpp_mono_thread_suspend_all_other_threads();
  374. void il2cpp_mono_stack_mark_record_size(MonoThreadInfo* info, HandleStackMark* stackmark, const char* func_name);
  375. Il2CppMonoRuntimeExceptionHandlingCallbacks* il2cpp_mono_get_eh_callbacks();
  376. void il2cpp_mono_nullable_init(guint8* buf, MonoObject* value, MonoClass* klass);
  377. MonoObject* il2cpp_mono_value_box_checked(MonoDomain* domain, MonoClass* klass, gpointer value, MonoError* error);
  378. void il2cpp_mono_field_static_get_value_checked(MonoVTable* vt, MonoClassField* field, void* value, MonoError* error);
  379. void il2cpp_mono_field_static_get_value_for_thread(MonoInternalThread* thread, MonoVTable* vt, MonoClassField* field, void* value, MonoError* error);
  380. MonoObject* il2cpp_mono_field_get_value_object_checked(MonoDomain* domain, MonoClassField* field, MonoObject* obj, MonoError* error);
  381. MonoObject* il2cpp_mono_object_new_checked(MonoDomain* domain, MonoClass* klass, MonoError* error);
  382. MonoString* il2cpp_mono_ldstr_checked(MonoDomain* domain, MonoImage* image, guint32 idx, MonoError* error);
  383. MonoObject* il2cpp_mono_runtime_try_invoke(MonoMethod* method, void* obj, void** params, MonoObject** exc, MonoError* error);
  384. MonoObject* il2cpp_mono_runtime_invoke_checked(MonoMethod* method, void* obj, void** params, MonoError* error);
  385. void il2cpp_mono_gc_base_init();
  386. int il2cpp_mono_gc_register_root(char* start, size_t size, MonoGCDescriptor descr, MonoGCRootSource source, void *key, const char* msg);
  387. void il2cpp_mono_gc_deregister_root(char* addr);
  388. gint32 il2cpp_mono_environment_exitcode_get();
  389. void il2cpp_mono_environment_exitcode_set(gint32 value);
  390. void il2cpp_mono_threadpool_suspend();
  391. void il2cpp_mono_threadpool_resume();
  392. gboolean il2cpp_mono_runtime_try_shutdown();
  393. gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(MonoMethod* method);
  394. MonoType* il2cpp_mono_reflection_get_type_checked(MonoImage* rootimage, MonoImage* image, Il2CppMonoTypeNameParse* info, gboolean ignorecase, gboolean* type_resolve, MonoError* error);
  395. MonoReflectionAssemblyHandle il2cpp_mono_assembly_get_object_handle(MonoDomain* domain, MonoAssembly* assembly, MonoError* error);
  396. MonoReflectionType* il2cpp_mono_type_get_object_checked(MonoDomain* domain, MonoType* type, MonoError* error);
  397. void il2cpp_mono_network_init();
  398. gint il2cpp_mono_w32socket_set_blocking(SOCKET sock, gboolean blocking);
  399. char* il2cpp_mono_get_runtime_build_info();
  400. MonoMethod* il2cpp_mono_marshal_method_from_wrapper(MonoMethod* wrapper);
  401. MonoDebugOptions* il2cpp_mini_get_debug_options();
  402. MonoInterpCallbacks* il2cpp_mini_get_interp_callbacks(void);
  403. gpointer il2cpp_mono_jit_find_compiled_method_with_jit_info(MonoDomain* domain, MonoMethod* method, MonoJitInfo** ji);
  404. MonoLMF** il2cpp_mono_get_lmf_addr();
  405. void il2cpp_mono_set_lmf(MonoLMF* lmf);
  406. gpointer il2cpp_mono_aot_get_method_checked(MonoDomain* domain, MonoMethod* method, MonoError* error);
  407. void il2cpp_mono_arch_setup_resume_sighandler_ctx(MonoContext* ctx, gpointer func);
  408. void il2cpp_mono_arch_set_breakpoint(MonoJitInfo* ji, guint8* ip);
  409. void il2cpp_mono_arch_clear_breakpoint(MonoJitInfo* ji, guint8* ip);
  410. void il2cpp_mono_arch_start_single_stepping();
  411. void il2cpp_mono_arch_stop_single_stepping();
  412. void il2cpp_mono_arch_skip_breakpoint(MonoContext* ctx, MonoJitInfo* ji);
  413. void il2cpp_mono_arch_skip_single_step(MonoContext* ctx);
  414. mgreg_t il2cpp_mono_arch_context_get_int_reg(MonoContext* ctx, int reg);
  415. void il2cpp_mono_arch_context_set_int_reg(MonoContext* ctx, int reg, mgreg_t val);
  416. void il2cpp_mono_walk_stack_with_ctx(Il2CppMonoJitStackWalk func, MonoContext* start_ctx, MonoUnwindOptions unwind_options, void* user_data);
  417. void il2cpp_mono_walk_stack_with_state(Il2CppMonoJitStackWalk func, MonoThreadUnwindState* state, MonoUnwindOptions unwind_options, void* user_data);
  418. gboolean il2cpp_mono_thread_state_init_from_current(MonoThreadUnwindState* ctx);
  419. gboolean il2cpp_mono_thread_state_init_from_monoctx(MonoThreadUnwindState* ctx, MonoContext* mctx);
  420. MonoJitInfo* il2cpp_mini_jit_info_table_find(MonoDomain* domain, char* addr, MonoDomain** out_domain);
  421. void il2cpp_mono_restore_context(MonoContext* ctx);
  422. MonoMethod* il2cpp_mono_method_get_declaring_generic_method(MonoMethod* method);
  423. MonoMethod* il2cpp_jinfo_get_method(MonoJitInfo *ji);
  424. gboolean il2cpp_mono_find_prev_seq_point_for_native_offset(MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
  425. SOCKET il2cpp_mono_w32socket_accept_internal(SOCKET s, struct sockaddr *addr, socklen_t *addrlen, gboolean blocking);
  426. gboolean il2cpp_mono_find_next_seq_point_for_native_offset(MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
  427. gboolean il2cpp_mono_class_has_parent(MonoClass *klass, MonoClass *parent);
  428. MonoGenericParam* il2cpp_mono_generic_container_get_param(MonoGenericContainer *gc, int i);
  429. gboolean il2cpp_mono_find_seq_point(MonoDomain *domain, MonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point);
  430. void il2cpp_mono_seq_point_iterator_init(SeqPointIterator* it, MonoSeqPointInfo* info);
  431. gboolean il2cpp_mono_seq_point_iterator_next(SeqPointIterator* it);
  432. void il2cpp_mono_seq_point_init_next(MonoSeqPointInfo* info, SeqPoint sp, SeqPoint* next);
  433. MonoSeqPointInfo* il2cpp_mono_get_seq_points(MonoDomain *domain, MonoMethod *method);
  434. void IL2CPP_G_BREAKPOINT();
  435. void il2cpp_mono_thread_info_safe_suspend_and_run(MonoNativeThreadId id, gboolean interrupt_kernel, MonoSuspendThreadCallback callback, gpointer user_data);
  436. void il2cpp_mono_error_cleanup(MonoError *oerror);
  437. MonoException* il2cpp_mono_error_convert_to_exception(MonoError *target_error);
  438. const char* il2cpp_mono_error_get_message(MonoError *oerror);
  439. void il2cpp_mono_error_assert_ok_pos(MonoError *error, const char* filename, int lineno);
  440. Il2CppSequencePoint* il2cpp_get_method_sequence_points(MonoMethod* method, void* *iter);
  441. MonoClass* il2cpp_class_get_nested_types_accepts_generic(MonoClass *monoClass, void* *iter);
  442. MonoClass* il2cpp_defaults_object_class();
  443. guint8 il2cpp_array_rank(MonoArray *monoArr);
  444. const char* il2cpp_image_name(MonoImage *monoImage);
  445. guint8* il2cpp_field_get_address(MonoObject *obj, MonoClassField *monoField);
  446. MonoType* il2cpp_mono_object_get_type(MonoObject* object);
  447. MonoClass* il2cpp_defaults_exception_class();
  448. MonoImage* il2cpp_defaults_corlib_image();
  449. bool il2cpp_method_is_string_ctor(const MonoMethod * method);
  450. MonoClass* il2cpp_defaults_void_class();
  451. MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot);
  452. gboolean il2cpp_field_is_deleted(MonoClassField *field);
  453. MonoClass* il2cpp_iterate_loaded_classes(void* *iter);
  454. MonoAssembly* il2cpp_domain_get_assemblies_iter(MonoAppDomain *domain, void* *iter);
  455. const char** il2cpp_get_source_files_for_type(MonoClass *klass, int *count);
  456. MonoMethod* il2cpp_method_get_generic_definition(MonoMethodInflated *imethod);
  457. MonoGenericInst* il2cpp_method_get_generic_class_inst(MonoMethodInflated *imethod);
  458. MonoClass* il2cpp_generic_class_get_container_class(MonoGenericClass *gclass);
  459. void il2cpp_mono_thread_detach(MonoThread* thread);
  460. MonoClass* il2cpp_mono_get_string_class(void);
  461. Il2CppSequencePoint* il2cpp_get_sequence_point(MonoImage* image, int id);
  462. char* il2cpp_assembly_get_full_name(MonoAssembly *assembly);
  463. const MonoMethod* il2cpp_get_seq_point_method(Il2CppSequencePoint *seqPoint);
  464. const MonoClass* il2cpp_get_class_from_index(int index);
  465. const MonoType* il2cpp_get_type_from_index(int index);
  466. const MonoType* il2cpp_get_type_from_method_context(MonoType* type, const MonoMethod* method);
  467. const MonoType* il2cpp_type_inflate(MonoType* type, const MonoGenericContext* context);
  468. void il2cpp_debugger_get_method_execution_context_and_header_info(const MonoMethod* method, uint32_t* executionContextInfoCount, const Il2CppMethodExecutionContextInfo **executionContextInfo, const Il2CppMethodHeaderInfo **headerInfo, const Il2CppMethodScope **scopes);
  469. Il2CppThreadUnwindState* il2cpp_debugger_get_thread_context();
  470. MonoGenericContext* il2cpp_mono_generic_class_get_context(MonoGenericClass *gclass);
  471. MonoType* il2cpp_mono_class_get_byref_type(MonoClass *klass);
  472. mono_bool il2cpp_mono_image_is_dynamic(MonoImage *image);
  473. MonoGenericClass* il2cpp_m_type_get_generic_class(MonoType* type);
  474. const MonoAssembly* il2cpp_m_method_get_assembly(MonoMethod* method);
  475. const MonoAssembly* il2cpp_m_domain_get_corlib(MonoDomain *domain);
  476. mono_bool il2cpp_m_class_is_initialized(MonoClass* klass);
  477. Il2CppSequencePointSourceFile* il2cpp_debug_get_source_file(MonoImage* image, int index);
  478. MonoDebugLocalsInfo* il2cpp_debug_lookup_locals(MonoMethod *method);
  479. void il2cpp_debug_free_locals(MonoDebugLocalsInfo *info);
  480. Il2CppCatchPoint* il2cpp_get_method_catch_points(MonoMethod* method, void* *iter);
  481. Il2CppSequencePoint* il2cpp_get_seq_point_from_catch_point(Il2CppCatchPoint *cp);
  482. #endif // RUNTIME_IL2CPP