Author: lupus
Date: 2007-09-28 14:05:16 -0400 (Fri, 28 Sep 2007)
New Revision: 86597
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/class-internals.h
Log:
Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
* class-internals.h: optimize field layout of MonoClass to
requires less cachelines at runtime and save a few bytes on 64 bit
systems.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2007-09-28 18:02:06 UTC (rev 86596)
+++ trunk/mono/mono/metadata/ChangeLog 2007-09-28 18:05:16 UTC (rev 86597)
@@ -1,3 +1,10 @@
+
+Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * class-internals.h: optimize field layout of MonoClass to
+ requires less cachelines at runtime and save a few bytes on 64 bit
+ systems.
+
2007-09-28 Jb Evain <[EMAIL PROTECTED]>
* reflection.c: when encoding type names in custom attributes,
Modified: trunk/mono/mono/metadata/class-internals.h
===================================================================
--- trunk/mono/mono/metadata/class-internals.h 2007-09-28 18:02:06 UTC (rev
86596)
+++ trunk/mono/mono/metadata/class-internals.h 2007-09-28 18:05:16 UTC (rev
86597)
@@ -189,17 +189,20 @@
} MonoClassRuntimeInfo;
struct _MonoClass {
- MonoImage *image;
-
- /* The underlying type of the enum */
- MonoType *enum_basetype;
/* element class for arrays and enum */
MonoClass *element_class;
/* used for subtype checks */
MonoClass *cast_class;
+
+ /* for fast subtype checks */
+ MonoClass **supertypes;
+ guint16 idepth;
+
/* array dimension */
guint8 rank;
+ int instance_size; /* object instance size */
+
guint inited : 1;
/* We use init_pending to detect cyclic calls to mono_class_init */
guint init_pending : 1;
@@ -242,20 +245,22 @@
guint8 exception_type; /* MONO_EXCEPTION_* */
void* exception_data; /* Additional information about the
exception */
- guint32 declsec_flags; /* declarative security attributes
flags */
MonoClass *parent;
MonoClass *nested_in;
GList *nested_classes;
- guint32 type_token;
+ MonoImage *image;
const char *name;
const char *name_space;
-
- /* for fast subtype checks */
- MonoClass **supertypes;
- guint16 idepth;
+ /* The underlying type of the enum */
+ MonoType *enum_basetype;
+
+ guint32 declsec_flags; /* declarative security attributes
flags */
+ guint32 type_token;
+ int vtable_size; /* number of slots */
+
guint16 interface_count;
guint16 interface_id; /* unique inderface id (for
interfaces) */
guint16 max_interface_id;
@@ -267,11 +272,6 @@
MonoClass **interfaces;
- /*
- * Computed object instance size, total.
- */
- int instance_size;
- int vtable_size; /* number of slots */
union {
int class_size; /* size of area for static fields */
int element_size; /* for array types */
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches