Skip to content

Commit

Permalink
[wasm] Remove dependency on definition of MonoClass (#87077)
Browse files Browse the repository at this point in the history
The jiterpreter recently gained a dependency on the definition of MonoClass which broke debug builds. This PR changes it to use accessors that are available in both configurations.
  • Loading branch information
kg authored Jun 3, 2023
1 parent dce5c47 commit dcbfd80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mono/mono/mini/interp/jiterpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void jiterp_preserve_module (void);
#include <mono/metadata/mono-config.h>
#include <mono/utils/mono-threads.h>
#include <mono/metadata/gc-internals.h>
#include <mono/metadata/class-abi-details.h>

#include "interp.h"
#include "interp-internals.h"
Expand Down Expand Up @@ -1171,9 +1172,9 @@ mono_jiterp_get_member_offset (int member) {
case JITERP_MEMBER_VTABLE_KLASS:
return offsetof (MonoVTable, klass);
case JITERP_MEMBER_CLASS_RANK:
return offsetof (MonoClass, rank);
return m_class_offsetof_rank();
case JITERP_MEMBER_CLASS_ELEMENT_CLASS:
return offsetof (MonoClass, element_class);
return m_class_offsetof_element_class();
// see mono_object_get_data
case JITERP_MEMBER_BOXED_VALUE_DATA:
return MONO_ABI_SIZEOF (MonoObject);
Expand Down

0 comments on commit dcbfd80

Please sign in to comment.