diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index 423f9a47c23c..88552b55f486 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -7281,9 +7281,9 @@ static void buffer_add_value_full(Buffer *buf, MonoType *t, void *addr, MonoDoma iter = NULL; while ((f = mono_class_get_fields(klass, &iter))) { - if (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC) + if (f->type->attrs & FIELD_ATTRIBUTE_STATIC) continue; - if (VM_FIELD_IS_DELETED(f)) + if (mono_field_is_deleted(f)) continue; nfields++; } @@ -7292,11 +7292,11 @@ static void buffer_add_value_full(Buffer *buf, MonoType *t, void *addr, MonoDoma iter = NULL; while ((f = mono_class_get_fields(klass, &iter))) { - if (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC) + if (f->type->attrs & FIELD_ATTRIBUTE_STATIC) continue; - if (VM_FIELD_IS_DELETED(f)) + if (mono_field_is_deleted(f)) continue; - buffer_add_value_full(buf, VM_FIELD_GET_TYPE(f), (guint8*)addr + VM_FIELD_GET_OFFSET(f) - sizeof(MonoObject), domain, FALSE, parent_vtypes); + buffer_add_value_full(buf, f->type, (guint8*)addr + f->offset - sizeof(MonoObject), domain, FALSE, parent_vtypes); } if (boxed_vtype) @@ -7381,11 +7381,11 @@ decode_vtype (MonoType *t, MonoDomain *domain, guint8 *addr, guint8 *buf, guint8 nfields = decode_int (buf, &buf, limit); while ((f = mono_class_get_fields (klass, &iter))) { - if (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC) + if (f->type->attrs & FIELD_ATTRIBUTE_STATIC) continue; - if (VM_FIELD_IS_DELETED(f)) + if (mono_field_is_deleted(f)) continue; - err = decode_value (VM_FIELD_GET_TYPE(f), domain, (guint8*)addr + VM_FIELD_GET_OFFSET(f) - sizeof (MonoObject), buf, &buf, limit); + err = decode_value (f->type, domain, (guint8*)addr + f->offset - sizeof (MonoObject), buf, &buf, limit); if (err != ERR_NONE) return err; nfields --; @@ -9591,7 +9591,7 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint while ((f = mono_class_get_fields (klass, &iter))) { buffer_add_fieldid (buf, domain, f); - buffer_add_string (buf, VM_FIELD_GET_NAME(f)); + buffer_add_string (buf, f->name); buffer_add_typeid (buf, domain, mono_class_from_mono_type (mono_field_get_type(f))); buffer_add_int (buf, mono_field_get_type(f)->attrs); i ++; @@ -9715,11 +9715,11 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint if (err != ERR_NONE) return err; - if (!(VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC)) + if (!(f->type->attrs & FIELD_ATTRIBUTE_STATIC)) return ERR_INVALID_FIELDID; #ifdef IL2CPP_MONO_DEBUGGER - if (!thread && VM_FIELD_GET_OFFSET(f) == THREAD_STATIC_FIELD_OFFSET) + if (!thread && f->offset == THREAD_STATIC_FIELD_OFFSET) return ERR_INVALID_FIELDID; #else special_static_type = mono_class_field_get_special_static_type (f); @@ -9731,7 +9731,7 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint /* Check that the field belongs to the object */ found = FALSE; for (k = klass; k; k = k->parent) { - if (k == VM_FIELD_GET_PARENT(f)) { + if (k == f->parent) { found = TRUE; break; } @@ -9739,12 +9739,12 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint if (!found) return ERR_INVALID_FIELDID; - vtable = mono_class_vtable (domain, VM_FIELD_GET_PARENT(f)); - val = (guint8 *)g_malloc (mono_class_instance_size (mono_class_from_mono_type (VM_FIELD_GET_TYPE(f)))); + vtable = mono_class_vtable (domain, f->parent); + val = (guint8 *)g_malloc (mono_class_instance_size (mono_class_from_mono_type (f->type))); mono_field_static_get_value_for_thread (thread ? thread : mono_thread_internal_current (), vtable, f, val, &error); if (!is_ok (&error)) return ERR_INVALID_FIELDID; - buffer_add_value (buf, VM_FIELD_GET_TYPE(f), val, domain); + buffer_add_value (buf, f->type, val, domain); g_free (val); } break; @@ -11260,7 +11260,7 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf) /* Check that the field belongs to the object */ found = FALSE; for (k = obj_type; k; k = k->parent) { - if (k == VM_FIELD_GET_PARENT(f)) { + if (k == f->parent) { found = TRUE; break; } @@ -11268,22 +11268,22 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf) if (!found) return ERR_INVALID_FIELDID; - if (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC) { + if (f->type->attrs & FIELD_ATTRIBUTE_STATIC) { guint8 *val; MonoVTable *vtable; if (mono_class_field_is_special_static (f)) return ERR_INVALID_FIELDID; - g_assert (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC); - vtable = mono_class_vtable (VM_OBJECT_GET_DOMAIN(obj), VM_FIELD_GET_PARENT(f)); - val = (guint8 *)g_malloc (mono_class_instance_size (mono_class_from_mono_type (VM_FIELD_GET_TYPE(f)))); + g_assert (f->type->attrs & FIELD_ATTRIBUTE_STATIC); + vtable = mono_class_vtable (VM_OBJECT_GET_DOMAIN(obj), f->parent); + val = (guint8 *)g_malloc (mono_class_instance_size (mono_class_from_mono_type (f->type))); mono_field_static_get_value_checked (vtable, f, val, &error); if (!is_ok (&error)) { mono_error_cleanup (&error); /* FIXME report the error */ return ERR_INVALID_OBJECT; } - buffer_add_value (buf, VM_FIELD_GET_TYPE(f), val, VM_OBJECT_GET_DOMAIN(obj)); + buffer_add_value (buf, f->type, val, VM_OBJECT_GET_DOMAIN(obj)); g_free (val); } else { guint8 *field_value = NULL; @@ -11301,9 +11301,9 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf) #endif } else - field_value = VM_FIELD_GET_ADDRESS(obj, f); + field_value = (guint8*)(obj) + f->offset; - buffer_add_value (buf, VM_FIELD_GET_TYPE(f), field_value, VM_OBJECT_GET_DOMAIN(obj)); + buffer_add_value (buf, f->type, field_value, VM_OBJECT_GET_DOMAIN(obj)); } } break; @@ -11318,7 +11318,7 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf) /* Check that the field belongs to the object */ found = FALSE; for (k = obj_type; k; k = k->parent) { - if (k == VM_FIELD_GET_PARENT(f)) { + if (k == f->parent) { found = TRUE; break; } @@ -11326,18 +11326,18 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf) if (!found) return ERR_INVALID_FIELDID; - if (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC) { + if (f->type->attrs & FIELD_ATTRIBUTE_STATIC) { guint8 *val; MonoVTable *vtable; if (mono_class_field_is_special_static (f)) return ERR_INVALID_FIELDID; - g_assert (VM_FIELD_GET_TYPE(f)->attrs & FIELD_ATTRIBUTE_STATIC); - vtable = mono_class_vtable (VM_OBJECT_GET_DOMAIN(obj), VM_FIELD_GET_PARENT(f)); + g_assert (f->type->attrs & FIELD_ATTRIBUTE_STATIC); + vtable = mono_class_vtable (VM_OBJECT_GET_DOMAIN(obj), f->parent); - val = (guint8 *)g_malloc (mono_class_instance_size (mono_class_from_mono_type (VM_FIELD_GET_TYPE(f)))); - err = decode_value (VM_FIELD_GET_TYPE(f), VM_OBJECT_GET_DOMAIN(obj), val, p, &p, end); + val = (guint8 *)g_malloc (mono_class_instance_size (mono_class_from_mono_type (f->type))); + err = decode_value (f->type, VM_OBJECT_GET_DOMAIN(obj), val, p, &p, end); if (err != ERR_NONE) { g_free (val); return err; @@ -11345,7 +11345,7 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf) mono_field_static_set_value (vtable, f, val); g_free (val); } else { - err = decode_value (VM_FIELD_GET_TYPE(f), VM_OBJECT_GET_DOMAIN(obj), (guint8*)obj + VM_FIELD_GET_OFFSET(f), p, &p, end); + err = decode_value (f->type, VM_OBJECT_GET_DOMAIN(obj), (guint8*)obj + f->offset, p, &p, end); if (err != ERR_NONE) return err; } diff --git a/mono/mini/il2cpp-c-types.h b/mono/mini/il2cpp-c-types.h index d5b9cab9fa18..1da98841d621 100644 --- a/mono/mini/il2cpp-c-types.h +++ b/mono/mini/il2cpp-c-types.h @@ -13,13 +13,13 @@ #define MonoClass Il2CppClass #define MonoImage Il2CppImage #define MonoMethod MethodInfo +#define MonoClassField FieldInfo //still stubs everywhere typedef struct _Il2CppMonoAssemblyName Il2CppMonoAssemblyNameReplacement; typedef struct _Il2CppMonoAssembly Il2CppMonoAssembly; typedef struct _Il2CppMonoDomain Il2CppMonoDomain; typedef struct _Il2CppMonoMethodSignature Il2CppMonoMethodSignature; -typedef struct FieldInfo Il2CppMonoClassField; typedef struct Il2CppArrayType Il2CppMonoArrayType; typedef struct Il2CppGenericParam Il2CppMonoGenericParam; typedef struct Il2CppGenericInst Il2CppMonoGenericInst; @@ -71,7 +71,7 @@ struct _Il2CppMonoExceptionClause struct _Il2CppCattrNamedArg { MonoType *type; - Il2CppMonoClassField *field; + MonoClassField *field; Il2CppMonoProperty *prop; }; diff --git a/mono/mini/il2cpp-compat.h b/mono/mini/il2cpp-compat.h index 1d7cf15baafe..da2ca6c16240 100644 --- a/mono/mini/il2cpp-compat.h +++ b/mono/mini/il2cpp-compat.h @@ -40,12 +40,6 @@ #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) -#define VM_FIELD_GET_NAME(field) il2cpp_mono_field_get_name(field) -#define VM_FIELD_GET_PARENT(field) il2cpp_field_get_parent(field) -#define VM_FIELD_GET_TYPE(field) il2cpp_field_get_type(field) -#define VM_FIELD_GET_ADDRESS(obj, field) il2cpp_field_get_address(obj, field) -#define VM_FIELD_IS_DELETED(field) il2cpp_field_is_deleted(field) -#define VM_FIELD_GET_OFFSET(field) il2cpp_field_get_offset(field) #define VM_OBJECT_GET_DOMAIN(object) il2cpp_mono_domain_get() #define VM_OBJECT_GET_CLASS(object) il2cpp_object_get_class(object) #define VM_OBJECT_GET_TYPE(object) il2cpp_mono_object_get_type(object) @@ -95,12 +89,6 @@ #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 -#define VM_FIELD_GET_NAME(field) field->name -#define VM_FIELD_GET_PARENT(field) (field)->parent -#define VM_FIELD_GET_TYPE(field) (field)->type -#define VM_FIELD_GET_ADDRESS(obj, field) (guint8*)(obj) + (f)->offset -#define VM_FIELD_IS_DELETED(field) mono_field_is_deleted(field) -#define VM_FIELD_GET_OFFSET(field) (field)->offset #define VM_OBJECT_GET_DOMAIN(object) ((MonoObject*)object)->vtable->domain #define VM_OBJECT_GET_CLASS(object) ((MonoObject*)object)->vtable->klass #define VM_OBJECT_GET_TYPE(object) ((MonoReflectionType*)object->vtable->type)->type @@ -133,7 +121,6 @@ #define MonoAppDomain Il2CppMonoAppDomain #define MonoDomain Il2CppMonoDomain #define MonoMethodSignature Il2CppMonoMethodSignature -#define MonoClassField Il2CppMonoClassField #define MonoArrayType Il2CppMonoArrayType #define MonoGenericParam Il2CppMonoGenericParam #define MonoGenericInst Il2CppMonoGenericInst @@ -378,6 +365,7 @@ #define mono_method_get_token il2cpp_method_get_token #define mono_method_is_generic il2cpp_method_is_generic #define mono_method_is_inflated il2cpp_method_is_inflated +#define mono_field_is_deleted il2cpp_field_is_deleted #define mono_domain_assemblies_lock #define mono_domain_assemblies_unlock @@ -397,7 +385,7 @@ mono_bool il2cpp_mono_type_generic_inst_is_valuetype (MonoType *type); 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); +MonoClassField* il2cpp_mono_class_get_field_from_name (MonoClass *klass, const char *name); int32_t il2cpp_mono_array_element_size (MonoClass *ac); int32_t il2cpp_mono_class_instance_size (MonoClass *klass); int32_t il2cpp_mono_class_value_size (MonoClass *klass, uint32_t *align); @@ -406,10 +394,10 @@ MonoClass* il2cpp_mono_class_from_mono_type (MonoType *type); 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); +MonoClassField* il2cpp_mono_class_get_fields (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); +const char* il2cpp_mono_field_get_name (MonoClassField *field); mono_unichar2* il2cpp_mono_string_chars (Il2CppMonoString *s); int il2cpp_mono_string_length (Il2CppMonoString *s); char* il2cpp_mono_array_addr_with_size (Il2CppMonoArray *array, int size, uintptr_t idx); @@ -420,8 +408,8 @@ Il2CppMonoString* il2cpp_mono_string_new_checked (Il2CppMonoDomain *domain, cons char* il2cpp_mono_string_to_utf8_checked (Il2CppMonoString *string_obj, MonoError *error); int il2cpp_mono_object_hash (Il2CppMonoObject* obj); void* il2cpp_mono_object_unbox (Il2CppMonoObject *obj); -void il2cpp_mono_field_set_value (Il2CppMonoObject *obj, Il2CppMonoClassField *field, void *value); -void il2cpp_mono_field_static_set_value (Il2CppMonoVTable *vt, Il2CppMonoClassField *field, void *value); +void il2cpp_mono_field_set_value (Il2CppMonoObject *obj, MonoClassField *field, void *value); +void il2cpp_mono_field_static_set_value (Il2CppMonoVTable *vt, MonoClassField *field, void *value); uint32_t il2cpp_mono_gchandle_new_weakref (Il2CppMonoObject *obj, mono_bool track_resurrection); Il2CppMonoObject* il2cpp_mono_gchandle_get_target (uint32_t gchandle); void il2cpp_mono_gchandle_free (uint32_t gchandle); @@ -465,8 +453,8 @@ int il2cpp_mono_class_interface_offset_with_variance(MonoClass* klass, MonoClass void il2cpp_mono_class_setup_supertypes(MonoClass* klass); void il2cpp_mono_class_setup_vtable(MonoClass* klass); 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); +gboolean il2cpp_mono_class_field_is_special_static(MonoClassField* field); +guint32 il2cpp_mono_class_field_get_special_static_type(MonoClassField* field); Il2CppMonoGenericContext* il2cpp_mono_class_get_context(MonoClass* klass); Il2CppMonoGenericContext* il2cpp_mono_method_get_context(MonoMethod* method); Il2CppMonoGenericContainer* il2cpp_mono_method_get_generic_container(MonoMethod* method); @@ -498,9 +486,9 @@ Il2CppMonoRuntimeExceptionHandlingCallbacks* il2cpp_mono_get_eh_callbacks(); 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); -void il2cpp_mono_field_static_get_value_for_thread(Il2CppMonoInternalThread* thread, Il2CppMonoVTable* vt, Il2CppMonoClassField* field, void* value, MonoError* error); -Il2CppMonoObject* il2cpp_mono_field_get_value_object_checked(Il2CppMonoDomain* domain, Il2CppMonoClassField* field, Il2CppMonoObject* obj, MonoError* error); +void il2cpp_mono_field_static_get_value_checked(Il2CppMonoVTable* vt, MonoClassField* field, void* value, MonoError* error); +void il2cpp_mono_field_static_get_value_for_thread(Il2CppMonoInternalThread* thread, Il2CppMonoVTable* vt, MonoClassField* field, void* value, MonoError* error); +Il2CppMonoObject* il2cpp_mono_field_get_value_object_checked(Il2CppMonoDomain* domain, MonoClassField* 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(MonoMethod* method, void* obj, void** params, Il2CppMonoObject** exc, MonoError* error); @@ -519,7 +507,7 @@ MonoType* il2cpp_mono_reflection_get_type_checked(MonoImage* rootimage, MonoImag 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); +Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_field_checked(MonoClass* klass, MonoClassField* field, MonoError* error); Il2CppMonoReflectionAssemblyHandle il2cpp_mono_assembly_get_object_handle(Il2CppMonoDomain* domain, Il2CppMonoAssembly* assembly, MonoError* error); Il2CppMonoReflectionType* il2cpp_mono_type_get_object_checked(Il2CppMonoDomain* domain, MonoType* type, MonoError* error); void il2cpp_mono_network_init(); @@ -587,7 +575,7 @@ mono_byte il2cpp_assembly_name_public_key_token(Il2CppMonoAssembly *monoAssembly const char* il2cpp_assembly_name_public_key_token_string(Il2CppMonoAssembly *monoAssembly); uint32_t il2cpp_assembly_name_flags(Il2CppMonoAssembly *monoAssembly); const char* il2cpp_image_name(MonoImage *monoImage); -guint8* il2cpp_field_get_address(Il2CppMonoObject *obj, Il2CppMonoClassField *monoField); +guint8* il2cpp_field_get_address(Il2CppMonoObject *obj, MonoClassField *monoField); MonoType* il2cpp_mono_object_get_type(Il2CppMonoObject* object); MonoClass* il2cpp_defaults_exception_class(); MonoImage* il2cpp_defaults_corlib_image(); @@ -596,7 +584,7 @@ bool il2cpp_method_is_string_ctor (const MonoMethod * method); MonoClass* il2cpp_defaults_void_class(); void il2cpp_set_var(guint8* newValue, void *value, MonoType *localVariableTypeMono); MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot); -gboolean il2cpp_field_is_deleted(Il2CppMonoClassField *field); +gboolean il2cpp_field_is_deleted(MonoClassField *field); MonoClass* il2cpp_iterate_loaded_classes(void* *iter); Il2CppMonoAssembly* il2cpp_domain_get_assemblies_iter(Il2CppMonoAppDomain *domain, void* *iter); const char** il2cpp_get_source_files_for_type(MonoClass *klass, int *count); diff --git a/mono/mini/il2cpp-stubs.cpp b/mono/mini/il2cpp-stubs.cpp index ac44c257d5d6..8270802fe895 100644 --- a/mono/mini/il2cpp-stubs.cpp +++ b/mono/mini/il2cpp-stubs.cpp @@ -223,9 +223,9 @@ int il2cpp_mono_class_num_properties (MonoClass *klass) return il2cpp::vm::Class::GetNumProperties((Il2CppClass*)klass); } -Il2CppMonoClassField* il2cpp_mono_class_get_fields (MonoClass* klass, gpointer *iter) +MonoClassField* il2cpp_mono_class_get_fields (MonoClass* klass, gpointer *iter) { - return (Il2CppMonoClassField*)il2cpp::vm::Class::GetFields((Il2CppClass*)klass, iter); + return (MonoClassField*)il2cpp::vm::Class::GetFields((Il2CppClass*)klass, iter); } MonoMethod* il2cpp_mono_class_get_methods (MonoClass* klass, gpointer *iter) @@ -238,7 +238,7 @@ Il2CppMonoProperty* il2cpp_mono_class_get_properties (MonoClass* klass, gpointer return (Il2CppMonoProperty*)il2cpp::vm::Class::GetProperties((Il2CppClass*)klass, iter); } -const char* il2cpp_mono_field_get_name (Il2CppMonoClassField *field) +const char* il2cpp_mono_field_get_name (MonoClassField *field) { return il2cpp::vm::Field::GetName((FieldInfo*)field); } @@ -298,12 +298,12 @@ void* il2cpp_mono_object_unbox (Il2CppMonoObject *monoObj) return il2cpp::vm::Object::Unbox(obj); } -void il2cpp_mono_field_set_value (Il2CppMonoObject *obj, Il2CppMonoClassField *field, void *value) +void il2cpp_mono_field_set_value (Il2CppMonoObject *obj, MonoClassField *field, void *value) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); } -void il2cpp_mono_field_static_set_value (Il2CppMonoVTable *vt, Il2CppMonoClassField *field, void *value) +void il2cpp_mono_field_static_set_value (Il2CppMonoVTable *vt, MonoClassField *field, void *value) { il2cpp::vm::Field::StaticSetValue((FieldInfo*)field, value); } @@ -567,12 +567,12 @@ void il2cpp_mono_class_setup_methods(MonoClass* klass) il2cpp::vm::Class::SetupMethods((Il2CppClass*)klass); } -gboolean il2cpp_mono_class_field_is_special_static(Il2CppMonoClassField* field) +gboolean il2cpp_mono_class_field_is_special_static(MonoClassField* field) { return il2cpp::vm::Field::IsNormalStatic((FieldInfo*)field) ? FALSE : TRUE; } -guint32 il2cpp_mono_class_field_get_special_static_type(Il2CppMonoClassField* field) +guint32 il2cpp_mono_class_field_get_special_static_type(MonoClassField* field) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return 0; @@ -871,19 +871,19 @@ Il2CppMonoObject* il2cpp_mono_value_box_checked(Il2CppMonoDomain* domain, MonoCl return (Il2CppMonoObject*)il2cpp::vm::Object::Box((Il2CppClass*)klass, value); } -void il2cpp_mono_field_static_get_value_checked(Il2CppMonoVTable* vt, Il2CppMonoClassField* field, void* value, MonoError* error) +void il2cpp_mono_field_static_get_value_checked(Il2CppMonoVTable* vt, MonoClassField* field, void* value, MonoError* error) { error_init(error); il2cpp::vm::Field::StaticGetValue((FieldInfo*)field, value); } -void il2cpp_mono_field_static_get_value_for_thread(Il2CppMonoInternalThread* thread, Il2CppMonoVTable* vt, Il2CppMonoClassField* field, void* value, MonoError* error) +void il2cpp_mono_field_static_get_value_for_thread(Il2CppMonoInternalThread* thread, Il2CppMonoVTable* vt, MonoClassField* field, void* value, MonoError* error) { error_init(error); il2cpp::vm::Field::StaticGetValueForThread((FieldInfo*)field, value, (Il2CppInternalThread*)thread); } -Il2CppMonoObject* il2cpp_mono_field_get_value_object_checked(Il2CppMonoDomain* domain, Il2CppMonoClassField* field, Il2CppMonoObject* obj, MonoError* error) +Il2CppMonoObject* il2cpp_mono_field_get_value_object_checked(Il2CppMonoDomain* domain, MonoClassField* field, Il2CppMonoObject* obj, MonoError* error) { IL2CPP_ASSERT(0 && "This method is not yet implemented"); return NULL; @@ -1021,7 +1021,7 @@ Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_property_checked(MonoCla return NULL; } -Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_field_checked(MonoClass* klass, Il2CppMonoClassField* field, MonoError* error) +Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_field_checked(MonoClass* klass, MonoClassField* field, MonoError* error) { error_init(error); return NULL; @@ -1546,7 +1546,7 @@ const char* il2cpp_image_name(MonoImage *monoImage) return image->name; } -guint8* il2cpp_field_get_address(Il2CppMonoObject *obj, Il2CppMonoClassField *monoField) +guint8* il2cpp_field_get_address(Il2CppMonoObject *obj, MonoClassField *monoField) { FieldInfo *field = (FieldInfo*)monoField; return (guint8*)obj + field->offset; @@ -1596,7 +1596,7 @@ MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int sl return (MonoMethod*)data->method; } -gboolean il2cpp_field_is_deleted(Il2CppMonoClassField *field) +gboolean il2cpp_field_is_deleted(MonoClassField *field) { return il2cpp::vm::Field::IsDeleted((FieldInfo*)field); }