Merge pull request #498 from Unroll-Me/master
[mono.git] / mono / metadata / class-internals.h
index fccf6a30975adbac02d304cf75a241279c81d9be..bd74d47a72a8e023a39aaa20437d9da3b1e4a109 100644 (file)
@@ -1,3 +1,6 @@
+/* 
+ * Copyright 2012 Xamarin Inc
+ */
 #ifndef __MONO_METADATA_CLASS_INTERBALS_H__
 #define __MONO_METADATA_CLASS_INTERBALS_H__
 
@@ -28,6 +31,13 @@ typedef struct _MonoMethodPInvoke MonoMethodPInvoke;
  */
 #define MONO_PROP_DYNAMIC_CATTR 0x1000
 
+#ifdef ENABLE_ICALL_EXPORT
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+#define ICALL_EXPORT
+#else
+#define ICALL_EXPORT static
+#endif
+
 typedef enum {
 #define WRAPPER(e,n) MONO_WRAPPER_ ## e,
 #include "wrapper-types.h"
@@ -308,6 +318,7 @@ struct _MonoClass {
        guint is_inflated : 1; /* class is a generic instance */
        /* next byte */
        guint has_finalize_inited    : 1; /* has_finalize is initialized */
+       guint fields_inited : 1; /* fields is initialized */
 
        guint8     exception_type;      /* MONO_EXCEPTION_* */
 
@@ -525,6 +536,8 @@ struct _MonoDynamicGenericClass {
 struct _MonoGenericParam {
        MonoGenericContainer *owner;    /* Type or method this parameter was defined in. */
        guint16 num;
+       /* For internal runtime use, used to make different versions of the same param */
+       guint16 serial;
        /* 
         * If owner is NULL, or owner is 'owned' by this gparam,
         * then this is the image whose mempool this struct was allocated from.
@@ -633,6 +646,9 @@ typedef struct {
 void
 mono_class_setup_supertypes (MonoClass *klass) MONO_INTERNAL;
 
+void
+mono_class_setup_fields_locking (MonoClass *class) MONO_INTERNAL;
+
 /* WARNING
  * Only call this function if you can ensure both @klass and @parent
  * have supertype information initialized.
@@ -704,10 +720,6 @@ typedef struct {
        gulong generics_sharable_methods;
        gulong generics_unsharable_methods;
        gulong generics_shared_methods;
-       gulong minor_gc_count;
-       gulong major_gc_count;
-       gulong minor_gc_time_usecs;
-       gulong major_gc_time_usecs;
        gboolean enabled;
 } MonoStats;
 
@@ -1058,11 +1070,13 @@ typedef struct {
        MonoClass *internals_visible_class;
        MonoClass *generic_ilist_class;
        MonoClass *generic_nullable_class;
+#ifndef DISABLE_COM
        MonoClass *variant_class;
        MonoClass *com_object_class;
        MonoClass *com_interop_proxy_class;
        MonoClass *iunknown_class;
        MonoClass *idispatch_class;
+#endif
        MonoClass *safehandle_class;
        MonoClass *handleref_class;
        MonoClass *attribute_class;