diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index cfdc590d6b5e..423f9a47c23c 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -5759,7 +5759,7 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal, uint64_t gboolean found = FALSE; for (int k = 0; ss_req->user_assemblies[k]; k++) { - if (ss_req->user_assemblies[k] == VM_METHOD_GET_DECLARING_TYPE(sequence_pt->method)->image->assembly) + if (ss_req->user_assemblies[k] == sequence_pt->method->klass->image->assembly) { found = TRUE; break; @@ -6721,7 +6721,7 @@ unity_debugger_agent_handle_exception(MonoException *exc, Il2CppSequencePointC * if (assemblies) { for (k = 0; assemblies[k]; ++k) - if (assemblies[k] == VM_METHOD_GET_DECLARING_TYPE(sequencePoint->method)->image->assembly) + if (assemblies[k] == sequencePoint->method->klass->image->assembly) found = TRUE; } if (!found) @@ -8010,64 +8010,64 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 return err; sig = mono_method_signature (m); - if (VM_METHOD_GET_DECLARING_TYPE(m)->valuetype) - this_buf = (guint8 *)g_alloca (mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); + if (m->klass->valuetype) + this_buf = (guint8 *)g_alloca (mono_class_instance_size (m->klass)); else this_buf = (guint8 *)g_alloca (sizeof (MonoObject*)); - if (VM_METHOD_GET_DECLARING_TYPE(m)->valuetype && (VM_METHOD_GET_FLAGS(m) & METHOD_ATTRIBUTE_STATIC)) { + if (m->klass->valuetype && (m->flags & METHOD_ATTRIBUTE_STATIC)) { /* Should be null */ int type = decode_byte (p, &p, end); if (type != VALUE_TYPE_ID_NULL) { DEBUG_PRINTF (1, "[%p] Error: Static vtype method invoked with this argument.\n", (gpointer) (gsize) mono_native_thread_id_get ()); return ERR_INVALID_ARGUMENT; } - memset (this_buf, 0, mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); - } else if (VM_METHOD_GET_DECLARING_TYPE(m)->valuetype && !strcmp (VM_METHOD_GET_NAME(m), ".ctor")) { + memset (this_buf, 0, mono_class_instance_size (m->klass)); + } else if (m->klass->valuetype && !strcmp (m->name, ".ctor")) { /* Could be null */ guint8 *tmp_p; int type = decode_byte (p, &tmp_p, end); if (type == VALUE_TYPE_ID_NULL) { - memset (this_buf, 0, mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); + memset (this_buf, 0, mono_class_instance_size (m->klass)); p = tmp_p; } else { - err = decode_value(VM_METHOD_GET_DECLARING_TYPE(m)->byval_arg, domain, this_buf, p, &p, end); + err = decode_value(m->klass->byval_arg, domain, this_buf, p, &p, end); if (err != ERR_NONE) return err; } } else { - err = decode_value (VM_METHOD_GET_DECLARING_TYPE(m)->byval_arg, domain, this_buf, p, &p, end); + err = decode_value (m->klass->byval_arg, domain, this_buf, p, &p, end); if (err != ERR_NONE) return err; } - if (!VM_METHOD_GET_DECLARING_TYPE(m)->valuetype) + if (!m->klass->valuetype) this_arg = *(MonoObject**)this_buf; else this_arg = NULL; - if (MONO_CLASS_IS_INTERFACE (VM_METHOD_GET_DECLARING_TYPE(m))) { + if (MONO_CLASS_IS_INTERFACE (m->klass)) { if (!this_arg) { DEBUG_PRINTF (1, "[%p] Error: Interface method invoked without this argument.\n", (gpointer) (gsize) mono_native_thread_id_get ()); return ERR_INVALID_ARGUMENT; } m = mono_object_get_virtual_method (this_arg, m); /* Transform this to the format the rest of the code expects it to be */ - if (VM_METHOD_GET_DECLARING_TYPE(m)->valuetype) { - this_buf = (guint8 *)g_alloca (mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); - memcpy (this_buf, mono_object_unbox (this_arg), mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); + if (m->klass->valuetype) { + this_buf = (guint8 *)g_alloca (mono_class_instance_size (m->klass)); + memcpy (this_buf, mono_object_unbox (this_arg), mono_class_instance_size (m->klass)); } - } else if ((VM_METHOD_GET_FLAGS(m) & METHOD_ATTRIBUTE_VIRTUAL) && !VM_METHOD_GET_DECLARING_TYPE(m)->valuetype && invoke->flags & INVOKE_FLAG_VIRTUAL) { + } else if ((m->flags & METHOD_ATTRIBUTE_VIRTUAL) && !m->klass->valuetype && invoke->flags & INVOKE_FLAG_VIRTUAL) { if (!this_arg) { DEBUG_PRINTF (1, "[%p] Error: invoke with INVOKE_FLAG_VIRTUAL flag set without this argument.\n", (gpointer) (gsize) mono_native_thread_id_get ()); return ERR_INVALID_ARGUMENT; } m = mono_object_get_virtual_method (this_arg, m); - if (VM_METHOD_GET_DECLARING_TYPE(m)->valuetype) { - this_buf = (guint8 *)g_alloca (mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); - memcpy (this_buf, mono_object_unbox (this_arg), mono_class_instance_size (VM_METHOD_GET_DECLARING_TYPE(m))); + if (m->klass->valuetype) { + this_buf = (guint8 *)g_alloca (mono_class_instance_size (m->klass)); + memcpy (this_buf, mono_object_unbox (this_arg), mono_class_instance_size (m->klass)); } } @@ -8076,13 +8076,13 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 if (this_arg && VM_OBJECT_GET_DOMAIN(this_arg) != domain) NOT_IMPLEMENTED; - if (!VM_METHOD_GET_DECLARING_TYPE(m)->valuetype && !(VM_METHOD_GET_FLAGS(m) & METHOD_ATTRIBUTE_STATIC) && !this_arg) { - if (!strcmp (VM_METHOD_GET_NAME(m), ".ctor")) { - if (mono_class_is_abstract (VM_METHOD_GET_DECLARING_TYPE(m))) + if (!m->klass->valuetype && !(m->flags & METHOD_ATTRIBUTE_STATIC) && !this_arg) { + if (!strcmp (m->name, ".ctor")) { + if (mono_class_is_abstract (m->klass)) return ERR_INVALID_ARGUMENT; else { MonoError error; - this_arg = mono_object_new_checked (domain, VM_METHOD_GET_DECLARING_TYPE(m), &error); + this_arg = mono_object_new_checked (domain, m->klass, &error); mono_error_assert_ok (&error); } } else { @@ -8090,7 +8090,7 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 } } - if (this_arg && !obj_is_of_type (this_arg, VM_METHOD_GET_DECLARING_TYPE(m)->byval_arg)) + if (this_arg && !obj_is_of_type (this_arg, m->klass->byval_arg)) return ERR_INVALID_ARGUMENT; nargs = decode_int (p, &p, end); @@ -8157,7 +8157,7 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 #endif mono_stopwatch_start (&watch); - res = mono_runtime_try_invoke (m, VM_METHOD_GET_DECLARING_TYPE (m)->valuetype ? (gpointer)this_buf : (gpointer)this_arg, args, &exc, &error); + res = mono_runtime_try_invoke (m, m->klass->valuetype ? (gpointer)this_buf : (gpointer)this_arg, args, &exc, &error); if (!mono_error_ok (&error) && exc == NULL) { exc = (MonoObject*) mono_error_convert_to_exception (&error); } else { @@ -8180,11 +8180,11 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 if (VM_METHOD_IS_STRING_CTOR(m)) { buffer_add_value (buf, &mono_get_string_class ()->byval_arg, &res, domain); } else if ( sig->ret->type == MONO_TYPE_VOID && !VM_METHOD_IS_STRING_CTOR(m)) { - if (!strcmp (VM_METHOD_GET_NAME (m), ".ctor")) { - if (!VM_METHOD_GET_DECLARING_TYPE (m)->valuetype) + if (!strcmp (m->name, ".ctor")) { + if (!m->klass->valuetype) buffer_add_value (buf, VM_DEFAULTS_OBJECT_CLASS->byval_arg, &this_arg, domain); else - buffer_add_value (buf, VM_METHOD_GET_DECLARING_TYPE (m)->byval_arg, this_buf, domain); + buffer_add_value (buf, m->klass->byval_arg, this_buf, domain); } else { buffer_add_value (buf, VM_DEFAULTS_VOID_CLASS->byval_arg, NULL, domain); } @@ -8207,7 +8207,7 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 } if (out_this) /* Return the new value of the receiver after the call */ - buffer_add_value (buf, VM_METHOD_GET_DECLARING_TYPE(m)->byval_arg, this_buf, domain); + buffer_add_value (buf, m->klass->byval_arg, this_buf, domain); if (out_args) { buffer_add_int (buf, nargs); for (i = 0; i < nargs; ++i) { @@ -10324,8 +10324,8 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g gboolean is_inflated = FALSE; if (CHECK_PROTOCOL_VERSION (2, 12)) { guint8 attrs = 0; - is_generic = VM_METHOD_IS_GENERIC(method); - is_inflated = VM_METHOD_IS_INFLATED(method); + is_generic = method->is_generic; + is_inflated = method->is_inflated; if (is_generic) attrs |= (1 << 0); if (mono_method_signature (method)->generic_param_count) @@ -10341,7 +10341,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g result = VM_INFLATED_METHOD_GET_DECLARING(imethod); if (VM_INFLATED_METHOD_GET_CLASS_INST(imethod)) { - MonoClass *klass = VM_METHOD_GET_DECLARING_TYPE((MonoMethod *) imethod); + MonoClass *klass = ((MonoMethod *) imethod)->klass; /*Generic methods gets the context of the GTD.*/ if (mono_class_get_context (klass)) { MonoError error; @@ -10544,7 +10544,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g } ginst = mono_metadata_get_generic_inst (type_argc, type_argv); g_free (type_argv); - tmp_context.class_inst = mono_class_is_ginst (VM_METHOD_GET_DECLARING_TYPE(method)) ? VM_GENERIC_CLASS_GET_INST(mono_class_get_generic_class (VM_METHOD_GET_DECLARING_TYPE(method))) : NULL; + tmp_context.class_inst = mono_class_is_ginst (method->klass) ? VM_GENERIC_CLASS_GET_INST(mono_class_get_generic_class (method->klass)) : NULL; tmp_context.method_inst = ginst; inflated = mono_class_inflate_generic_method_checked (method, &tmp_context, &error); @@ -10915,7 +10915,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) case CMD_STACK_FRAME_GET_THIS: { if (frame->method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) return ERR_ABSENT_INFORMATION; - if (VM_METHOD_GET_DECLARING_TYPE (frame->api_method)->valuetype) { + if (frame->api_method->klass->valuetype) { if (!sig->hasthis) { MonoObject *p = NULL; buffer_add_value (buf, VM_DEFAULTS_OBJECT_CLASS->byval_arg, &p, frame->domain); @@ -10935,7 +10935,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) { if (tls->il2cpp_context.sequencePoints[frame_index]->method == frame->actual_method) { - buffer_add_value_full (buf, VM_METHOD_GET_DECLARING_TYPE (frame->actual_method)->this_arg, tls->il2cpp_context.executionContexts[frame_index]->values[0], frame->domain, TRUE, NULL); + buffer_add_value_full (buf, frame->actual_method->klass->this_arg, tls->il2cpp_context.executionContexts[frame_index]->values[0], frame->domain, TRUE, NULL); break; } } @@ -10944,7 +10944,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) } else { if (!sig->hasthis) { MonoObject *p = NULL; - buffer_add_value (buf, VM_METHOD_GET_DECLARING_TYPE (frame->actual_method)->byval_arg, &p, frame->domain); + buffer_add_value (buf, frame->actual_method->klass->byval_arg, &p, frame->domain); } else { #ifndef IL2CPP_MONO_DEBUGGER if (frame->ji->is_interp) { @@ -11057,7 +11057,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) void *var; #endif - t = VM_METHOD_GET_DECLARING_TYPE(frame->actual_method)->byval_arg; + t = frame->actual_method->klass->byval_arg; /* Checked by the sender */ g_assert (MONO_TYPE_ISSTRUCT (t)); @@ -11080,7 +11080,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) } #else GetVariable (tls, frame, kMethodVariableKindC_This, 0, &t, &var); - il2cpp_set_var(val_buf, var, VM_METHOD_GET_DECLARING_TYPE(frame->actual_method)->this_arg); + il2cpp_set_var(val_buf, var, frame->actual_method->klass->this_arg); #endif break; } @@ -11868,7 +11868,7 @@ unity_process_breakpoint_inner(DebuggerTlsData *tls, gboolean from_signal, Il2Cp if (from_signal) g_assert_not_reached(); - if (VM_METHOD_GET_WRAPPER_TYPE(method) || tls->disable_breakpoints) + if (method->wrapper_type || tls->disable_breakpoints) return; bp_reqs = g_ptr_array_new(); diff --git a/mono/mini/il2cpp-c-types.h b/mono/mini/il2cpp-c-types.h index 388b551b69ec..d5b9cab9fa18 100644 --- a/mono/mini/il2cpp-c-types.h +++ b/mono/mini/il2cpp-c-types.h @@ -12,13 +12,13 @@ #define MonoType Il2CppType #define MonoClass Il2CppClass #define MonoImage Il2CppImage +#define MonoMethod MethodInfo //still stubs everywhere typedef struct _Il2CppMonoAssemblyName Il2CppMonoAssemblyNameReplacement; typedef struct _Il2CppMonoAssembly Il2CppMonoAssembly; typedef struct _Il2CppMonoDomain Il2CppMonoDomain; typedef struct _Il2CppMonoMethodSignature Il2CppMonoMethodSignature; -typedef struct MethodInfo Il2CppMonoMethod; typedef struct FieldInfo Il2CppMonoClassField; typedef struct Il2CppArrayType Il2CppMonoArrayType; typedef struct Il2CppGenericParam Il2CppMonoGenericParam; @@ -88,7 +88,7 @@ struct _Il2CppMonoException struct _Il2CppMonoMethodInflated { - Il2CppMonoMethod *declaring; + MonoMethod *declaring; Il2CppMonoGenericContext context; }; @@ -96,8 +96,8 @@ struct _Il2CppMonoStackFrameInfo { MonoStackFrameType type; MonoJitInfo *ji; - Il2CppMonoMethod *method; - Il2CppMonoMethod *actual_method; + MonoMethod *method; + MonoMethod *actual_method; Il2CppMonoDomain *domain; gboolean managed; gboolean async_context; @@ -113,7 +113,7 @@ struct _Il2CppMonoStackFrameInfo struct _Il2CppMonoCustomAttrEntry { - Il2CppMonoMethod *ctor; + MonoMethod *ctor; uint32_t data_size; const mono_byte* data; }; @@ -226,7 +226,7 @@ typedef struct { const Il2CppMethodExecutionContextInfoC* const executionContextInfos; const uint32_t executionContextInfoCount; - const Il2CppMonoMethod* method; + const MonoMethod* method; const char* const sourceFile; const uint8_t sourceFileHash[16]; const int32_t lineStart, lineEnd; @@ -258,7 +258,7 @@ typedef void (*Il2CppMonoProfileFunc) (Il2CppMonoProfiler *prof); typedef void (*Il2CppMonoProfileAppDomainFunc) (Il2CppMonoProfiler *prof, Il2CppMonoDomain *domain); typedef void (*Il2CppMonoProfileAppDomainResult) (Il2CppMonoProfiler *prof, Il2CppMonoDomain *domain, int result); typedef void (*Il2CppMonoProfileAssemblyFunc) (Il2CppMonoProfiler *prof, Il2CppMonoAssembly *assembly); -typedef void (*Il2CppMonoProfileJitResult) (Il2CppMonoProfiler *prof, Il2CppMonoMethod *method, MonoJitInfo* jinfo, int result); +typedef void (*Il2CppMonoProfileJitResult) (Il2CppMonoProfiler *prof, MonoMethod *method, MonoJitInfo* jinfo, int result); typedef void (*Il2CppMonoProfileAssemblyResult) (Il2CppMonoProfiler *prof, Il2CppMonoAssembly *assembly, int result); typedef void (*Il2CppMonoProfileThreadFunc) (Il2CppMonoProfiler *prof, uintptr_t tid); typedef gboolean (*Il2CppMonoJitStackWalk) (Il2CppMonoStackFrameInfo *frame, MonoContext *ctx, gpointer data); diff --git a/mono/mini/il2cpp-compat.h b/mono/mini/il2cpp-compat.h index 6b1e67b19419..1d7cf15baafe 100644 --- a/mono/mini/il2cpp-compat.h +++ b/mono/mini/il2cpp-compat.h @@ -37,12 +37,6 @@ #define VM_ASSEMBLY_NAME_GET_PUBLIC_KEY_TOKEN(assembly, i) il2cpp_assembly_name_public_key_token(assembly, i) #define VM_ASSEMBLY_NAME_GET_PUBLIC_KEY_TOKEN_STRING(assembly) il2cpp_assembly_name_public_key_token_string(assembly) #define VM_ASSEMBLY_NAME_GET_FLAGS(assembly) il2cpp_assembly_name_flags(assembly) -#define VM_METHOD_GET_WRAPPER_TYPE(method) FALSE -#define VM_METHOD_GET_DECLARING_TYPE(method) il2cpp_method_get_declaring_type(method) -#define VM_METHOD_GET_FLAGS(method) il2cpp_method_get_flags_no_iflags(method) -#define VM_METHOD_GET_NAME(method) il2cpp_method_get_name(method) -#define VM_METHOD_IS_GENERIC(method) il2cpp_method_is_generic(method) -#define VM_METHOD_IS_INFLATED(method) il2cpp_method_is_inflated(method) #define VM_METHOD_IS_STRING_CTOR(method) il2cpp_method_is_string_ctor(method) #define VM_INFLATED_METHOD_GET_DECLARING(imethod) il2cpp_method_get_generic_definition(imethod) #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) il2cpp_method_get_generic_class_inst(imethod) @@ -98,12 +92,6 @@ #define VM_ASSEMBLY_NAME_GET_PUBLIC_KEY_TOKEN(assembly, i) (assembly)->aname.public_key_token[i] #define VM_ASSEMBLY_NAME_GET_PUBLIC_KEY_TOKEN_STRING(assembly) (char*)(assembly)->aname.public_key_token #define VM_ASSEMBLY_NAME_GET_FLAGS(assembly) (assembly)->aname.flags -#define VM_METHOD_GET_WRAPPER_TYPE(method) method->wrapper_type -#define VM_METHOD_GET_DECLARING_TYPE(method) (method)->klass -#define VM_METHOD_GET_FLAGS(method) (method)->flags -#define VM_METHOD_GET_NAME(method) (method)->name -#define VM_METHOD_IS_GENERIC(method) method->is_generic -#define VM_METHOD_IS_INFLATED(method) method->is_inflated #define VM_METHOD_IS_STRING_CTOR(method) method->string_ctor #define VM_INFLATED_METHOD_GET_DECLARING(imethod) (imethod)->declaring #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) (imethod)->context.class_inst @@ -145,7 +133,6 @@ #define MonoAppDomain Il2CppMonoAppDomain #define MonoDomain Il2CppMonoDomain #define MonoMethodSignature Il2CppMonoMethodSignature -#define MonoMethod Il2CppMonoMethod #define MonoClassField Il2CppMonoClassField #define MonoArrayType Il2CppMonoArrayType #define MonoGenericParam Il2CppMonoGenericParam @@ -397,17 +384,17 @@ #define mono_get_string_class il2cpp_mono_get_string_class -Il2CppMonoMethod* il2cpp_mono_image_get_entry_point (MonoImage *image); +MonoMethod* il2cpp_mono_image_get_entry_point (MonoImage *image); const char* il2cpp_mono_image_get_filename (MonoImage *image); const char* il2cpp_mono_image_get_guid (MonoImage *image); MonoClass* il2cpp_mono_type_get_class (MonoType *type); mono_bool il2cpp_mono_type_is_struct (MonoType *type); mono_bool il2cpp_mono_type_is_reference (MonoType *type); void il2cpp_mono_metadata_free_mh (Il2CppMonoMethodHeader *mh); -Il2CppMonoMethodSignature* il2cpp_mono_method_signature (Il2CppMonoMethod *m); -void il2cpp_mono_method_get_param_names (Il2CppMonoMethod *method, const char **names); +Il2CppMonoMethodSignature* il2cpp_mono_method_signature (MonoMethod *m); +void il2cpp_mono_method_get_param_names (MonoMethod *method, const char **names); mono_bool il2cpp_mono_type_generic_inst_is_valuetype (MonoType *type); -Il2CppMonoMethodHeader* il2cpp_mono_method_get_header_checked (Il2CppMonoMethod *method, MonoError *error); +Il2CppMonoMethodHeader* il2cpp_mono_method_get_header_checked (MonoMethod *method, MonoError *error); gboolean il2cpp_mono_class_init (MonoClass *klass); Il2CppMonoVTable* il2cpp_mono_class_vtable (Il2CppMonoDomain *domain, MonoClass *klass); Il2CppMonoClassField* il2cpp_mono_class_get_field_from_name (MonoClass *klass, const char *name); @@ -420,7 +407,7 @@ int il2cpp_mono_class_num_fields (MonoClass *klass); int il2cpp_mono_class_num_methods (MonoClass *klass); int il2cpp_mono_class_num_properties (MonoClass *klass); Il2CppMonoClassField* il2cpp_mono_class_get_fields (MonoClass* klass, gpointer *iter); -Il2CppMonoMethod* il2cpp_mono_class_get_methods (MonoClass* klass, gpointer *iter); +MonoMethod* il2cpp_mono_class_get_methods (MonoClass* klass, gpointer *iter); Il2CppMonoProperty* il2cpp_mono_class_get_properties (MonoClass* klass, gpointer *iter); const char* il2cpp_mono_field_get_name (Il2CppMonoClassField *field); mono_unichar2* il2cpp_mono_string_chars (Il2CppMonoString *s); @@ -450,18 +437,18 @@ Il2CppMonoDomain* il2cpp_mono_domain_get (void); gboolean il2cpp_mono_domain_set (Il2CppMonoDomain *domain, gboolean force); void il2cpp_mono_domain_foreach(Il2CppMonoDomainFunc func, gpointer user_data); MonoJitInfo* il2cpp_mono_jit_info_table_find(Il2CppMonoDomain* domain, char* addr); -Il2CppMonoMethod* il2cpp_mono_jit_info_get_method(MonoJitInfo* ji); -MonoDebugMethodInfo* il2cpp_mono_debug_lookup_method(Il2CppMonoMethod* method); -MonoDebugMethodJitInfo* il2cpp_mono_debug_find_method(Il2CppMonoMethod* method, Il2CppMonoDomain* domain); +MonoMethod* il2cpp_mono_jit_info_get_method(MonoJitInfo* ji); +MonoDebugMethodInfo* il2cpp_mono_debug_lookup_method(MonoMethod* method); +MonoDebugMethodJitInfo* il2cpp_mono_debug_find_method(MonoMethod* method, Il2CppMonoDomain* domain); void il2cpp_mono_debug_free_method_jit_info(MonoDebugMethodJitInfo* jit); -MonoDebugLocalsInfo* il2cpp_mono_debug_lookup_locals(Il2CppMonoMethod* method); -MonoDebugMethodAsyncInfo* il2cpp_mono_debug_lookup_method_async_debug_info(Il2CppMonoMethod* method); +MonoDebugLocalsInfo* il2cpp_mono_debug_lookup_locals(MonoMethod* method); +MonoDebugMethodAsyncInfo* il2cpp_mono_debug_lookup_method_async_debug_info(MonoMethod* method); MonoDebugSourceLocation* il2cpp_mono_debug_method_lookup_location(MonoDebugMethodInfo* minfo, int il_offset); -gint32 il2cpp_mono_debug_il_offset_from_address(Il2CppMonoMethod* method, Il2CppMonoDomain* domain, guint32 native_offset); +gint32 il2cpp_mono_debug_il_offset_from_address(MonoMethod* method, Il2CppMonoDomain* domain, guint32 native_offset); void il2cpp_mono_debug_free_source_location(MonoDebugSourceLocation* location); void il2cpp_mono_set_is_debugger_attached(gboolean attached); char* il2cpp_mono_type_full_name(MonoType* type); -char* il2cpp_mono_method_full_name(Il2CppMonoMethod* method, gboolean signature); +char* il2cpp_mono_method_full_name(MonoMethod* method, gboolean signature); void il2cpp_mono_debug_get_seq_points(MonoDebugMethodInfo* minfo, char** source_file, GPtrArray** source_file_list, int** source_files, MonoSymSeqPoint** seq_points, int* n_seq_points); void il2cpp_mono_debug_free_locals(MonoDebugLocalsInfo* info); void il2cpp_mono_debug_free_method_async_debug_info(MonoDebugMethodAsyncInfo* info); @@ -473,7 +460,7 @@ void il2cpp_mono_domain_unlock(Il2CppMonoDomain* domain); MonoJitInfo* il2cpp_mono_jit_info_table_find_internal(Il2CppMonoDomain* domain, char* addr, gboolean try_aot, gboolean allow_trampolines); guint il2cpp_mono_aligned_addr_hash(gconstpointer ptr); Il2CppMonoGenericInst* il2cpp_mono_metadata_get_generic_inst(int type_argc, MonoType** type_argv); -Il2CppMonoMethod* il2cpp_mono_get_method_checked(MonoImage* image, guint32 token, MonoClass* klass, Il2CppMonoGenericContext* context, MonoError* error); +MonoMethod* il2cpp_mono_get_method_checked(MonoImage* image, guint32 token, MonoClass* klass, Il2CppMonoGenericContext* context, MonoError* error); int il2cpp_mono_class_interface_offset_with_variance(MonoClass* klass, MonoClass* itf, gboolean* non_exact_match); void il2cpp_mono_class_setup_supertypes(MonoClass* klass); void il2cpp_mono_class_setup_vtable(MonoClass* klass); @@ -481,15 +468,15 @@ void il2cpp_mono_class_setup_methods(MonoClass* klass); gboolean il2cpp_mono_class_field_is_special_static(Il2CppMonoClassField* field); guint32 il2cpp_mono_class_field_get_special_static_type(Il2CppMonoClassField* field); Il2CppMonoGenericContext* il2cpp_mono_class_get_context(MonoClass* klass); -Il2CppMonoGenericContext* il2cpp_mono_method_get_context(Il2CppMonoMethod* method); -Il2CppMonoGenericContainer* il2cpp_mono_method_get_generic_container(Il2CppMonoMethod* method); -Il2CppMonoMethod* il2cpp_mono_class_inflate_generic_method_full_checked(Il2CppMonoMethod* method, MonoClass* klass_hint, Il2CppMonoGenericContext* context, MonoError* error); -Il2CppMonoMethod* il2cpp_mono_class_inflate_generic_method_checked(Il2CppMonoMethod* method, Il2CppMonoGenericContext* context, MonoError* error); +Il2CppMonoGenericContext* il2cpp_mono_method_get_context(MonoMethod* method); +Il2CppMonoGenericContainer* il2cpp_mono_method_get_generic_container(MonoMethod* method); +MonoMethod* il2cpp_mono_class_inflate_generic_method_full_checked(MonoMethod* method, MonoClass* klass_hint, Il2CppMonoGenericContext* context, MonoError* error); +MonoMethod* il2cpp_mono_class_inflate_generic_method_checked(MonoMethod* method, Il2CppMonoGenericContext* context, MonoError* error); void il2cpp_mono_loader_lock(); void il2cpp_mono_loader_unlock(); void il2cpp_mono_loader_lock_track_ownership(gboolean track); gboolean il2cpp_mono_loader_lock_is_owned_by_self(); -gpointer il2cpp_mono_method_get_wrapper_data(Il2CppMonoMethod* method, guint32 id); +gpointer il2cpp_mono_method_get_wrapper_data(MonoMethod* method, guint32 id); char* il2cpp_mono_type_get_name_full(MonoType* type, MonoTypeNameFormat format); gboolean il2cpp_mono_class_is_nullable(MonoClass* klass); Il2CppMonoGenericContainer* il2cpp_mono_class_get_generic_container(MonoClass* klass); @@ -508,7 +495,7 @@ void il2cpp_mono_thread_set_name_internal(Il2CppMonoInternalThread* this_obj, Il void il2cpp_mono_thread_suspend_all_other_threads(); void il2cpp_mono_stack_mark_record_size(MonoThreadInfo* info, HandleStackMark* stackmark, const char* func_name); Il2CppMonoRuntimeExceptionHandlingCallbacks* il2cpp_mono_get_eh_callbacks(); -void il2cpp_mono_reflection_create_custom_attr_data_args(MonoImage* image, Il2CppMonoMethod* method, const guchar* data, guint32 len, Il2CppMonoArray** typed_args, Il2CppMonoArray** named_args, CattrNamedArg** named_arg_info, MonoError* error); +void il2cpp_mono_reflection_create_custom_attr_data_args(MonoImage* image, MonoMethod* method, const guchar* data, guint32 len, Il2CppMonoArray** typed_args, Il2CppMonoArray** named_args, CattrNamedArg** named_arg_info, MonoError* error); void il2cpp_mono_nullable_init(guint8* buf, Il2CppMonoObject* value, MonoClass* klass); Il2CppMonoObject* il2cpp_mono_value_box_checked(Il2CppMonoDomain* domain, MonoClass* klass, gpointer value, MonoError* error); void il2cpp_mono_field_static_get_value_checked(Il2CppMonoVTable* vt, Il2CppMonoClassField* field, void* value, MonoError* error); @@ -516,8 +503,8 @@ void il2cpp_mono_field_static_get_value_for_thread(Il2CppMonoInternalThread* thr Il2CppMonoObject* il2cpp_mono_field_get_value_object_checked(Il2CppMonoDomain* domain, Il2CppMonoClassField* field, Il2CppMonoObject* obj, MonoError* error); Il2CppMonoObject* il2cpp_mono_object_new_checked(Il2CppMonoDomain* domain, MonoClass* klass, MonoError* error); Il2CppMonoString* il2cpp_mono_ldstr_checked(Il2CppMonoDomain* domain, MonoImage* image, guint32 idx, MonoError* error); -Il2CppMonoObject* il2cpp_mono_runtime_try_invoke(Il2CppMonoMethod* method, void* obj, void** params, Il2CppMonoObject** exc, MonoError* error); -Il2CppMonoObject* il2cpp_mono_runtime_invoke_checked(Il2CppMonoMethod* method, void* obj, void** params, MonoError* error); +Il2CppMonoObject* il2cpp_mono_runtime_try_invoke(MonoMethod* method, void* obj, void** params, Il2CppMonoObject** exc, MonoError* error); +Il2CppMonoObject* il2cpp_mono_runtime_invoke_checked(MonoMethod* method, void* obj, void** params, MonoError* error); void il2cpp_mono_gc_base_init(); int il2cpp_mono_gc_register_root(char* start, size_t size, MonoGCDescriptor descr, MonoGCRootSource source, const char* msg); void il2cpp_mono_gc_deregister_root(char* addr); @@ -527,9 +514,9 @@ void il2cpp_mono_threadpool_suspend(); void il2cpp_mono_threadpool_resume(); MonoImage* il2cpp_mono_assembly_get_image(Il2CppMonoAssembly* assembly); gboolean il2cpp_mono_runtime_try_shutdown(); -gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(Il2CppMonoMethod* method); +gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(MonoMethod* method); MonoType* il2cpp_mono_reflection_get_type_checked(MonoImage* rootimage, MonoImage* image, Il2CppMonoTypeNameParse* info, gboolean ignorecase, gboolean* type_resolve, MonoError* error); -Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_method_checked(Il2CppMonoMethod* method, MonoError* error); +Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_method_checked(MonoMethod* method, MonoError* error); Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_class_checked(MonoClass* klass, MonoError* error); Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_property_checked(MonoClass* klass, Il2CppMonoProperty* property, MonoError* error); Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_field_checked(MonoClass* klass, Il2CppMonoClassField* field, MonoError* error); @@ -539,12 +526,12 @@ void il2cpp_mono_network_init(); gint il2cpp_mono_w32socket_set_blocking(SOCKET sock, gboolean blocking); char* il2cpp_mono_get_runtime_build_info(); -Il2CppMonoMethod* il2cpp_mono_marshal_method_from_wrapper(Il2CppMonoMethod* wrapper); +MonoMethod* il2cpp_mono_marshal_method_from_wrapper(MonoMethod* wrapper); MonoDebugOptions* il2cpp_mini_get_debug_options(); -gpointer il2cpp_mono_jit_find_compiled_method_with_jit_info(Il2CppMonoDomain* domain, Il2CppMonoMethod* method, MonoJitInfo** ji); +gpointer il2cpp_mono_jit_find_compiled_method_with_jit_info(Il2CppMonoDomain* domain, MonoMethod* method, MonoJitInfo** ji); MonoLMF** il2cpp_mono_get_lmf_addr(); void il2cpp_mono_set_lmf(MonoLMF* lmf); -gpointer il2cpp_mono_aot_get_method_checked(Il2CppMonoDomain* domain, Il2CppMonoMethod* method, MonoError* error); +gpointer il2cpp_mono_aot_get_method_checked(Il2CppMonoDomain* domain, MonoMethod* method, MonoError* error); void il2cpp_mono_arch_setup_resume_sighandler_ctx(MonoContext* ctx, gpointer func); void il2cpp_mono_arch_set_breakpoint(MonoJitInfo* ji, guint8* ip); void il2cpp_mono_arch_clear_breakpoint(MonoJitInfo* ji, guint8* ip); @@ -562,18 +549,18 @@ gboolean il2cpp_mono_thread_state_init_from_monoctx(MonoThreadUnwindState* ctx, MonoJitInfo* il2cpp_mini_jit_info_table_find(Il2CppMonoDomain* domain, char* addr, Il2CppMonoDomain** out_domain); void il2cpp_mono_restore_context(MonoContext* ctx); gboolean il2cpp_mono_find_jit_info_ext(Il2CppMonoDomain* domain, Il2CppMonoJitTlsData* jit_tls, MonoJitInfo* prev_ji, MonoContext* ctx, MonoContext* new_ctx, char** trace, MonoLMF** lmf, mgreg_t** save_locations, StackFrameInfo* frame); -Il2CppMonoMethod* il2cpp_mono_method_get_declaring_generic_method(Il2CppMonoMethod* method); -Il2CppMonoMethod* il2cpp_jinfo_get_method (MonoJitInfo *ji); -gboolean il2cpp_mono_find_prev_seq_point_for_native_offset (Il2CppMonoDomain *domain, Il2CppMonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point); +MonoMethod* il2cpp_mono_method_get_declaring_generic_method(MonoMethod* method); +MonoMethod* il2cpp_jinfo_get_method (MonoJitInfo *ji); +gboolean il2cpp_mono_find_prev_seq_point_for_native_offset (Il2CppMonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point); SOCKET il2cpp_mono_w32socket_accept_internal (SOCKET s, struct sockaddr *addr, socklen_t *addrlen, gboolean blocking); -gboolean il2cpp_mono_find_next_seq_point_for_native_offset (Il2CppMonoDomain *domain, Il2CppMonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point); +gboolean il2cpp_mono_find_next_seq_point_for_native_offset (Il2CppMonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point); gboolean il2cpp_mono_class_has_parent (MonoClass *klass, MonoClass *parent); Il2CppMonoGenericParam* il2cpp_mono_generic_container_get_param (Il2CppMonoGenericContainer *gc, int i); -gboolean il2cpp_mono_find_seq_point (Il2CppMonoDomain *domain, Il2CppMonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point); +gboolean il2cpp_mono_find_seq_point (Il2CppMonoDomain *domain, MonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point); void il2cpp_mono_seq_point_iterator_init (SeqPointIterator* it, MonoSeqPointInfo* info); gboolean il2cpp_mono_seq_point_iterator_next (SeqPointIterator* it); void il2cpp_mono_seq_point_init_next (MonoSeqPointInfo* info, SeqPoint sp, SeqPoint* next); -MonoSeqPointInfo* il2cpp_mono_get_seq_points (Il2CppMonoDomain *domain, Il2CppMonoMethod *method); +MonoSeqPointInfo* il2cpp_mono_get_seq_points (Il2CppMonoDomain *domain, MonoMethod *method); void IL2CPP_G_BREAKPOINT(); void il2cpp_mono_thread_info_safe_suspend_and_run (MonoNativeThreadId id, gboolean interrupt_kernel, MonoSuspendThreadCallback callback, gpointer user_data); void il2cpp_mono_error_cleanup (MonoError *oerror); @@ -581,7 +568,7 @@ Il2CppMonoException* il2cpp_mono_error_convert_to_exception (MonoError *target_e const char* il2cpp_mono_error_get_message (MonoError *oerror); void il2cpp_mono_error_assert_ok_pos (MonoError *error, const char* filename, int lineno); Il2CppSequencePointC* il2cpp_get_sequence_points(void* *iter); -Il2CppSequencePointC* il2cpp_get_method_sequence_points(Il2CppMonoMethod* method, void* *iter); +Il2CppSequencePointC* il2cpp_get_method_sequence_points(MonoMethod* method, void* *iter); Il2CppMonoGenericInst* il2cpp_generic_class_get_inst(Il2CppMonoGenericClass *monoGenClass); guint il2cpp_generic_inst_type_argc(Il2CppMonoGenericInst *monoInst); MonoType* il2cpp_generic_inst_type_arg(Il2CppMonoGenericInst *monoInst, int i); @@ -605,11 +592,10 @@ MonoType* il2cpp_mono_object_get_type(Il2CppMonoObject* object); MonoClass* il2cpp_defaults_exception_class(); MonoImage* il2cpp_defaults_corlib_image(); int il2cpp_generic_container_get_type_argc(Il2CppMonoGenericClass* container); -uint32_t il2cpp_method_get_flags_no_iflags (const Il2CppMonoMethod * method); -bool il2cpp_method_is_string_ctor (const Il2CppMonoMethod * method); +bool il2cpp_method_is_string_ctor (const MonoMethod * method); MonoClass* il2cpp_defaults_void_class(); void il2cpp_set_var(guint8* newValue, void *value, MonoType *localVariableTypeMono); -Il2CppMonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot); +MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot); gboolean il2cpp_field_is_deleted(Il2CppMonoClassField *field); MonoClass* il2cpp_iterate_loaded_classes(void* *iter); Il2CppMonoAssembly* il2cpp_domain_get_assemblies_iter(Il2CppMonoAppDomain *domain, void* *iter); @@ -617,7 +603,7 @@ const char** il2cpp_get_source_files_for_type(MonoClass *klass, int *count); Il2CppMonoInternalThread* il2cpp_mono_thread_get_internal(Il2CppMonoThread* thread); uint32_t il2cpp_internal_thread_get_state(Il2CppMonoInternalThread* thread); il2cpp_internal_thread_get_threadpool_thread(Il2CppMonoInternalThread* thread); -Il2CppMonoMethod* il2cpp_method_get_generic_definition(Il2CppMonoMethodInflated *imethod); +MonoMethod* il2cpp_method_get_generic_definition(Il2CppMonoMethodInflated *imethod); Il2CppMonoGenericInst* il2cpp_method_get_generic_class_inst(Il2CppMonoMethodInflated *imethod); MonoClass* il2cpp_generic_class_get_container_class(Il2CppMonoGenericClass *gclass); void il2cpp_mono_thread_detach(Il2CppMonoThread* thread); diff --git a/mono/mini/il2cpp-stubs.cpp b/mono/mini/il2cpp-stubs.cpp index 395f6e6fe689..ac44c257d5d6 100644 --- a/mono/mini/il2cpp-stubs.cpp +++ b/mono/mini/il2cpp-stubs.cpp @@ -50,9 +50,9 @@ static MonoGHashTable *method_signatures; static il2cpp::os::Mutex s_il2cpp_mono_loader_lock(false); static uint64_t s_il2cpp_mono_loader_lock_tid = 0; -Il2CppMonoMethod* il2cpp_mono_image_get_entry_point (MonoImage *image) +MonoMethod* il2cpp_mono_image_get_entry_point (MonoImage *image) { - return (Il2CppMonoMethod*)il2cpp::vm::Image::GetEntryPoint((Il2CppImage*)image); + return (MonoMethod*)il2cpp::vm::Image::GetEntryPoint((Il2CppImage*)image); } const char* il2cpp_mono_image_get_filename (MonoImage *monoImage) @@ -86,7 +86,7 @@ void il2cpp_mono_metadata_free_mh (Il2CppMonoMethodHeader *mh) IL2CPP_ASSERT(0 && "This method is not yet implemented"); } -Il2CppMonoMethodSignature* il2cpp_mono_method_signature (Il2CppMonoMethod *m) +Il2CppMonoMethodSignature* il2cpp_mono_method_signature (MonoMethod *m) { MethodInfo* method = (MethodInfo*)m; @@ -144,7 +144,7 @@ void il2cpp_mono_free_method_signatures() } } -void il2cpp_mono_method_get_param_names (Il2CppMonoMethod *m, const char **names) +void il2cpp_mono_method_get_param_names (MonoMethod *m, const char **names) { MethodInfo* method = (MethodInfo*)m; uint32_t numberOfParameters = il2cpp::vm::Method::GetParamCount(method); @@ -160,7 +160,7 @@ mono_bool il2cpp_mono_type_generic_inst_is_valuetype (MonoType *monoType) return (typeDef->bitfield >> (kBitIsValueType - 1)) & 0x1; } -Il2CppMonoMethodHeader* il2cpp_mono_method_get_header_checked (Il2CppMonoMethod *method, MonoError *error) +Il2CppMonoMethodHeader* il2cpp_mono_method_get_header_checked (MonoMethod *method, MonoError *error) { return NULL; } @@ -228,9 +228,9 @@ Il2CppMonoClassField* il2cpp_mono_class_get_fields (MonoClass* klass, gpointer * return (Il2CppMonoClassField*)il2cpp::vm::Class::GetFields((Il2CppClass*)klass, iter); } -Il2CppMonoMethod* il2cpp_mono_class_get_methods (MonoClass* klass, gpointer *iter) +MonoMethod* il2cpp_mono_class_get_methods (MonoClass* klass, gpointer *iter) { - return (Il2CppMonoMethod*)il2cpp::vm::Class::GetMethods((Il2CppClass*)klass, iter); + return (MonoMethod*)il2cpp::vm::Class::GetMethods((Il2CppClass*)klass, iter); } Il2CppMonoProperty* il2cpp_mono_class_get_properties (MonoClass* klass, gpointer *iter) @@ -393,18 +393,18 @@ MonoJitInfo* il2cpp_mono_jit_info_table_find(Il2CppMonoDomain* domain, char* add return NULL; } -Il2CppMonoMethod* il2cpp_mono_jit_info_get_method(MonoJitInfo* ji) +MonoMethod* il2cpp_mono_jit_info_get_method(MonoJitInfo* ji) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; } -MonoDebugMethodInfo* il2cpp_mono_debug_lookup_method(Il2CppMonoMethod* method) +MonoDebugMethodInfo* il2cpp_mono_debug_lookup_method(MonoMethod* method) { return NULL; } -MonoDebugMethodJitInfo* il2cpp_mono_debug_find_method(Il2CppMonoMethod* method, Il2CppMonoDomain* domain) +MonoDebugMethodJitInfo* il2cpp_mono_debug_find_method(MonoMethod* method, Il2CppMonoDomain* domain) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -415,13 +415,13 @@ void il2cpp_mono_debug_free_method_jit_info(MonoDebugMethodJitInfo* jit) IL2CPP_ASSERT(0 && "This method is not yet implemented"); } -MonoDebugLocalsInfo* il2cpp_mono_debug_lookup_locals(Il2CppMonoMethod* method) +MonoDebugLocalsInfo* il2cpp_mono_debug_lookup_locals(MonoMethod* method) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; } -MonoDebugMethodAsyncInfo* il2cpp_mono_debug_lookup_method_async_debug_info(Il2CppMonoMethod* method) +MonoDebugMethodAsyncInfo* il2cpp_mono_debug_lookup_method_async_debug_info(MonoMethod* method) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -433,7 +433,7 @@ MonoDebugSourceLocation* il2cpp_mono_debug_method_lookup_location(MonoDebugMetho return NULL; } -gint32 il2cpp_mono_debug_il_offset_from_address(Il2CppMonoMethod* method, Il2CppMonoDomain* domain, guint32 native_offset) +gint32 il2cpp_mono_debug_il_offset_from_address(MonoMethod* method, Il2CppMonoDomain* domain, guint32 native_offset) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -455,7 +455,7 @@ char* il2cpp_mono_type_full_name(MonoType* type) return g_strdup(name.c_str()); } -char* il2cpp_mono_method_full_name(Il2CppMonoMethod* method, gboolean signature) +char* il2cpp_mono_method_full_name(MonoMethod* method, gboolean signature) { return g_strdup(((MethodInfo*)method)->name); } @@ -524,7 +524,7 @@ Il2CppMonoGenericInst* il2cpp_mono_metadata_get_generic_inst(int type_argc, Mono return (Il2CppMonoGenericInst*)il2cpp::vm::MetadataCache::GetGenericInst((Il2CppType**)type_argv, type_argc); } -Il2CppMonoMethod* il2cpp_mono_get_method_checked(MonoImage* image, guint32 token, MonoClass* klass, Il2CppMonoGenericContext* context, MonoError* error) +MonoMethod* il2cpp_mono_get_method_checked(MonoImage* image, guint32 token, MonoClass* klass, Il2CppMonoGenericContext* context, MonoError* error) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -583,7 +583,7 @@ Il2CppMonoGenericContext* il2cpp_mono_class_get_context(MonoClass* klass) return (Il2CppMonoGenericContext*)&((Il2CppClass*)klass)->generic_class->context; } -Il2CppMonoGenericContext* il2cpp_mono_method_get_context(Il2CppMonoMethod* monoMethod) +Il2CppMonoGenericContext* il2cpp_mono_method_get_context(MonoMethod* monoMethod) { MethodInfo * method = (MethodInfo*)monoMethod; @@ -593,7 +593,7 @@ Il2CppMonoGenericContext* il2cpp_mono_method_get_context(Il2CppMonoMethod* monoM return (Il2CppMonoGenericContext*) &((MethodInfo*)method)->genericMethod->context; } -Il2CppMonoGenericContainer* il2cpp_mono_method_get_generic_container(Il2CppMonoMethod* monoMethod) +Il2CppMonoGenericContainer* il2cpp_mono_method_get_generic_container(MonoMethod* monoMethod) { MethodInfo * method = (MethodInfo*)monoMethod; @@ -603,16 +603,16 @@ Il2CppMonoGenericContainer* il2cpp_mono_method_get_generic_container(Il2CppMonoM return (Il2CppMonoGenericContainer*) method->genericContainer; } -Il2CppMonoMethod* il2cpp_mono_class_inflate_generic_method_full_checked(Il2CppMonoMethod* method, MonoClass* klass_hint, Il2CppMonoGenericContext* context, MonoError* error) +MonoMethod* il2cpp_mono_class_inflate_generic_method_full_checked(MonoMethod* method, MonoClass* klass_hint, Il2CppMonoGenericContext* context, MonoError* error) { error_init(error); - return (Il2CppMonoMethod*) il2cpp::metadata::GenericMetadata::Inflate((MethodInfo*)method, (Il2CppClass*)klass_hint, (Il2CppGenericContext*)context); + return (MonoMethod*) il2cpp::metadata::GenericMetadata::Inflate((MethodInfo*)method, (Il2CppClass*)klass_hint, (Il2CppGenericContext*)context); } -Il2CppMonoMethod* il2cpp_mono_class_inflate_generic_method_checked(Il2CppMonoMethod* method, Il2CppMonoGenericContext* context, MonoError* error) +MonoMethod* il2cpp_mono_class_inflate_generic_method_checked(MonoMethod* method, Il2CppMonoGenericContext* context, MonoError* error) { error_init(error); - return (Il2CppMonoMethod*)il2cpp::metadata::GenericMetadata::Inflate((MethodInfo*)method, NULL, (Il2CppGenericContext*)context); + return (MonoMethod*)il2cpp::metadata::GenericMetadata::Inflate((MethodInfo*)method, NULL, (Il2CppGenericContext*)context); } void il2cpp_mono_loader_lock() @@ -636,7 +636,7 @@ gboolean il2cpp_mono_loader_lock_is_owned_by_self() return s_il2cpp_mono_loader_lock_tid == il2cpp::os::Thread::CurrentThreadId(); } -gpointer il2cpp_mono_method_get_wrapper_data(Il2CppMonoMethod* method, guint32 id) +gpointer il2cpp_mono_method_get_wrapper_data(MonoMethod* method, guint32 id) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -855,7 +855,7 @@ Il2CppMonoRuntimeExceptionHandlingCallbacks* il2cpp_mono_get_eh_callbacks() return NULL; } -void il2cpp_mono_reflection_create_custom_attr_data_args(MonoImage* image, Il2CppMonoMethod* method, const guchar* data, guint32 len, Il2CppMonoArray** typed_args, Il2CppMonoArray** named_args, CattrNamedArg** named_arg_info, MonoError* error) +void il2cpp_mono_reflection_create_custom_attr_data_args(MonoImage* image, MonoMethod* method, const guchar* data, guint32 len, Il2CppMonoArray** typed_args, Il2CppMonoArray** named_args, CattrNamedArg** named_arg_info, MonoError* error) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); } @@ -901,7 +901,7 @@ Il2CppMonoString* il2cpp_mono_ldstr_checked(Il2CppMonoDomain* domain, MonoImage* return NULL; } -Il2CppMonoObject* il2cpp_mono_runtime_try_invoke(Il2CppMonoMethod* method, void* obj, void** params, Il2CppMonoObject** exc, MonoError* error) +Il2CppMonoObject* il2cpp_mono_runtime_try_invoke(MonoMethod* method, void* obj, void** params, Il2CppMonoObject** exc, MonoError* error) { error_init(error); @@ -911,7 +911,7 @@ Il2CppMonoObject* il2cpp_mono_runtime_try_invoke(Il2CppMonoMethod* method, void* return (Il2CppMonoObject*)il2cpp::vm::Runtime::Invoke((MethodInfo*)method, obj, params, (Il2CppException**)exc); } -Il2CppMonoObject* il2cpp_mono_runtime_invoke_checked(Il2CppMonoMethod* method, void* obj, void** params, MonoError* error) +Il2CppMonoObject* il2cpp_mono_runtime_invoke_checked(MonoMethod* method, void* obj, void** params, MonoError* error) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -981,7 +981,7 @@ gboolean il2cpp_mono_runtime_try_shutdown() return TRUE; } -gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(Il2CppMonoMethod* method) +gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(MonoMethod* method) { if (!method) return FALSE; @@ -1003,7 +1003,7 @@ MonoType* il2cpp_mono_reflection_get_type_checked(MonoImage* rootimage, MonoImag return (MonoType*)il2cpp::vm::Class::GetType(klass); } -Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_method_checked(Il2CppMonoMethod* method, MonoError* error) +Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_method_checked(MonoMethod* method, MonoError* error) { error_init(error); return NULL; @@ -1053,7 +1053,7 @@ char* il2cpp_mono_get_runtime_build_info() return g_strdup_printf ("%s (%s)", "0.0", "IL2CPP"); } -Il2CppMonoMethod* il2cpp_mono_marshal_method_from_wrapper(Il2CppMonoMethod* wrapper) +MonoMethod* il2cpp_mono_marshal_method_from_wrapper(MonoMethod* wrapper) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -1065,7 +1065,7 @@ MonoDebugOptions* il2cpp_mini_get_debug_options() return NULL; } -gpointer il2cpp_mono_jit_find_compiled_method_with_jit_info(Il2CppMonoDomain* domain, Il2CppMonoMethod* method, MonoJitInfo** ji) +gpointer il2cpp_mono_jit_find_compiled_method_with_jit_info(Il2CppMonoDomain* domain, MonoMethod* method, MonoJitInfo** ji) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -1082,7 +1082,7 @@ void il2cpp_mono_set_lmf(MonoLMF* lmf) IL2CPP_ASSERT(0 && "This method is not yet implemented"); } -gpointer il2cpp_mono_aot_get_method_checked(Il2CppMonoDomain* domain, Il2CppMonoMethod* method, MonoError* error) +gpointer il2cpp_mono_aot_get_method_checked(Il2CppMonoDomain* domain, MonoMethod* method, MonoError* error) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -1178,7 +1178,7 @@ gboolean il2cpp_mono_find_jit_info_ext(Il2CppMonoDomain* domain, MonoJitTlsData* return 0; } -Il2CppMonoMethod* il2cpp_mono_method_get_declaring_generic_method(Il2CppMonoMethod* method) +MonoMethod* il2cpp_mono_method_get_declaring_generic_method(MonoMethod* method) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -1190,13 +1190,13 @@ gboolean il2cpp_mono_error_ok (MonoError *error) return 0; } -Il2CppMonoMethod* il2cpp_jinfo_get_method (MonoJitInfo *ji) +MonoMethod* il2cpp_jinfo_get_method (MonoJitInfo *ji) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; } -gboolean il2cpp_mono_find_prev_seq_point_for_native_offset (Il2CppMonoDomain *domain, Il2CppMonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point) +gboolean il2cpp_mono_find_prev_seq_point_for_native_offset (Il2CppMonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -1217,7 +1217,7 @@ void* il2cpp_mono_w32socket_accept_internal (void* s, struct sockaddr *addr, voi return 0; } -gboolean il2cpp_mono_find_next_seq_point_for_native_offset (Il2CppMonoDomain *domain, Il2CppMonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point) +gboolean il2cpp_mono_find_next_seq_point_for_native_offset (Il2CppMonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -1234,7 +1234,7 @@ Il2CppMonoGenericParam* il2cpp_mono_generic_container_get_param (Il2CppMonoGener return (Il2CppMonoGenericParam*)il2cpp::vm::GenericContainer::GetGenericParameter((Il2CppGenericContainer*)gc, i); } -gboolean il2cpp_mono_find_seq_point (Il2CppMonoDomain *domain, Il2CppMonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point) +gboolean il2cpp_mono_find_seq_point (Il2CppMonoDomain *domain, MonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -1256,7 +1256,7 @@ void il2cpp_mono_seq_point_init_next (MonoSeqPointInfo* info, SeqPoint sp, SeqPo IL2CPP_ASSERT(0 && "This method is not yet implemented"); } -MonoSeqPointInfo* il2cpp_mono_get_seq_points (Il2CppMonoDomain *domain, Il2CppMonoMethod *method) +MonoSeqPointInfo* il2cpp_mono_get_seq_points (Il2CppMonoDomain *domain, MonoMethod *method) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -1396,7 +1396,7 @@ Il2CppSequencePointC* il2cpp_get_sequence_points(void* *iter) return (Il2CppSequencePointC*)il2cpp::utils::Debugger::GetSequencePoints(iter); } -Il2CppSequencePointC* il2cpp_get_method_sequence_points(Il2CppMonoMethod* method, void* *iter) +Il2CppSequencePointC* il2cpp_get_method_sequence_points(MonoMethod* method, void* *iter) { if (!method) return (Il2CppSequencePointC*)il2cpp::utils::Debugger::GetSequencePoints(iter); @@ -1404,7 +1404,7 @@ Il2CppSequencePointC* il2cpp_get_method_sequence_points(Il2CppMonoMethod* method return (Il2CppSequencePointC*)il2cpp::utils::Debugger::GetSequencePoints((const MethodInfo*)method, iter); } -gboolean il2cpp_mono_methods_match(Il2CppMonoMethod* left, Il2CppMonoMethod* right) +gboolean il2cpp_mono_methods_match(MonoMethod* left, MonoMethod* right) { MethodInfo* leftMethod = (MethodInfo*)left; MethodInfo* rightMethod = (MethodInfo*)right; @@ -1567,12 +1567,7 @@ MonoImage* il2cpp_defaults_corlib_image() return (MonoImage*)il2cpp_defaults.corlib; } -uint32_t il2cpp_method_get_flags_no_iflags(const Il2CppMonoMethod * method) -{ - return ((MethodInfo*)method)->flags; -} - -bool il2cpp_method_is_string_ctor(const Il2CppMonoMethod * method) +bool il2cpp_method_is_string_ctor(const MonoMethod * method) { MethodInfo* methodInfo = (MethodInfo*)method; return methodInfo->klass == il2cpp_defaults.string_class && !strcmp (methodInfo->name, ".ctor"); @@ -1592,13 +1587,13 @@ void il2cpp_set_var(guint8* newValue, void *value, MonoType *localVariableTypeMo memcpy(value, newValue, sa.size); } -Il2CppMonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot) +MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot) { const VirtualInvokeData* data = il2cpp::vm::Class::GetInterfaceInvokeDataFromVTable((Il2CppClass*)klass, (Il2CppClass*)itf, slot); if (!data) return NULL; - return (Il2CppMonoMethod*)data->method; + return (MonoMethod*)data->method; } gboolean il2cpp_field_is_deleted(Il2CppMonoClassField *field) @@ -1663,14 +1658,14 @@ const char** il2cpp_get_source_files_for_type(MonoClass *klass, int *count) return il2cpp::utils::Debugger::GetTypeSourceFiles((Il2CppClass*)klass, *count); } -Il2CppMonoMethod* il2cpp_method_get_generic_definition(Il2CppMonoMethodInflated *imethod) +MonoMethod* il2cpp_method_get_generic_definition(Il2CppMonoMethodInflated *imethod) { MethodInfo *method = (MethodInfo*)imethod; if (!method->is_inflated || method->is_generic) return NULL; - return (Il2CppMonoMethod*)((MethodInfo*)imethod)->genericMethod->methodDefinition; + return (MonoMethod*)((MethodInfo*)imethod)->genericMethod->methodDefinition; }