From c20187f291f7ab63b0039cc6ea1d0aec666357bc Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 5 Oct 2005 15:38:33 +0000 Subject: Revert patch as it introduced a regression while building: ** ERROR **: file metadata.c: line 915 (mono_metadata_decode_row): assertion failed: (res_size == count) svn path=/branches/mono-1-1-9/mono/; revision=51278 --- mono/metadata/ChangeLog | 6 ------ mono/metadata/class.c | 16 +--------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 5d71bf8c793..94b3be28f37 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,9 +1,3 @@ -2005-10-05 Zoltan Varga - - * class.c (mono_class_layout_fields): Fix computation of - klass->has_references if a field has a struct type whose has_references - field is not yet initialized. Fixes #76331. - 2005-09-20 Gonzalo Paniagua Javier * socket-io.c: the field names were changed 3 months ago and no one diff --git a/mono/metadata/class.c b/mono/metadata/class.c index fdb64c82418..f8fb5f366d8 100644 --- a/mono/metadata/class.c +++ b/mono/metadata/class.c @@ -790,20 +790,6 @@ mono_class_setup_fields (MonoClass *class) mono_class_layout_fields (class); } -/* - * mono_class_has_references: - * - * Returns whenever @klass->has_references is set, initializing it if needed. - * Assumes the loader lock is held. - */ -static gboolean -mono_class_has_references (MonoClass *klass) -{ - mono_class_setup_fields (klass); - - return klass->has_references; -} - /* useful until we keep track of gc-references in corlib etc. */ #define IS_GC_REFERENCE(t) ((t)->type == MONO_TYPE_U || (t)->type == MONO_TYPE_I || (t)->type == MONO_TYPE_PTR) @@ -846,7 +832,7 @@ mono_class_layout_fields (MonoClass *class) field = &class->fields [i]; ftype = mono_type_get_underlying_type (field->type); - if (MONO_TYPE_IS_REFERENCE (ftype) || IS_GC_REFERENCE (ftype) || ((MONO_TYPE_ISSTRUCT (ftype) && mono_class_has_references (mono_class_from_mono_type (ftype))))) { + if (MONO_TYPE_IS_REFERENCE (ftype) || IS_GC_REFERENCE (ftype) || ((MONO_TYPE_ISSTRUCT (ftype) && mono_class_from_mono_type (ftype)->has_references))) { if (field->type->attrs & FIELD_ATTRIBUTE_STATIC) class->has_static_refs = TRUE; else -- cgit v1.2.3