New test.
[mono.git] / mono / metadata / class-internals.h
index e39b69e85ee736d3f3c9cc67668ee1962900b9b7..c37b16bc49d3382653489a4a8e0abb8559d7e7ee 100644 (file)
@@ -4,6 +4,7 @@
 #include <mono/metadata/class.h>
 #include <mono/metadata/object.h>
 #include <mono/io-layer/io-layer.h>
+#include "mono/utils/mono-compiler.h"
 
 #define MONO_CLASS_IS_ARRAY(c) ((c)->rank)
 
@@ -29,6 +30,7 @@ typedef enum {
        MONO_WRAPPER_RUNTIME_INVOKE,
        MONO_WRAPPER_NATIVE_TO_MANAGED,
        MONO_WRAPPER_MANAGED_TO_NATIVE,
+       MONO_WRAPPER_MANAGED_TO_MANAGED,
        MONO_WRAPPER_REMOTING_INVOKE,
        MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK,
        MONO_WRAPPER_XDOMAIN_INVOKE,
@@ -44,7 +46,11 @@ typedef enum {
        MONO_WRAPPER_PROXY_ISINST,
        MONO_WRAPPER_STELEMREF,
        MONO_WRAPPER_UNBOX,
-       MONO_WRAPPER_UNKNOWN
+       MONO_WRAPPER_LDFLDA,
+       MONO_WRAPPER_WRITE_BARRIER,
+       MONO_WRAPPER_UNKNOWN,
+       MONO_WRAPPER_COMINTEROP_INVOKE,
+       MONO_WRAPPER_COMINTEROP
 } MonoWrapperType;
 
 typedef enum {
@@ -56,7 +62,8 @@ typedef enum {
 
 typedef enum {
        MONO_REMOTING_TARGET_UNKNOWN,
-       MONO_REMOTING_TARGET_APPDOMAIN
+       MONO_REMOTING_TARGET_APPDOMAIN,
+       MONO_REMOTING_TARGET_COMINTEROP
 } MonoRemotingTarget;
 
 struct _MonoMethod {
@@ -65,6 +72,7 @@ struct _MonoMethod {
        guint32 token;
        MonoClass *klass;
        MonoMethodSignature *signature;
+       MonoGenericContainer *generic_container;
        /* name is useful mostly for debugging */
        const char *name;
        /* this is used by the inlining algorithm */
@@ -74,13 +82,13 @@ struct _MonoMethod {
        unsigned int string_ctor:1;
        unsigned int save_lmf:1;
        unsigned int dynamic:1; /* created & destroyed during runtime */
-       unsigned int is_inflated:1;
-       signed int slot : 21;
+       unsigned int is_inflated:1; /* whether we're a MonoMethodInflated */
+       unsigned int skip_visibility:1; /* whenever to skip JIT visibility checks */
+       signed int slot : 20;
 };
 
 struct _MonoMethodNormal {
        MonoMethod method;
-       MonoGenericContainer *generic_container;
        MonoMethodHeader *header;
 };
 
@@ -89,13 +97,6 @@ struct _MonoMethodWrapper {
        void *method_data;
 };
 
-struct _MonoMethodInflated {
-       MonoMethodNormal nmethod;
-       MonoGenericContext *context;
-       MonoMethod *declaring;
-       MonoMethodInflated *inflated;
-};
-
 struct _MonoMethodPInvoke {
        MonoMethod method;
        gpointer addr;
@@ -104,6 +105,19 @@ struct _MonoMethodPInvoke {
        guint16 implmap_idx;  /* index into IMPLMAP */
 };
 
+/*
+ * Inflated generic method.
+ */
+struct _MonoMethodInflated {
+       union {
+               MonoMethod method;
+               MonoMethodNormal normal;
+               MonoMethodPInvoke pinvoke;
+       } method;
+       MonoGenericContext *context;    /* The current context. */
+       MonoMethod *declaring;          /* the generic method definition. */
+};
+
 typedef struct {
        MonoType *generic_type;
        gpointer reflection_info;
@@ -153,7 +167,8 @@ struct _MonoClassField {
 };
 
 /* a field is ignored if it's named "_Deleted" and it has the specialname and rtspecialname flags set */
-#define mono_field_is_deleted(field) ((field)->name[0] == '_' && ((field)->type->attrs & 0x600) && (strcmp ((field)->name, "_Deleted") == 0))
+#define mono_field_is_deleted(field) (((field)->type->attrs & (FIELD_ATTRIBUTE_SPECIAL_NAME | FIELD_ATTRIBUTE_RT_SPECIAL_NAME)) \
+                                     && (strcmp ((field)->name, "_Deleted") == 0))
 
 typedef struct {
        MonoClassField *field;
@@ -191,7 +206,12 @@ struct _MonoEvent {
 enum {
        MONO_EXCEPTION_NONE = 0,
        MONO_EXCEPTION_SECURITY_LINKDEMAND = 1,
-       MONO_EXCEPTION_SECURITY_INHERITANCEDEMAND = 2
+       MONO_EXCEPTION_SECURITY_INHERITANCEDEMAND = 2,
+       MONO_EXCEPTION_INVALID_PROGRAM = 3,
+       MONO_EXCEPTION_UNVERIFIABLE_IL = 4,
+       MONO_EXCEPTION_MISSING_METHOD = 5,
+       MONO_EXCEPTION_MISSING_FIELD = 6,
+       MONO_EXCEPTION_TYPE_LOAD = 7
        /* add other exception type */
 };
 
@@ -245,14 +265,20 @@ struct _MonoClass {
        guint delegate        : 1; /* class is a Delegate */
        guint gc_descr_inited : 1; /* gc_descr is initialized */
        guint has_cctor       : 1; /* class has a cctor */
-       guint dummy           : 1; /* temporary hack */
-       /* next byte */
        guint has_references  : 1; /* it has GC-tracked references in the instance */
+       /* next byte */
        guint has_static_refs : 1; /* it has static fields that are GC-tracked */
+       guint no_special_static_fields : 1; /* has no thread/context static fields */
+       /* directly or indirectly derives from ComImport attributed class.
+        * this means we need to create a proxy for instances of this class
+        * for COM Interop. set this flag on loading so all we need is a quick check
+        * during object creation rather than having to traverse supertypes
+        */
+       guint is_com_object : 1; 
 
-       guint32    declsec_flags;       /* declarative security attributes flags */
-       guint32    exception_type;      /* MONO_EXCEPTION_* */
+       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;
@@ -276,16 +302,18 @@ struct _MonoClass {
         * Computed object instance size, total.
         */
        int        instance_size;
-       int        class_size;
        int        vtable_size; /* number of slots */
+       union {
+               int class_size; /* size of area for static fields */
+               int element_size; /* for array types */
+       } sizes;
 
        /*
         * From the TypeDef table
         */
        guint32    flags;
        struct {
-               guint32 first, last;
-               int count;
+               guint32 first, count;
        } field, method, property, event;
 
        /* loaded on demand */
@@ -321,21 +349,22 @@ struct _MonoClass {
        MonoMethod **vtable;    
 };
 
+/* the interface_offsets array is stored in memory before this struct */
 struct MonoVTable {
        MonoClass  *klass;
-    /*
+        /*
         * According to comments in gc_gcj.h, this should be the second word in
         * the vtable.
         */
        void *gc_descr;         
        MonoDomain *domain;  /* each object/vtable belongs to exactly one domain */
-        gpointer   *interface_offsets;   
         gpointer    data; /* to store static class data */
         gpointer    type; /* System.Type type for klass */
        guint16     max_interface_id;
        guint8      rank;
        guint remote          : 1; /* class is remotely activated */
        guint initialized     : 1; /* cctor has been run */
+       guint init_failed     : 1; /* cctor execution failed */
        /* do not add any fields after vtable, the structure is dynamically extended */
         gpointer    vtable [MONO_ZERO_LEN_ARRAY];      
 };
@@ -343,33 +372,49 @@ struct MonoVTable {
 /*
  * Generic instantiation data type encoding.
  */
+
+/*
+ * A particular generic instantiation:
+ *
+ * All instantiations are cached and we don't distinguish between class and method
+ * instantiations here.
+ */
 struct _MonoGenericInst {
-       guint id;
-       guint type_argc    : 22;
-       guint is_open      :  1;
-       guint is_reference :  1;
+       guint id;                       /* unique ID for debugging */
+       guint type_argc    : 22;        /* number of type arguments */
+       guint is_open      :  1;        /* if this is an open type */
+       guint is_reference :  1;        /* if this is a reference type */
        MonoType **type_argv;
 };
 
+/*
+ * A particular instantiation of a generic type.
+ */
 struct _MonoGenericClass {
-       MonoGenericInst *inst;
-       MonoClass *container_class;
-       MonoGenericContext *context;
-       guint is_dynamic  : 1;
-       guint is_inflated : 1;
+       MonoGenericInst *inst;          /* the instantiation */
+       MonoClass *container_class;     /* the generic type definition */
+       MonoGenericContext *context;    /* current context */
+       guint is_dynamic  : 1;          /* We're a MonoDynamicGenericClass */
+       guint is_inflated : 1;          /* We're a MonoInflatedGenericClass */
 };
 
+/*
+ * Performance optimization:
+ * We don't create the `MonoClass' for a `MonoGenericClass' until we really
+ * need it.
+ */
 struct _MonoInflatedGenericClass {
        MonoGenericClass generic_class;
        guint is_initialized   : 1;
        MonoClass *klass;
 };
 
+/*
+ * This is used when instantiating a generic type definition which is
+ * a TypeBuilder.
+ */
 struct _MonoDynamicGenericClass {
        MonoInflatedGenericClass generic_class;
-       MonoType *parent;
-       int count_ifaces;
-       MonoType **ifaces;
        int count_methods;
        MonoMethod **methods;
        int count_ctors;
@@ -383,34 +428,62 @@ struct _MonoDynamicGenericClass {
        guint initialized;
 };
 
+/*
+ * A particular instantiation of a generic method.
+ */
 struct _MonoGenericMethod {
-       MonoGenericInst *inst;
-       MonoGenericClass *generic_class;
-       MonoGenericContainer *container;
+       MonoGenericInst *inst;                  /* the instantiation */
+       MonoGenericClass *generic_class;        /* if we're in a generic type */
+       MonoGenericContainer *container;        /* type parameters */
        gpointer reflection_info;
 };
 
+/*
+ * The generic context.
+ */
 struct _MonoGenericContext {
+       /*
+        * The container which has been instantiated.
+        *
+        * If we're in a generic method, the generic method definition's container.
+        * Otherwise the generic type's container.
+        */
        MonoGenericContainer *container;
+       /* The current generic class */
        MonoGenericClass *gclass;
+       /* The current generic method */
        MonoGenericMethod *gmethod;
 };
 
+/*
+ * The generic container.
+ *
+ * Stores the type parameters of a generic type definition or a generic method definition.
+ */
 struct _MonoGenericContainer {
        MonoGenericContext context;
+       /* If we're a generic method definition in a generic type definition,
+          the generic container of the containing class. */
        MonoGenericContainer *parent;
+       /* If we're a generic method definition, caches all their instantiations. */
        GHashTable *method_hash;
+       /* If we're a generic type definition, its `MonoClass'. */
        MonoClass *klass;
        int type_argc    : 6;
+       /* If true, we're a generic method, otherwise a generic type definition. */
+       /* Invariant: parent != NULL => is_method */
        int is_method    : 1;
-       int is_signature : 1;
+       /* Our type parameters. */
        MonoGenericParam *type_params;
 };
 
+/*
+ * A type parameter.
+ */
 struct _MonoGenericParam {
-       MonoGenericContainer *owner;
-       MonoClass *pklass;
-       MonoMethod *method;
+       MonoGenericContainer *owner;    /* Type or method this parameter was defined in. */
+       MonoClass *pklass;              /* The corresponding `MonoClass'. */
+       MonoMethod *method;             /* If we're a method type parameter, the method. */
        const char *name;
        guint16 flags;
        guint16 num;
@@ -432,6 +505,7 @@ typedef struct MonoCachedClassInfo {
        guint blittable : 1;
        guint has_references : 1;
        guint has_static_refs : 1;
+       guint no_special_static_fields : 1;
        guint32 cctor_token;
        MonoImage *finalize_image;
        guint32 finalize_token;
@@ -445,15 +519,37 @@ typedef struct {
        const char *name;
        gconstpointer func;
        gconstpointer wrapper;
+       gconstpointer trampoline;
        MonoMethodSignature *sig;
 } MonoJitICallInfo;
 
+/*
+ * Information about a type load error encountered by the loader.
+ */
+typedef enum {
+       MONO_LOADER_ERROR_TYPE,
+       MONO_LOADER_ERROR_METHOD,
+       MONO_LOADER_ERROR_FIELD,
+       MONO_LOADER_ERROR_ASSEMBLY
+} MonoLoaderErrorKind;
+
+typedef struct {
+       MonoLoaderErrorKind kind;
+       char *class_name; /* If kind == TYPE */
+       char *assembly_name; /* If kind == TYPE or ASSEMBLY */
+       MonoClass *klass; /* If kind != TYPE */
+       const char *member_name; /* If kind != TYPE */
+       gboolean ref_only; /* If kind == ASSEMBLY */
+} MonoLoaderError;
+
 #define mono_class_has_parent(klass,parent) (((klass)->idepth >= (parent)->idepth) && ((klass)->supertypes [(parent)->idepth - 1] == (parent)))
 
 typedef struct {
        gulong new_object_count;
        gulong initialized_class_count;
+       gulong generic_vtable_count;
        gulong used_class_count;
+       gulong method_count;
        gulong class_vtable_size;
        gulong class_static_data_size;
        gulong generic_instance_count;
@@ -465,7 +561,7 @@ typedef struct {
        gboolean enabled;
 } MonoStats;
 
-extern MonoStats mono_stats;
+extern MonoStats mono_stats MONO_INTERNAL;
 
 typedef gpointer (*MonoTrampoline)       (MonoMethod *method);
 typedef gpointer (*MonoRemotingTrampoline)       (MonoMethod *method, MonoRemotingTarget target);
@@ -475,72 +571,90 @@ typedef gpointer (*MonoLookupDynamicToken) (MonoImage *image, guint32 token, Mon
 
 typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInfo *res);
 
+typedef gboolean (*MonoGetClassFromName) (MonoImage *image, const char *name_space, const char *name, MonoClass **res);
+
+void
+mono_classes_init (void) MONO_INTERNAL;
+
+void
+mono_classes_cleanup (void) MONO_INTERNAL;
+
 void
-mono_classes_init (void);
+mono_class_layout_fields   (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_class_layout_fields   (MonoClass *klass);
+mono_class_setup_interface_offsets (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int onum);
+mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int onum) MONO_INTERNAL;
 
 void
-mono_class_setup_vtable (MonoClass *klass);
+mono_class_setup_vtable (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_class_setup_methods (MonoClass *klass);
+mono_class_setup_methods (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_class_setup_mono_type (MonoClass *klass);
+mono_class_setup_mono_type (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_class_setup_parent    (MonoClass *klass, MonoClass *parent);
+mono_class_setup_parent    (MonoClass *klass, MonoClass *parent) MONO_INTERNAL;
 
 void
-mono_class_setup_supertypes (MonoClass *klass);
+mono_class_setup_supertypes (MonoClass *klass) MONO_INTERNAL;
 
 GPtrArray*
-mono_class_get_implemented_interfaces (MonoClass *klass);
+mono_class_get_implemented_interfaces (MonoClass *klass) MONO_INTERNAL;
 
 gboolean
-mono_class_is_open_constructed_type (MonoType *t);
+mono_class_is_open_constructed_type (MonoType *t) MONO_INTERNAL;
 
-MonoMethod**
-mono_class_get_overrides_full (MonoImage *image, guint32 type_token, gint32 *num_overrides,
-                              MonoGenericContext *generic_context);
+gboolean
+mono_class_get_overrides_full (MonoImage *image, guint32 type_token, MonoMethod ***overrides, gint32 *num_overrides,
+                              MonoGenericContext *generic_context) MONO_INTERNAL;
 
 MonoMethod*
-mono_class_get_cctor (MonoClass *klass);
+mono_class_get_cctor (MonoClass *klass) MONO_INTERNAL;
 
 MonoMethod*
-mono_class_get_finalizer (MonoClass *klass);
+mono_class_get_finalizer (MonoClass *klass) MONO_INTERNAL;
 
 gboolean
-mono_class_needs_cctor_run (MonoClass *klass, MonoMethod *caller);
+mono_class_needs_cctor_run (MonoClass *klass, MonoMethod *caller) MONO_INTERNAL;
+
+gboolean
+mono_class_has_special_static_fields (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_install_trampoline (MonoTrampoline func);
+mono_install_trampoline (MonoTrampoline func) MONO_INTERNAL;
 
 void
-mono_install_remoting_trampoline (MonoRemotingTrampoline func);
+mono_install_remoting_trampoline (MonoRemotingTrampoline func) MONO_INTERNAL;
 
 void
-mono_install_delegate_trampoline (MonoDelegateTrampoline func);
+mono_install_delegate_trampoline (MonoDelegateTrampoline func) MONO_INTERNAL;
 
 gpointer
-mono_lookup_dynamic_token (MonoImage *image, guint32 token);
+mono_lookup_dynamic_token (MonoImage *image, guint32 token) MONO_INTERNAL;
 
 gpointer
-mono_lookup_dynamic_token_class (MonoImage *image, guint32 token, MonoClass **handle_class);
+mono_lookup_dynamic_token_class (MonoImage *image, guint32 token, MonoClass **handle_class) MONO_INTERNAL;
+
+void
+mono_install_lookup_dynamic_token (MonoLookupDynamicToken func) MONO_INTERNAL;
 
 void
-mono_install_lookup_dynamic_token (MonoLookupDynamicToken func);
+mono_install_get_cached_class_info (MonoGetCachedClassInfo func) MONO_INTERNAL;
 
 void
-mono_install_get_cached_class_info (MonoGetCachedClassInfo func);
+mono_install_get_class_from_name (MonoGetClassFromName func) MONO_INTERNAL;
 
 MonoInflatedGenericClass*
-mono_get_inflated_generic_class (MonoGenericClass *gclass);
+mono_get_inflated_generic_class (MonoGenericClass *gclass) MONO_INTERNAL;
+
+MonoMethod*
+mono_class_inflate_generic_method_full (MonoMethod *method, MonoClass *klass_hint, MonoGenericContext *context);
+
 
 typedef struct {
        MonoImage *corlib;
@@ -570,6 +684,7 @@ typedef struct {
        MonoClass *typehandle_class;
        MonoClass *fieldhandle_class;
        MonoClass *methodhandle_class;
+       MonoClass *systemtype_class;
        MonoClass *monotype_class;
        MonoClass *exception_class;
        MonoClass *threadabortexception_class;
@@ -595,73 +710,122 @@ typedef struct {
        MonoClass *iremotingtypeinfo_class;
        MonoClass *runtimesecurityframe_class;
        MonoClass *executioncontext_class;
-       MonoClass *generic_array_class;
+       MonoClass *internals_visible_class;
+       MonoClass *generic_ilist_class;
+       MonoClass *generic_nullable_class;
+       MonoClass *variant_class;
+       MonoClass *com_object_class;
+       MonoClass *com_interop_proxy_class;
 } MonoDefaults;
 
-extern MonoDefaults mono_defaults;
+extern MonoDefaults mono_defaults MONO_INTERNAL;
+
+void
+mono_loader_init           (void) MONO_INTERNAL;
+
+void
+mono_loader_cleanup        (void) MONO_INTERNAL;
+
+void
+mono_loader_lock           (void) MONO_INTERNAL;
+
+void
+mono_loader_unlock         (void) MONO_INTERNAL;
+
+void
+mono_loader_set_error_assembly_load (const char *assembly_name, gboolean ref_only) MONO_INTERNAL;
+
+void
+mono_loader_set_error_type_load (const char *class_name, const char *assembly_name) MONO_INTERNAL;
 
 void
-mono_loader_init           (void);
+mono_loader_set_error_method_load (const char *class_name, const char *member_name) MONO_INTERNAL;
 
 void
-mono_loader_lock           (void);
+mono_loader_set_error_field_load (MonoClass *klass, const char *member_name) MONO_INTERNAL;
+
+MonoException *
+mono_loader_error_prepare_exception (MonoLoaderError *error) MONO_INTERNAL;
+
+MonoLoaderError *
+mono_loader_get_last_error (void) MONO_INTERNAL;
 
 void
-mono_loader_unlock         (void);
+mono_loader_clear_error    (void) MONO_INTERNAL;
 
-void 
-mono_icall_init            (void);
+void
+mono_icall_init            (void) MONO_INTERNAL;
 
 void
-mono_icall_cleanup         (void);
+mono_icall_cleanup         (void) MONO_INTERNAL;
 
 gpointer
-mono_method_get_wrapper_data (MonoMethod *method, guint32 id);
+mono_method_get_wrapper_data (MonoMethod *method, guint32 id) MONO_INTERNAL;
 
 void
-mono_install_stack_walk (MonoStackWalkImpl func);
+mono_install_stack_walk (MonoStackWalkImpl func) MONO_INTERNAL;
 
 gboolean
-mono_metadata_has_generic_params (MonoImage *image, guint32 token);
+mono_metadata_has_generic_params (MonoImage *image, guint32 token) MONO_INTERNAL;
+
+MonoGenericContainer *
+mono_metadata_load_generic_params (MonoImage *image, guint32 token,
+                                  MonoGenericContainer *parent_container);
 
-MonoGenericContainer *mono_metadata_load_generic_params (MonoImage *image, guint32 token,
-                                                        MonoGenericContainer *parent_container);
+void
+mono_metadata_load_generic_param_constraints (MonoImage *image, guint32 token,
+                                             MonoGenericContainer *container);
 
 MonoMethodSignature*
-mono_create_icall_signature (const char *sigstr);
+mono_create_icall_signature (const char *sigstr) MONO_INTERNAL;
 
 MonoJitICallInfo *
-mono_register_jit_icall (gconstpointer func, const char *name, MonoMethodSignature *sig, gboolean is_save);
+mono_register_jit_icall (gconstpointer func, const char *name, MonoMethodSignature *sig, gboolean is_save) MONO_INTERNAL;
 
 void
-mono_register_jit_icall_wrapper (MonoJitICallInfo *info, gconstpointer wrapper);
+mono_register_jit_icall_wrapper (MonoJitICallInfo *info, gconstpointer wrapper) MONO_INTERNAL;
 
 MonoJitICallInfo *
-mono_find_jit_icall_by_name (const char *name);
+mono_find_jit_icall_by_name (const char *name) MONO_INTERNAL;
 
 MonoJitICallInfo *
-mono_find_jit_icall_by_addr (gconstpointer addr);
-
-MonoMethodSignature*
-mono_class_inflate_generic_signature (MonoImage *image, MonoMethodSignature *sig, MonoGenericContext *context);
+mono_find_jit_icall_by_addr (gconstpointer addr) MONO_INTERNAL;
 
-MonoMethodSignature *
-mono_method_signature_full (MonoMethod *image, MonoGenericContext *context);
+MonoGenericInst *
+mono_get_shared_generic_inst (MonoGenericContainer *container) MONO_INTERNAL;
 
 MonoGenericClass *
-mono_get_shared_generic_class (MonoGenericContainer *container, gboolean is_dynamic);
+mono_get_shared_generic_class (MonoGenericContainer *container, gboolean is_dynamic) MONO_INTERNAL;
+
+MonoGenericMethod *
+mono_get_shared_generic_method (MonoGenericContainer *container) MONO_INTERNAL;
 
 gboolean
-mono_class_set_failure (MonoClass *klass, guint32 ex_type, void *ex_data);
+mono_class_set_failure (MonoClass *klass, guint32 ex_type, void *ex_data) MONO_INTERNAL;
 
 MonoException*
-mono_class_get_exception_for_failure (MonoClass *klass);
+mono_class_get_exception_for_failure (MonoClass *klass) MONO_INTERNAL;
+
+char*
+mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format) MONO_INTERNAL;
 
 char*
-mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format);
+mono_type_get_full_name (MonoClass *class) MONO_INTERNAL;
+
+MonoArrayType *mono_dup_array_type (MonoArrayType *a) MONO_INTERNAL;
+MonoMethodSignature *mono_metadata_signature_deep_dup (MonoMethodSignature *sig) MONO_INTERNAL;
+
+void
+mono_image_init_name_cache (MonoImage *image);
+
+gboolean mono_class_is_nullable (MonoClass *klass) MONO_INTERNAL;
+MonoClass *mono_class_get_nullable_param (MonoClass *klass) MONO_INTERNAL;
 
-MonoArrayType *mono_dup_array_type (MonoArrayType *a);
-MonoMethodSignature *mono_metadata_signature_deep_dup (MonoMethodSignature *sig);
+/* object debugging functions, for use inside gdb */
+void mono_object_describe        (MonoObject *obj);
+void mono_object_describe_fields (MonoObject *obj);
+void mono_value_describe_fields  (MonoClass* klass, const char* addr);
+void mono_class_describe_statics (MonoClass* klass);
 
 #endif /* __MONO_METADATA_CLASS_INTERBALS_H__ */