[runtime] Implement FieldInfo.GetRawConstantValue () for dynamic types. Fixes #25690.
[mono.git] / mono / metadata / metadata-internals.h
index f165929b27394f0535ba0301eac6b96ff328ccc5..ea35f5b7c636a7b4f7cf08313a6e0f81ac7389fe 100644 (file)
@@ -204,7 +204,7 @@ struct _MonoImage {
        guint32 module_count;
        gboolean *modules_loaded;
 
-       MonoImage **files;
+       MonoImage **files; /*protected by the image lock*/
 
        gpointer aot_module;
 
@@ -228,7 +228,7 @@ struct _MonoImage {
        MonoConcurrentHashTable *field_cache; /*protected by the image lock*/
 
        /* indexed by typespec tokens. */
-       GHashTable *typespec_cache;
+       GHashTable *typespec_cache; /* protected by the image lock */
        /* indexed by token */
        GHashTable *memberref_signatures;
        GHashTable *helper_signatures;
@@ -249,7 +249,7 @@ struct _MonoImage {
 
        GHashTable *szarray_cache;
        /* This has a separate lock to improve scalability */
-       CRITICAL_SECTION szarray_cache_lock;
+       mono_mutex_t szarray_cache_lock;
 
        /*
         * indexed by MonoMethodSignature 
@@ -317,6 +317,7 @@ struct _MonoImage {
        MonoDllMap *dll_map;
 
        /* interfaces IDs from this image */
+       /* protected by the classes lock */
        MonoBitSet *interface_bitset;
 
        /* when the image is being closed, this is abused as a list of
@@ -346,7 +347,7 @@ struct _MonoImage {
         * No other runtime locks must be taken while holding this lock.
         * It's meant to be used only to mutate and query structures part of this image.
         */
-       CRITICAL_SECTION    lock;
+       mono_mutex_t    lock;
 };
 
 /*
@@ -362,7 +363,7 @@ typedef struct {
 
        GHashTable *gclass_cache, *ginst_cache, *gmethod_cache, *gsignature_cache;
 
-       CRITICAL_SECTION    lock;
+       mono_mutex_t    lock;
 
        /*
         * Memory for generic instances owned by this image set should be allocated from
@@ -523,6 +524,20 @@ struct _MonoMethodSignature {
        MonoType     *params [MONO_ZERO_LEN_ARRAY];
 };
 
+/*
+ * AOT cache configuration loaded from config files.
+ * Doesn't really belong here.
+ */
+typedef struct {
+       /*
+        * Enable aot caching for applications whose main assemblies are in
+        * this list.
+        */
+       GSList *apps;
+       GSList *assemblies;
+       char *aot_options;
+} MonoAotCacheConfig;
+
 #define MONO_SIZEOF_METHOD_SIGNATURE (sizeof (struct _MonoMethodSignature) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
 
 static inline gboolean
@@ -785,5 +800,13 @@ MonoMethod *mono_get_method_constrained_with_method (MonoImage *image, MonoMetho
 
 void mono_type_set_alignment (MonoTypeEnum type, int align) MONO_INTERNAL;
 
+MonoAotCacheConfig *mono_get_aot_cache_config (void) MONO_INTERNAL;
+MonoType *
+mono_type_create_from_typespec_checked (MonoImage *image, guint32 type_spec, MonoError *error) MONO_INTERNAL;
+
+MonoMethodSignature*
+mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32 token, MonoGenericContext *context, MonoError *error) MONO_INTERNAL;
+       
+
 #endif /* __MONO_METADATA_INTERNALS_H__ */