Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove VM_PROPERTY macros and Il2CppMonoProperty #739

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mono/mini/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -9611,10 +9611,10 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint

while ((p = mono_class_get_properties (klass, &iter))) {
buffer_add_propertyid (buf, domain, p);
buffer_add_string (buf, VM_PROPERTY_GET_NAME(p));
buffer_add_methodid (buf, domain, VM_PROPERTY_GET_GET_METHOD(p));
buffer_add_methodid (buf, domain, VM_PROPERTY_GET_SET_METHOD(p));
buffer_add_int (buf, VM_PROPERTY_GET_ATTRS(p));
buffer_add_string (buf, p->name);
buffer_add_methodid (buf, domain, p->get);
buffer_add_methodid (buf, domain, p->set);
buffer_add_int (buf, p->attrs);
i ++;
}
g_assert (i == nprops);
Expand Down
4 changes: 2 additions & 2 deletions mono/mini/il2cpp-c-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define MonoGenericContext Il2CppGenericContext
#define MonoGenericClass Il2CppGenericClass
#define MonoGenericContainer Il2CppGenericContainer
#define MonoProperty Il2CppPropertyInfo

//still stubs everywhere
typedef struct _Il2CppMonoAssemblyName Il2CppMonoAssemblyNameReplacement;
Expand All @@ -28,7 +29,6 @@ typedef struct _Il2CppMonoDomain Il2CppMonoDomain;
typedef struct _Il2CppMonoMethodSignature Il2CppMonoMethodSignature;
typedef struct _Il2CppMonoMethodHeader Il2CppMonoMethodHeader;
typedef struct _Il2CppMonoVTable Il2CppMonoVTable;
typedef struct Il2CppPropertyInfo Il2CppMonoProperty;
typedef struct Il2CppString Il2CppMonoString;
typedef struct _Il2CppMonoAppDomain Il2CppMonoAppDomain;
typedef struct _Il2CppMonoMarshalByRefObject Il2CppMonoMarshalByRefObject;
Expand Down Expand Up @@ -72,7 +72,7 @@ struct _Il2CppCattrNamedArg
{
MonoType *type;
MonoClassField *field;
Il2CppMonoProperty *prop;
MonoProperty *prop;
};

struct _Il2CppMonoObject
Expand Down
13 changes: 2 additions & 11 deletions mono/mini/il2cpp-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
#define VM_ARRAY_BOUND_LOWER_BOUND(arr, i) il2cpp_array_bound_lower_bound(arr, i)
//Fixme module name as image name seems bad
#define VM_IMAGE_GET_MODULE_NAME(image) il2cpp_image_name(image)
#define VM_PROPERTY_GET_NAME(prop) il2cpp_property_get_name(prop)
#define VM_PROPERTY_GET_GET_METHOD(prop) il2cpp_property_get_get_method(prop)
#define VM_PROPERTY_GET_SET_METHOD(prop) il2cpp_property_get_set_method(prop)
#define VM_PROPERTY_GET_ATTRS(prop) il2cpp_property_get_flags(prop)
#else
#define VM_THREAD_GET_INTERNAL(thread) thread->internal_thread
#define VM_INTERNAL_THREAD_SET_STATE_BACKGROUND(internal_thread) internal_thread->state |= ThreadState_Background
Expand Down Expand Up @@ -97,18 +93,13 @@
#define VM_ARRAY_BOUND_LENGTH(arr, i) arr->bounds[i].length
#define VM_ARRAY_BOUND_LOWER_BOUND(arr, i) arr->bounds[i].lower_bound
#define VM_IMAGE_GET_MODULE_NAME(image) (image)->module_name
#define VM_PROPERTY_GET_NAME(prop) (prop)->name
#define VM_PROPERTY_GET_GET_METHOD(prop) (prop)->get
#define VM_PROPERTY_GET_SET_METHOD(prop) (prop)->set
#define VM_PROPERTY_GET_ATTRS(prop) (prop)->attrs
#endif

#if defined(RUNTIME_IL2CPP)

#define MonoMethodHeader Il2CppMonoMethodHeader
#define MonoVTable Il2CppMonoVTable
#define MonoAssembly Il2CppMonoAssembly
#define MonoProperty Il2CppMonoProperty
#define MonoString Il2CppMonoString
#define MonoAppDomain Il2CppMonoAppDomain
#define MonoDomain Il2CppMonoDomain
Expand Down Expand Up @@ -382,7 +373,7 @@ int il2cpp_mono_class_num_methods (MonoClass *klass);
int il2cpp_mono_class_num_properties (MonoClass *klass);
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);
MonoProperty* il2cpp_mono_class_get_properties (MonoClass* klass, gpointer *iter);
const char* il2cpp_mono_field_get_name (MonoClassField *field);
mono_unichar2* il2cpp_mono_string_chars (Il2CppMonoString *s);
int il2cpp_mono_string_length (Il2CppMonoString *s);
Expand Down Expand Up @@ -492,7 +483,7 @@ gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(MonoMethod*
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(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_property_checked(MonoClass* klass, MonoProperty* property, 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);
Expand Down
6 changes: 3 additions & 3 deletions mono/mini/il2cpp-stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ MonoMethod* il2cpp_mono_class_get_methods (MonoClass* klass, gpointer *iter)
return (MonoMethod*)il2cpp::vm::Class::GetMethods((Il2CppClass*)klass, iter);
}

Il2CppMonoProperty* il2cpp_mono_class_get_properties (MonoClass* klass, gpointer *iter)
MonoProperty* il2cpp_mono_class_get_properties (MonoClass* klass, gpointer *iter)
{
return (Il2CppMonoProperty*)il2cpp::vm::Class::GetProperties((Il2CppClass*)klass, iter);
return (MonoProperty*)il2cpp::vm::Class::GetProperties((Il2CppClass*)klass, iter);
}

const char* il2cpp_mono_field_get_name (MonoClassField *field)
Expand Down Expand Up @@ -1015,7 +1015,7 @@ Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_class_checked(MonoClass*
return NULL;
}

Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_property_checked(MonoClass* klass, Il2CppMonoProperty* property, MonoError* error)
Il2CppMonoCustomAttrInfo* il2cpp_mono_custom_attrs_from_property_checked(MonoClass* klass, MonoProperty* property, MonoError* error)
{
error_init(error);
return NULL;
Expand Down