gluezilla/src:
[mono.git] / mono / metadata / metadata-internals.h
index 221e5c9dfd45ca9aa6db9567ab6df60f50f457ff..8ca4e5d5ebc781c6dcb434ad2183c903e5ac78a3 100644 (file)
 #include "mono/utils/mono-compiler.h"
 #include "mono/utils/mono-dl.h"
 #include "mono/utils/monobitset.h"
+#include "mono/utils/mono-property-hash.h"
+#include "mono/utils/mono-value-hash.h"
+
+#define MONO_SECMAN_FLAG_INIT(x)               (x & 0x2)
+#define MONO_SECMAN_FLAG_GET_VALUE(x)          (x & 0x1)
+#define MONO_SECMAN_FLAG_SET_VALUE(x,y)                do { x = ((y) ? 0x3 : 0x2); } while (0)
 
 struct _MonoAssembly {
        /* 
@@ -35,6 +41,7 @@ struct _MonoAssembly {
        guint32 aptc:2;         /* Has the [AllowPartiallyTrustedCallers] attributes */
        guint32 fulltrust:2;    /* Has FullTrust permission */
        guint32 unmanaged:2;    /* Has SecurityPermissionFlag.UnmanagedCode permission */
+       guint32 skipverification:2;     /* Has SecurityPermissionFlag.SkipVerification permission */
 };
 
 typedef struct {
@@ -77,6 +84,11 @@ struct _MonoImage {
        guint8 raw_buffer_used    : 1;
        guint8 raw_data_allocated : 1;
 
+#ifdef PLATFORM_WIN32
+       /* Module was loaded using LoadLibrary. */
+       guint8 is_module_handle : 1;
+#endif
+
        /* Whenever this is a dynamically emitted module */
        guint8 dynamic : 1;
 
@@ -137,8 +149,12 @@ struct _MonoImage {
        /*
         * Indexed by method tokens and typedef tokens.
         */
-       GHashTable *method_cache;
+       MonoValueHashTable *method_cache;
        MonoInternalHashTable class_cache;
+
+       /* Indexed by memberref + methodspec tokens */
+       GHashTable *methodref_cache;
+
        /*
         * Indexed by fielddef and memberref tokens
         */
@@ -188,6 +204,8 @@ struct _MonoImage {
        GHashTable *unbox_wrapper_cache;
        GHashTable *cominterop_invoke_cache;
        GHashTable *cominterop_wrapper_cache;
+       GHashTable *static_rgctx_invoke_cache; /* LOCKING: marshal lock */
+       GHashTable *thunk_invoke_cache;
 
        /*
         * indexed by MonoClass pointers
@@ -199,19 +217,15 @@ struct _MonoImage {
        GHashTable *castclass_cache;
        GHashTable *proxy_isinst_cache;
        GHashTable *rgctx_template_hash; /* LOCKING: templates lock */
-       /* Maps from uninstantiated generic classes to GSList's of
-        * instantiated open generic classes whose container class is the key
-        * class.
-        *
-        * LOCKING: templates lock
-        */
-       GHashTable *generic_class_open_instances_hash;
 
        /*
         * indexed by token and MonoGenericContext pointer
         */
        GHashTable *generic_class_cache;
 
+       /* Contains rarely used fields of runtime structures belonging to this image */
+       MonoPropertyHash *property_hash;
+
        void *reflection_info;
 
        /*
@@ -287,6 +301,7 @@ struct _MonoDynamicImage {
        GHashTable *method_to_table_idx;
        GHashTable *field_to_table_idx;
        GHashTable *method_aux_hash;
+       MonoGHashTable *generic_def_objects;
        gboolean run;
        gboolean save;
        gboolean initial_image;
@@ -419,7 +434,10 @@ mono_metadata_inflate_generic_inst          (MonoGenericInst       *ginst,
 
 void mono_dynamic_stream_reset  (MonoDynamicStream* stream) MONO_INTERNAL;
 void mono_assembly_addref       (MonoAssembly *assembly) MONO_INTERNAL;
-void mono_assembly_load_friends (MonoAssembly* ass);
+void mono_assembly_load_friends (MonoAssembly* ass) MONO_INTERNAL;
+gboolean mono_assembly_has_skip_verification (MonoAssembly* ass) MONO_INTERNAL;
+
+gboolean mono_public_tokens_are_equal (const unsigned char *pubt1, const unsigned char *pubt2) MONO_INTERNAL;
 
 void mono_config_parse_publisher_policy (const char *filename, MonoAssemblyBindingInfo *binding_info) MONO_INTERNAL;
 
@@ -436,6 +454,7 @@ void mono_unload_interface_ids (MonoBitSet *bitset) MONO_INTERNAL;
 
 
 MonoType *mono_metadata_type_dup (MonoMemPool *mp, const MonoType *original) MONO_INTERNAL;
+MonoMethodSignature  *mono_metadata_signature_dup_full (MonoMemPool *mp,MonoMethodSignature *sig) MONO_INTERNAL;
 
 MonoGenericInst *
 mono_get_shared_generic_inst (MonoGenericContainer *container) MONO_INTERNAL;