#define __MONO_METADATA_CLASS_INTERBALS_H__
#include <mono/metadata/class.h>
+#include <mono/metadata/object.h>
#include <mono/io-layer/io-layer.h>
#define MONO_CLASS_IS_ARRAY(c) ((c)->rank)
guint32 token;
MonoClass *klass;
MonoMethodSignature *signature;
- gpointer info; /* runtime info */
/* name is useful mostly for debugging */
const char *name;
/* this is used by the inlining algorithm */
guint32 attrs;
};
+/* type of exception being "on hold" for later processing (see exception_type) */
+enum {
+ MONO_EXCEPTION_NONE = 0,
+ MONO_EXCEPTION_SECURITY_LINKDEMAND = 1,
+ MONO_EXCEPTION_SECURITY_INHERITANCEDEMAND = 2
+ /* add other exception type */
+};
+
+/* This struct collects the info needed for the runtime use of a class,
+ * like the vtables for a domain, the GC descriptor, etc.
+ */
+typedef struct {
+ guint16 max_domain;
+ /* domain_vtables is indexed by the domain id and the size is max_domain + 1 */
+ MonoVTable *domain_vtables [MONO_ZERO_LEN_ARRAY];
+} MonoClassRuntimeInfo;
+
struct _MonoClass {
MonoImage *image;
guint has_references : 1; /* it has GC-tracked references in the instance */
guint has_static_refs : 1; /* it has static fields that are GC-tracked */
- guint32 declsec_flags; /* declarative security attributes flags */
+ guint32 declsec_flags; /* declarative security attributes flags */
+ guint32 exception_type; /* MONO_EXCEPTION_* */
+ void* exception_data; /* Additional information about the exception */
MonoClass *parent;
MonoClass *nested_in;
void *reflection_info;
void *gc_descr;
- guint64 gc_bitmap;
- MonoVTable *cached_vtable;
+ MonoClassRuntimeInfo *runtime_info;
/* Generic vtable. Initialized by a call to mono_class_setup_vtable () */
MonoMethod **vtable;
MonoGenericClass *
mono_get_shared_generic_class (MonoGenericContainer *container, gboolean is_dynamic);
+gboolean
+mono_class_set_failure (MonoClass *klass, guint32 ex_type, void *ex_data);
+
+MonoException*
+mono_class_get_exception_for_failure (MonoClass *klass);
+
#endif /* __MONO_METADATA_CLASS_INTERBALS_H__ */