#include <mono/metadata/object.h>
#include <mono/metadata/mempool.h>
#include <mono/metadata/metadata-internals.h>
+#include <mono/metadata/property-bag.h>
#include <mono/io-layer/io-layer.h>
#include "mono/utils/mono-compiler.h"
#include "mono/utils/mono-error.h"
} MonoMarshalField;
typedef struct {
+ MonoPropertyBagItem head;
+
guint32 native_size, min_align;
guint32 num_fields;
MonoMethod *ptr_to_str;
* be used for fields which are only used in like 5% of all classes.
*/
typedef struct {
+ MonoPropertyBagItem head;
+
struct {
#if MONO_SMALL_CONFIG
guint16 first, count;
int vtable_size; /* number of slots */
guint16 interface_count;
- guint16 interface_id; /* unique inderface id (for interfaces) */
- guint16 max_interface_id;
+ guint32 interface_id; /* unique inderface id (for interfaces) */
+ guint32 max_interface_id;
guint16 interface_offsets_count;
MonoClass **interfaces_packed;
int generic_param_token; /* for generic param types, both var and mvar */
} sizes;
- /*
- * From the TypeDef table
- */
- struct {
-#if MONO_SMALL_CONFIG
- guint16 first, count;
-#else
- guint32 first, count;
-#endif
- } field, method;
-
- /* A GC handle pointing to the corresponding type builder/generic param builder */
- guint32 ref_info_handle;
-
- /* loaded on demand */
- MonoMarshalType *marshal_info;
-
/*
* Field information: Type and location from object base
*/
/* Generic vtable. Initialized by a call to mono_class_setup_vtable () */
MonoMethod **vtable;
- /* Rarely used fields of classes */
- MonoClassExt *ext;
+ /* Infrequently used items. See class-accessors.c: InfrequentDataKind for what goes into here. */
+ MonoPropertyBag infrequent_data;
};
typedef struct {
MonoClass class;
guint32 flags;
+ /*
+ * From the TypeDef table
+ */
+ guint32 first_method_idx;
+ guint32 first_field_idx;
+ guint32 method_count, field_count;
/* next element in the class_cache hash list (in MonoImage) */
MonoClass *next_class_cache;
} MonoClassDef;
typedef struct {
MonoClass class;
+ guint32 method_count;
} MonoClassArray;
typedef struct {
MonoDomain *domain; /* each object/vtable belongs to exactly one domain */
gpointer type; /* System.Type type for klass */
guint8 *interface_bitmap;
- guint16 max_interface_id;
+ guint32 max_interface_id;
guint8 rank;
guint remote : 1; /* class is remotely activated */
guint initialized : 1; /* cctor has been run */
void
mono_class_set_generic_container (MonoClass *klass, MonoGenericContainer *container);
+guint32
+mono_class_get_first_method_idx (MonoClass *klass);
+
+void
+mono_class_set_first_method_idx (MonoClass *klass, guint32 idx);
+
+guint32
+mono_class_get_first_field_idx (MonoClass *klass);
+
+void
+mono_class_set_first_field_idx (MonoClass *klass, guint32 idx);
+
+guint32
+mono_class_get_method_count (MonoClass *klass);
+
+void
+mono_class_set_method_count (MonoClass *klass, guint32 count);
+
+guint32
+mono_class_get_field_count (MonoClass *klass);
+
+void
+mono_class_set_field_count (MonoClass *klass, guint32 count);
+
+MonoMarshalType*
+mono_class_get_marshal_info (MonoClass *class);
+
+void
+mono_class_set_marshal_info (MonoClass *class, MonoMarshalType *marshal_info);
+
+MonoClassExt*
+mono_class_get_ext (MonoClass *class);
+
+void
+mono_class_set_ext (MonoClass *class, MonoClassExt *ext);
+
+guint32
+mono_class_get_ref_info_handle (MonoClass *class);
+
+guint32
+mono_class_set_ref_info_handle (MonoClass *class, guint32 value);
+
/*Now that everything has been defined, let's include the inline functions */
#include <mono/metadata/class-inlines.h>