Permalink
Browse files

Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>

	* class.c, object.c, class-internals.h, marshal.c: rearrange
	some fields and tweak some types to lower memory usage.


svn path=/trunk/mono/; revision=39022
  • Loading branch information...
illupus committed Jan 17, 2005
1 parent 687a961 commit 4e68cba74f65110cf894867c43754f9655bac297
Showing with 21 additions and 12 deletions.
  1. +6 −0 mono/metadata/ChangeLog
  2. +10 −9 mono/metadata/class-internals.h
  3. +1 −0 mono/metadata/class.c
  4. +3 −3 mono/metadata/marshal.c
  5. +1 −0 mono/metadata/object.c
View
@@ -1,3 +1,9 @@
Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
* class.c, object.c, class-internals.h, marshal.c: rearrange
some fields and tweak some types to lower memory usage.
2005-01-17 Zoltan Varga <vargaz@freemail.hu>
* threads.c (signal_thread_state_change): Handle the case when the
@@ -183,7 +183,7 @@ struct _MonoClass {
/* used for subtype checks */
MonoClass *cast_class;
/* array dimension */
guint32 rank;
guint8 rank;
guint inited : 1;
/* We use init_pending to detect cyclic calls to mono_class_init */
@@ -224,15 +224,15 @@ struct _MonoClass {
const char *name;
const char *name_space;
guint interface_count;
guint interface_id; /* unique inderface id (for interfaces) */
guint max_interface_id;
gint *interface_offsets;
MonoClass **interfaces;
/* for fast subtype checks */
guint idepth;
MonoClass **supertypes;
guint16 idepth;
guint16 interface_count;
guint16 interface_id; /* unique inderface id (for interfaces) */
guint16 max_interface_id;
gint *interface_offsets;
MonoClass **interfaces;
/*
* Computed object instance size, total.
@@ -291,10 +291,11 @@ struct MonoVTable {
*/
void *gc_descr;
MonoDomain *domain; /* each object/vtable belongs to exactly one domain */
guint32 max_interface_id;
gpointer *interface_offsets;
gpointer data; /* to store static class data */
gpointer type; /* System.Type type for klass */
guint16 max_interface_id;
guint8 rank;
guint remote : 1; /* class is remotely activated */
guint initialized : 1; /* cctor has been run */
/* do not add any fields after vtable, the structure is dynamically extended */
View
@@ -919,6 +919,7 @@ mono_get_unique_iid (MonoClass *class)
mono_loader_unlock ();
g_assert (iid <= 65535);
return iid - 1;
}
View
@@ -6576,11 +6576,11 @@ mono_marshal_get_stelemref ()
/* if (vklass->idepth < aklass->idepth) goto failue */
mono_mb_emit_ldloc (mb, vklass);
mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_ldloc (mb, aklass);
mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_byte (mb, CEE_LDIND_U2);
b2 = mono_mb_emit_branch (mb, CEE_BLT_UN);
@@ -6591,7 +6591,7 @@ mono_marshal_get_stelemref ()
mono_mb_emit_ldloc (mb, aklass);
mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_icon (mb, 1);
mono_mb_emit_byte (mb, CEE_SUB);
mono_mb_emit_icon (mb, sizeof (void*));
View
@@ -635,6 +635,7 @@ mono_class_vtable (MonoDomain *domain, MonoClass *class)
vt = mono_mempool_alloc0 (domain->mp, vtable_size);
vt->klass = class;
vt->rank = class->rank;
vt->domain = domain;
#if CREATION_SPEEDUP

0 comments on commit 4e68cba

Please sign in to comment.