Skip to content

Commit

Permalink
Use class accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Apr 19, 2024
1 parent 78cab3e commit 8f3bd5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/mono/mono/metadata/class-getters.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ MONO_CLASS_GETTER(m_class_is_interfaces_inited, gboolean, , MonoClass, interface
MONO_CLASS_GETTER(m_class_is_simd_type, gboolean, , MonoClass, simd_type)
MONO_CLASS_GETTER(m_class_is_has_finalize_inited, gboolean, , MonoClass, has_finalize_inited)
MONO_CLASS_GETTER(m_class_is_fields_inited, gboolean, , MonoClass, fields_inited)
MONO_CLASS_GETTER(m_class_is_exception_class, gboolean, , MonoClass, is_exception_class)
MONO_CLASS_GETTER(m_class_has_failure, gboolean, , MonoClass, has_failure)
MONO_CLASS_GETTER(m_class_has_deferred_failure, gboolean, , MonoClass, has_deferred_failure)
MONO_CLASS_GETTER(m_class_has_weak_fields, gboolean, , MonoClass, has_weak_fields)
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/class-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
klass->parent && !m_class_is_valuetype (klass) &&
!m_class_is_interface (klass)
) {
if (klass->parent->is_exception_class)
if (m_class_is_exception_class (klass->parent))
klass->is_exception_class = 1;
else if (!strcmp (klass->name, "Exception") && !strcmp(klass->name_space, "System"))
klass->is_exception_class = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@ interp_method_check_inlining (TransformData *td, MonoMethod *method, MonoMethodS
if (g_list_find (td->dont_inline, method))
return FALSE;

if (method->klass->is_exception_class)
if (m_class_is_exception_class (method->klass))
return FALSE;

return TRUE;
Expand Down

0 comments on commit 8f3bd5b

Please sign in to comment.