Merge pull request #2020 from tomjepp/master
[mono.git] / mono / metadata / class-internals.h
index 441b0a4271ce2118e96a4cb63c8139a775ab2343..46ea5ef635098895a28624e2a0dc101d5418e1da 100644 (file)
@@ -11,6 +11,7 @@
 #include <mono/io-layer/io-layer.h>
 #include "mono/utils/mono-compiler.h"
 #include "mono/utils/mono-error.h"
+#include "mono/sgen/gc-internal-agnostic.h"
 
 #define MONO_CLASS_IS_ARRAY(c) ((c)->rank)
 
@@ -81,8 +82,6 @@ struct _MonoMethod {
        unsigned int is_inflated:1; /* whether we're a MonoMethodInflated */
        unsigned int skip_visibility:1; /* whenever to skip JIT visibility checks */
        unsigned int verification_success:1; /* whether this method has been verified successfully.*/
-       /* TODO we MUST get rid of this field, it's an ugly hack nobody is proud of. */
-       unsigned int is_mb_open : 1;            /* This is the fully open instantiation of a generic method_builder. Worse than is_tb_open, but it's temporary */
        signed int slot : 16;
 
        /*
@@ -394,7 +393,7 @@ struct _MonoClass {
        MonoGenericClass *generic_class;
        MonoGenericContainer *generic_container;
 
-       void *gc_descr;
+       MonoGCDescriptor gc_descr;
 
        MonoClassRuntimeInfo *runtime_info;
 
@@ -452,7 +451,7 @@ struct MonoVTable {
         * According to comments in gc_gcj.h, this should be the second word in
         * the vtable.
         */
-       void *gc_descr;         
+       MonoGCDescriptor gc_descr;
        MonoDomain *domain;  /* each object/vtable belongs to exactly one domain */
         gpointer    type; /* System.Type type for klass */
        guint8     *interface_bitmap;
@@ -521,6 +520,7 @@ struct _MonoMethodInflated {
        MonoMethodHeader *header;
        MonoMethod *declaring;          /* the generic method definition. */
        MonoGenericContext context;     /* The current instantiation */
+       MonoImageSet *owner; /* The image set that the inflated method belongs to. */
 };
 
 /*
@@ -861,23 +861,6 @@ typedef struct {
        void       *handle;
 } MonoHandleRef;
 
-enum {
-       MONO_GENERIC_SHARING_NONE,
-       MONO_GENERIC_SHARING_COLLECTIONS,
-       MONO_GENERIC_SHARING_CORLIB,
-       MONO_GENERIC_SHARING_ALL
-};
-
-/*
- * Flags for which contexts were used in inflating a generic.
- */
-enum {
-       MONO_GENERIC_CONTEXT_USED_CLASS = 1,
-       MONO_GENERIC_CONTEXT_USED_METHOD = 2
-};
-
-#define MONO_GENERIC_CONTEXT_USED_BOTH         (MONO_GENERIC_CONTEXT_USED_CLASS | MONO_GENERIC_CONTEXT_USED_METHOD)
-
 extern MonoStats mono_stats;
 
 typedef gpointer (*MonoTrampoline)       (MonoMethod *method);
@@ -1038,8 +1021,8 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k
 MonoMethod *
 mono_class_inflate_generic_method_checked (MonoMethod *method, MonoGenericContext *context, MonoError *error);
 
-MonoMethodInflated*
-mono_method_inflated_lookup (MonoMethodInflated* method, gboolean cache);
+MonoImageSet *
+mono_metadata_get_image_set_for_method (MonoMethodInflated *method);
 
 MONO_API MonoMethodSignature *
 mono_metadata_get_inflated_signature (MonoMethodSignature *sig, MonoGenericContext *context);
@@ -1123,6 +1106,8 @@ typedef struct {
        MonoClass *customattribute_data_class;
        MonoClass *critical_finalizer_object;
        MonoClass *generic_ireadonlylist_class;
+       MonoClass *threadpool_wait_callback_class;
+       MonoMethod *threadpool_perform_wait_callback_method;
 } MonoDefaults;
 
 #ifdef DISABLE_REMOTING
@@ -1223,6 +1208,9 @@ mono_loader_get_last_error (void);
 void
 mono_loader_clear_error    (void);
 
+void
+mono_loader_assert_no_error (void);
+
 void
 mono_reflection_init       (void);