#include "mono/utils/monobitset.h"
struct _MonoAssembly {
+ /*
+ * The number of appdomains which have this assembly loaded plus the number of
+ * assemblies referencing this assembly through an entry in their image->references
+ * arrays. The later is needed because entries in the image->references array
+ * might point to assemblies which are only loaded in some appdomains, and without
+ * the additional reference, they can be freed at any time.
+ * The ref_count is initially 0.
+ */
int ref_count; /* use atomic operations only */
char *basedir;
MonoAssemblyName aname;
guint32 size_bitfield;
};
+#define REFERENCE_MISSING ((gpointer) -1)
+
struct _MonoImage {
+ /*
+ * The number of assemblies which reference this MonoImage though their 'image'
+ * field plus the number of images which reference this MonoImage through their
+ * 'modules' field, plus the number of threads holding temporary references to
+ * this image between calls of mono_image_open () and mono_image_close ().
+ */
int ref_count;
FILE *file_descr;
/* if file_descr is NULL the image was loaded from raw data */
char *name;
const char *assembly_name;
const char *module_name;
- const char *version;
+ char *version;
gint16 md_version_major, md_version_minor;
char *guid;
void *image_info;
GHashTable *memberref_signatures;
GHashTable *helper_signatures;
+ /* Indexed by blob heap indexes */
+ GHashTable *method_signatures;
+
/*
* Indexes namespaces to hash tables that map class name to typedef token.
*/
GHashTable *name_cache;
/*
- * Indexed by ((rank << 24) | (typedef & 0xffffff)), which limits us to a
- * maximal rank of 255
+ * Indexed by MonoClass
*/
GHashTable *array_cache;
+ GHashTable *ptr_cache;
/*
* indexed by MonoMethodSignature
GHashTable *synchronized_cache;
GHashTable *unbox_wrapper_cache;
+ /*
+ * indexed by MonoClass pointers
+ */
+ GHashTable *ldfld_wrapper_cache;
+ GHashTable *ldflda_wrapper_cache;
+ GHashTable *ldfld_remote_wrapper_cache;
+ GHashTable *stfld_wrapper_cache;
+ GHashTable *stfld_remote_wrapper_cache;
+ GHashTable *isinst_cache;
+ GHashTable *castclass_cache;
+ GHashTable *proxy_isinst_cache;
+
void *reflection_info;
/*
/* for use with allocated memory blocks (assumes alignment is to 8 bytes) */
guint mono_aligned_addr_hash (gconstpointer ptr) MONO_INTERNAL;
+void
+mono_metadata_cleanup (void);
+
const char * mono_meta_table_name (int table) MONO_INTERNAL;
void mono_metadata_compute_table_bases (MonoImage *meta) MONO_INTERNAL;
MonoGenericContainer *container,
const char *ptr);
+int* mono_metadata_get_param_attrs (MonoImage *m, int def);
+
guint
mono_metadata_generic_method_hash (MonoGenericMethod *gmethod) MONO_INTERNAL;