MONO_EXCEPTION_METHOD_ACCESS = 9,
MONO_EXCEPTION_FIELD_ACCESS = 10,
MONO_EXCEPTION_GENERIC_SHARING_FAILED = 11,
+ MONO_EXCEPTION_BAD_IMAGE = 12
/* add other exception type */
};
} MonoClassRuntimeInfo;
struct _MonoClass {
- MonoImage *image;
-
- /* The underlying type of the enum */
- MonoType *enum_basetype;
/* element class for arrays and enum */
MonoClass *element_class;
/* used for subtype checks */
MonoClass *cast_class;
+
+ /* for fast subtype checks */
+ MonoClass **supertypes;
+ guint16 idepth;
+
/* array dimension */
guint8 rank;
+ int instance_size; /* object instance size */
+
guint inited : 1;
/* We use init_pending to detect cyclic calls to mono_class_init */
guint init_pending : 1;
guint8 exception_type; /* MONO_EXCEPTION_* */
void* exception_data; /* Additional information about the exception */
- guint32 declsec_flags; /* declarative security attributes flags */
MonoClass *parent;
MonoClass *nested_in;
GList *nested_classes;
- guint32 type_token;
+ MonoImage *image;
const char *name;
const char *name_space;
-
- /* for fast subtype checks */
- MonoClass **supertypes;
- guint16 idepth;
+
+ /* The underlying type of the enum */
+ MonoType *enum_basetype;
+
+ guint32 declsec_flags; /* declarative security attributes flags */
+ guint32 type_token;
+ int vtable_size; /* number of slots */
guint16 interface_count;
guint16 interface_id; /* unique inderface id (for interfaces) */
MonoClass **interfaces;
- /*
- * Computed object instance size, total.
- */
- int instance_size;
- int vtable_size; /* number of slots */
union {
int class_size; /* size of area for static fields */
int element_size; /* for array types */
#define MONO_CLASS_IMPLEMENTS_INTERFACE(k,uiid) (((uiid) <= (k)->max_interface_id) && ((k)->interface_bitmap [(uiid) >> 3] & (1 << ((uiid)&7))))
int mono_class_interface_offset (MonoClass *klass, MonoClass *itf);
+typedef struct {
+ gpointer static_data;
+ MonoClass *klass;
+ MonoVTable *vtable;
+} MonoRuntimeGenericSuperInfo;
+
+typedef struct {
+ gpointer static_data;
+ MonoClass *klass;
+ MonoVTable *vtable;
+} MonoRuntimeGenericArgInfo;
+
+typedef struct {
+ MonoDomain *domain;
+ MonoRuntimeGenericArgInfo arg_infos [MONO_ZERO_LEN_ARRAY];
+} MonoRuntimeGenericContext;
+
/* the interface_offsets array is stored in memory before this struct */
struct MonoVTable {
MonoClass *klass;
guint initialized : 1; /* cctor has been run */
guint init_failed : 1; /* cctor execution failed */
guint32 imt_collisions_bitmap;
+ MonoRuntimeGenericContext *runtime_generic_context;
/* do not add any fields after vtable, the structure is dynamically extended */
gpointer vtable [MONO_ZERO_LEN_ARRAY];
};
MonoClass *klass; /* If kind != TYPE */
const char *member_name; /* If kind != TYPE */
gboolean ref_only; /* If kind == ASSEMBLY */
+ char *msg; /* If kind == BAD_IMAGE */
} MonoLoaderError;
#define mono_class_has_parent(klass,parent) (((klass)->idepth >= (parent)->idepth) && ((klass)->supertypes [(parent)->idepth - 1] == (parent)))
gulong generics_sharable_methods;
gulong generics_unsharable_methods;
gulong generics_shared_methods;
+ gulong minor_gc_count;
+ gulong major_gc_count;
+ gulong minor_gc_time_usecs;
+ gulong major_gc_time_usecs;
gboolean enabled;
} MonoStats;
void *handle;
} MonoHandleRef;
+enum {
+ MONO_GENERIC_SHARING_NONE,
+ MONO_GENERIC_SHARING_CORLIB,
+ MONO_GENERIC_SHARING_ALL
+};
+
extern MonoStats mono_stats MONO_INTERNAL;
typedef gpointer (*MonoTrampoline) (MonoMethod *method);
+typedef gpointer (*MonoJumpTrampoline) (MonoDomain *domain, MonoMethod *method, gboolean add_sync_wrapper);
typedef gpointer (*MonoRemotingTrampoline) (MonoMethod *method, MonoRemotingTarget target);
typedef gpointer (*MonoDelegateTrampoline) (MonoClass *klass);
-typedef gpointer (*MonoLookupDynamicToken) (MonoImage *image, guint32 token, MonoClass **handle_class, MonoGenericContext *context);
+typedef gpointer (*MonoLookupDynamicToken) (MonoImage *image, guint32 token, gboolean valid_token, MonoClass **handle_class, MonoGenericContext *context);
typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInfo *res);
gboolean
mono_class_has_special_static_fields (MonoClass *klass) MONO_INTERNAL;
+const char*
+mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_type) MONO_INTERNAL;
+
void
mono_install_trampoline (MonoTrampoline func) MONO_INTERNAL;
+void
+mono_install_jump_trampoline (MonoJumpTrampoline func) MONO_INTERNAL;
+
void
mono_install_remoting_trampoline (MonoRemotingTrampoline func) MONO_INTERNAL;
mono_lookup_dynamic_token (MonoImage *image, guint32 token, MonoGenericContext *context) MONO_INTERNAL;
gpointer
-mono_lookup_dynamic_token_class (MonoImage *image, guint32 token, MonoClass **handle_class, MonoGenericContext *context) MONO_INTERNAL;
+mono_lookup_dynamic_token_class (MonoImage *image, guint32 token, gboolean check_token, MonoClass **handle_class, MonoGenericContext *context) MONO_INTERNAL;
void
mono_install_lookup_dynamic_token (MonoLookupDynamicToken func) MONO_INTERNAL;
+gpointer
+mono_runtime_create_jump_trampoline (MonoDomain *domain, MonoMethod *method, gboolean add_sync_wrapper) MONO_INTERNAL;
+
+gpointer
+mono_runtime_create_delegate_trampoline (MonoClass *klass) MONO_INTERNAL;
+
void
mono_install_get_cached_class_info (MonoGetCachedClassInfo func) MONO_INTERNAL;
void
mono_loader_set_error_field_load (MonoClass *klass, const char *member_name) MONO_INTERNAL;
+void
+mono_loader_set_error_bad_image (char *msg) MONO_INTERNAL;
MonoException *
mono_loader_error_prepare_exception (MonoLoaderError *error) MONO_INTERNAL;
gboolean
mono_generic_class_is_generic_type_definition (MonoGenericClass *gklass) MONO_INTERNAL;
+MonoType*
+mono_type_get_basic_type_from_generic (MonoType *type) MONO_INTERNAL;
+
+gboolean
+mono_class_generic_sharing_enabled (MonoClass *class) MONO_INTERNAL;
+
#endif /* __MONO_METADATA_CLASS_INTERBALS_H__ */