Author: raja
Date: 2005-05-03 09:38:47 -0400 (Tue, 03 May 2005)
New Revision: 43923
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/pending.cs
Log:
* pending.cs (BaseImplements): Move the #74773 fix here. This is
more conservative.
(VerifyPendingMethods): Revert change below.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2005-05-03 13:30:01 UTC (rev 43922)
+++ trunk/mcs/mcs/ChangeLog 2005-05-03 13:38:47 UTC (rev 43923)
@@ -1,5 +1,9 @@
2005-05-03 Raja R Harinath <[EMAIL PROTECTED]>
+ * pending.cs (BaseImplements): Move the #74773 fix here. This is
+ more conservative.
+ (VerifyPendingMethods): Revert change below.
+
* typemanager.cs (IsOverride, RegisterNonOverride): New.
* decl.cs (MemberCache.AddMethod): Register "non-override" methods
that used to trigger warning -28. Remove warning -28.
Modified: trunk/mcs/mcs/pending.cs
===================================================================
--- trunk/mcs/mcs/pending.cs 2005-05-03 13:30:01 UTC (rev 43922)
+++ trunk/mcs/mcs/pending.cs 2005-05-03 13:38:47 UTC (rev 43923)
@@ -525,15 +525,16 @@
if (list.Count == 0)
return false;
- MethodInfo base_method = (MethodInfo) list [0];
+ if (TypeManager.ImplementsInterface
(container.TypeBuilder.BaseType, iface_type))
+ return true;
//
- // FIXME: We shouldn't be creating proxies
unconditionally.
- // The runtime can handle most cases.
+ // FIXME: We should be creating fewer proxies. The
runtime can handle most cases.
+ // At worst, if we can't avoid creating the
proxy, we may need to make the
+ // proxy use Callvirt.
//
- // At worst, if we can't avoid creating the
proxy, we
- // may need to make the proxy use Callvirt.
- //
+ MethodInfo base_method = (MethodInfo) list [0];
+
if (!base_method.IsAbstract)
DefineProxy (iface_type, base_method, mi, args);
return true;
@@ -553,10 +554,6 @@
Type type = pending_implementations [i].type;
int j = 0;
- bool base_implements_type = type.IsInterface &&
- container.TypeBuilder.BaseType != null
&&
- TypeManager.ImplementsInterface
(container.TypeBuilder.BaseType, type);
-
foreach (MethodInfo mi in
pending_implementations [i].methods){
if (mi == null)
continue;
@@ -571,7 +568,7 @@
continue;
}
- if (base_implements_type ||
BaseImplements (type, mi))
+ if (BaseImplements (type, mi))
continue;
if (pending_implementations
[i].optional)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches