Author: marek
Date: 2006-03-20 16:53:54 -0500 (Mon, 20 Mar 2006)
New Revision: 58206
Modified:
trunk/mcs/gmcs/class.cs
trunk/mcs/gmcs/decl.cs
trunk/mcs/gmcs/typemanager.cs
Log:
manually synchronized with 56802
Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs 2006-03-20 21:10:21 UTC (rev 58205)
+++ trunk/mcs/gmcs/class.cs 2006-03-20 21:53:54 UTC (rev 58206)
@@ -1302,9 +1302,7 @@
if (base_type != null) {
- // FIXME: I think this should be ...ResolveType
(Parent.EmitContext).
- // However, if Parent ==
RootContext.Tree.Types, its NamespaceEntry will be null.
- FullNamedExpression fne =
base_type.ResolveAsTypeStep (TypeResolveEmitContext, false);
+ FullNamedExpression fne =
base_type.ResolveAsTypeStep (this, false);
if ((fne == null) || (fne.Type == null)) {
error = true;
return null;
@@ -1338,10 +1336,7 @@
// add interfaces that were not added at type creation
if (iface_exprs != null) {
- // FIXME: I think this should be
...ExpandInterfaces (Parent.EmitContext, ...).
- // However, if Parent ==
RootContext.Tree.Types, its NamespaceEntry will be null.
- TypeResolveEmitContext.ContainerType =
TypeBuilder;
- ifaces = TypeManager.ExpandInterfaces
(TypeResolveEmitContext, iface_exprs);
+ ifaces = TypeManager.ExpandInterfaces (this,
iface_exprs);
if (ifaces == null) {
error = true;
return null;
@@ -1374,7 +1369,7 @@
public bool ResolveType ()
{
if ((base_type != null) &&
- (base_type.ResolveType (TypeResolveEmitContext) ==
null)) {
+ (base_type.ResolveType (this) == null)) {
error = true;
return false;
}
Modified: trunk/mcs/gmcs/decl.cs
===================================================================
--- trunk/mcs/gmcs/decl.cs 2006-03-20 21:10:21 UTC (rev 58205)
+++ trunk/mcs/gmcs/decl.cs 2006-03-20 21:53:54 UTC (rev 58206)
@@ -847,32 +847,13 @@
return Name;
}
- EmitContext type_resolve_ec;
- protected EmitContext TypeResolveEmitContext {
- get {
- if (type_resolve_ec == null) {
- // FIXME: I think this should really be
one of:
- //
- // a. type_resolve_ec =
Parent.EmitContext;
- // b. type_resolve_ec = new EmitContext
(Parent, Parent, loc, null, null, ModFlags, false);
- //
- // However, if Parent ==
RootContext.Tree.Types, its NamespaceEntry will be null.
- //
- type_resolve_ec = new EmitContext
(this, Parent, this, Location.Null, null, null, ModFlags, false);
- }
- return type_resolve_ec;
- }
- }
-
// <summary>
// Resolves the expression `e' for a type, and will
recursively define
// types. This should only be used for resolving base types.
// </summary>
protected TypeExpr ResolveBaseTypeExpr (Expression e)
{
- if (this is GenericMethod)
- TypeResolveEmitContext.ContainerType =
Parent.TypeBuilder;
- return e.ResolveAsTypeTerminal (TypeResolveEmitContext,
false);
+ return e.ResolveAsTypeTerminal (this, false);
}
public bool CheckAccessLevel (Type check_type)
Modified: trunk/mcs/gmcs/typemanager.cs
===================================================================
--- trunk/mcs/gmcs/typemanager.cs 2006-03-20 21:10:21 UTC (rev 58205)
+++ trunk/mcs/gmcs/typemanager.cs 2006-03-20 21:53:54 UTC (rev 58206)
@@ -2015,7 +2015,7 @@
/// This expands in context like: IA; IB : IA; IC : IA, IB; the
interface "IC" to
/// be IA, IB, IC.
/// </remarks>
- public static Type[] ExpandInterfaces (EmitContext ec, TypeExpr []
base_interfaces)
+ public static Type[] ExpandInterfaces (IResolveContext ec, TypeExpr []
base_interfaces)
{
ArrayList new_ifaces = new ArrayList ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches