Author: martin
Date: 2005-03-22 16:04:37 -0500 (Tue, 22 Mar 2005)
New Revision: 42127
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/attribute.cs
trunk/mcs/gmcs/typemanager.cs
Log:
2005-03-22 Martin Baulig <[EMAIL PROTECTED]>
* typemanager.cs (TypeManager.GetField): Add support for generic
instances.
* attribute.cs, typemanager.cs: Removed the `#if NET_2_0'
conditionals.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-03-22 20:55:22 UTC (rev 42126)
+++ trunk/mcs/gmcs/ChangeLog 2005-03-22 21:04:37 UTC (rev 42127)
@@ -1,5 +1,13 @@
2005-03-22 Martin Baulig <[EMAIL PROTECTED]>
+ * typemanager.cs (TypeManager.GetField): Add support for generic
+ instances.
+
+ * attribute.cs, typemanager.cs: Removed the `#if NET_2_0'
+ conditionals.
+
+2005-03-22 Martin Baulig <[EMAIL PROTECTED]>
+
* decl.cs (MemberCache.DeepCopy): Manually copy the entries and
clear the `BindingFlags.DeclaredOnly'.
(MemberCache.AddMethods): Add `BindingFlags.DeclaredOnly'.
Modified: trunk/mcs/gmcs/attribute.cs
===================================================================
--- trunk/mcs/gmcs/attribute.cs 2005-03-22 20:55:22 UTC (rev 42126)
+++ trunk/mcs/gmcs/attribute.cs 2005-03-22 21:04:37 UTC (rev 42127)
@@ -1496,7 +1496,6 @@
return fb as IFixedBuffer;
}
-#if NET_2_0
object o = fixed_buffer_cache [fi];
if (o == null) {
if (System.Attribute.GetCustomAttribute (fi,
TypeManager.fixed_buffer_attr_type) == null) {
@@ -1513,9 +1512,6 @@
return null;
return (IFixedBuffer)o;
-#else
- return null;
-#endif
}
public static void VerifyModulesClsCompliance ()
Modified: trunk/mcs/gmcs/typemanager.cs
===================================================================
--- trunk/mcs/gmcs/typemanager.cs 2005-03-22 20:55:22 UTC (rev 42126)
+++ trunk/mcs/gmcs/typemanager.cs 2005-03-22 21:04:37 UTC (rev 42127)
@@ -102,10 +102,8 @@
///
/// .NET 2.0
///
-#if NET_2_0
static internal Type compiler_generated_attr_type;
static internal Type fixed_buffer_attr_type;
-#endif
//
// An empty array of types
@@ -199,10 +197,8 @@
///
/// A new in C# 2.0
///
-#if NET_2_0
static internal CustomAttributeBuilder compiler_generated_attr;
static internal ConstructorInfo fixed_buffer_attr_ctor;
-#endif
// <remarks>
// Holds the Array of Assemblies that have been loaded
@@ -1182,10 +1178,8 @@
//
// .NET 2.0
//
-#if NET_2_0
compiler_generated_attr_type = CoreLookupType
("System.Runtime.CompilerServices.CompilerGeneratedAttribute");
fixed_buffer_attr_type = CoreLookupType
("System.Runtime.CompilerServices.FixedBufferAttribute");
-#endif
//
// When compiling corlib, store the "real" types here.
//
@@ -1412,13 +1406,11 @@
//
// .NET 2.0 types
//
-#if NET_2_0
compiler_generated_attr = new CustomAttributeBuilder (
GetConstructor (compiler_generated_attr_type,
void_arg), new object[0]);
Type[] type_int_arg = { type_type, int32_type };
fixed_buffer_attr_ctor = GetConstructor
(fixed_buffer_attr_type, type_int_arg);
-#endif
// Object
object_ctor = GetConstructor (object_type, void_arg);
@@ -2003,6 +1995,9 @@
//
static public FieldBase GetField (FieldInfo fb)
{
+ if (fb.DeclaringType.IsGenericInstance)
+ fb = fb.Mono_GetGenericFieldDefinition ();
+
return (FieldBase) fieldbuilders_to_fields [fb];
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches