Author: martin
Date: 2006-11-16 12:00:55 -0500 (Thu, 16 Nov 2006)
New Revision: 68011
Modified:
branches/martin/anonymous-methods2/mcs/ChangeLog
branches/martin/anonymous-methods2/mcs/anonymous.cs
branches/martin/anonymous-methods2/mcs/iterators.cs
branches/martin/anonymous-methods2/mcs/statement.cs
Log:
2006-11-16 Martin Baulig <[EMAIL PROTECTED]>
* anonymous.cs: Rename `AnonymousMethodHost' -> `RootScopeInfo'.
Modified: branches/martin/anonymous-methods2/mcs/ChangeLog
===================================================================
--- branches/martin/anonymous-methods2/mcs/ChangeLog 2006-11-16 16:57:22 UTC
(rev 68010)
+++ branches/martin/anonymous-methods2/mcs/ChangeLog 2006-11-16 17:00:55 UTC
(rev 68011)
@@ -1,5 +1,9 @@
2006-11-16 Martin Baulig <[EMAIL PROTECTED]>
+ * anonymous.cs: Rename `AnonymousMethodHost' -> `RootScopeInfo'.
+
+2006-11-16 Martin Baulig <[EMAIL PROTECTED]>
+
* anonymous.cs (IAnonymousMethodHost): New public interface; use
this outside anonymous.cs instead of accessing AnonymousMethodHost
directly.
Modified: branches/martin/anonymous-methods2/mcs/anonymous.cs
===================================================================
--- branches/martin/anonymous-methods2/mcs/anonymous.cs 2006-11-16 16:57:22 UTC
(rev 68010)
+++ branches/martin/anonymous-methods2/mcs/anonymous.cs 2006-11-16 17:00:55 UTC
(rev 68011)
@@ -160,16 +160,16 @@
public class ScopeInfo : CompilerGeneratedClass
{
- protected readonly AnonymousMethodHost RootScope;
+ protected readonly RootScopeInfo RootScope;
public readonly int ID = ++next_id;
public Block ScopeBlock;
static int next_id;
public ScopeInfo (IAnonymousMethodHost root, Block block)
- : base ((AnonymousMethodHost) root, null, 0,
block.StartLocation)
+ : base ((RootScopeInfo) root, null, 0,
block.StartLocation)
{
- this.RootScope = (AnonymousMethodHost) root;
+ this.RootScope = (RootScopeInfo) root;
ScopeBlock = block;
Report.Debug (64, "NEW SCOPE", this, root, block);
@@ -181,7 +181,7 @@
GenericMethod generic, Location loc)
: base (parent, generic, 0, loc)
{
- RootScope = (AnonymousMethodHost) this;
+ RootScope = (RootScopeInfo) this;
ScopeBlock = toplevel;
Report.Debug (64, "NEW ROOT SCOPE", this);
@@ -251,7 +251,7 @@
public static void EmitScopeInstance (EmitContext ec, ScopeInfo
scope,
ToplevelBlock toplevel)
{
- AnonymousMethodHost root_scope = (AnonymousMethodHost)
toplevel.AnonymousMethodHost;
+ RootScopeInfo root_scope = (RootScopeInfo)
toplevel.AnonymousMethodHost;
root_scope.EmitScopeInstance (ec);
while (root_scope != scope.RootScope) {
@@ -270,7 +270,7 @@
public static bool CompleteContexts (IAnonymousMethodHost amh,
Block container)
{
- AnonymousMethodHost host = (AnonymousMethodHost) amh;
+ RootScopeInfo host = (RootScopeInfo) amh;
if (host != null)
host.LinkScopes ();
@@ -416,7 +416,7 @@
}
protected class CapturedThis : CapturedVariable {
- public CapturedThis (AnonymousMethodHost host)
+ public CapturedThis (RootScopeInfo host)
: base (host, "<>THIS", host.ParentType)
{ }
}
@@ -612,10 +612,10 @@
void EmitScopeInstance (EmitContext ec);
}
- public class AnonymousMethodHost : ScopeInfo, IAnonymousMethodHost
+ public class RootScopeInfo : ScopeInfo, IAnonymousMethodHost
{
- public AnonymousMethodHost (ToplevelBlock toplevel,
TypeContainer parent,
- GenericMethod generic, Location loc)
+ public RootScopeInfo (ToplevelBlock toplevel, TypeContainer
parent,
+ GenericMethod generic, Location loc)
: base (toplevel, parent, generic, loc)
{
scopes = new ArrayList ();
@@ -631,8 +631,8 @@
get { return false; }
}
- public AnonymousMethodHost ParentHost {
- get { return Parent as AnonymousMethodHost; }
+ public RootScopeInfo ParentHost {
+ get { return Parent as RootScopeInfo; }
}
public Type ParentType {
@@ -717,7 +717,7 @@
protected override ScopeInitializer CreateScopeInitializer ()
{
- return new AnonymousMethodHostInitializer (this);
+ return new RootScopeInitializer (this);
}
protected override bool DefineNestedTypes ()
@@ -808,9 +808,9 @@
protected class TheCtor : Statement
{
- AnonymousMethodHost host;
+ RootScopeInfo host;
- public TheCtor (AnonymousMethodHost host)
+ public TheCtor (RootScopeInfo host)
{
this.host = host;
}
@@ -826,17 +826,17 @@
}
}
- protected class AnonymousMethodHostInitializer :
ScopeInitializer
+ protected class RootScopeInitializer : ScopeInitializer
{
- AnonymousMethodHost host;
+ RootScopeInfo host;
- public AnonymousMethodHostInitializer
(AnonymousMethodHost host)
+ public RootScopeInitializer (RootScopeInfo host)
: base (host)
{
this.host = host;
}
- public AnonymousMethodHost Host {
+ public RootScopeInfo Host {
get { return host; }
}
@@ -910,7 +910,7 @@
get;
}
- AnonymousMethodHost RootScope {
+ RootScopeInfo RootScope {
get;
}
@@ -956,7 +956,7 @@
get { return anonymous; }
}
- public AnonymousMethodHost RootScope {
+ public RootScopeInfo RootScope {
get { return root_scope; }
}
@@ -980,7 +980,7 @@
}
ArrayList children;
- AnonymousMethodHost root_scope;
+ RootScopeInfo root_scope;
static int next_index;
@@ -1253,7 +1253,7 @@
get { return method; }
}
- public abstract AnonymousMethodHost RootScope {
+ public abstract RootScopeInfo RootScope {
get;
}
@@ -1360,9 +1360,9 @@
// more than once, due to the way Convert.ImplicitConversion
works
//
Expression anonymous_delegate;
- AnonymousMethodHost root_scope;
+ RootScopeInfo root_scope;
- public AnonymousMethod (AnonymousMethod parent,
AnonymousMethodHost root_scope,
+ public AnonymousMethod (AnonymousMethod parent, RootScopeInfo
root_scope,
TypeContainer host, GenericMethod
generic,
Parameters parameters, Block container,
ToplevelBlock block, Type return_type,
Type delegate_type,
@@ -1374,7 +1374,7 @@
this.root_scope = root_scope;
}
- public override AnonymousMethodHost RootScope {
+ public override RootScopeInfo RootScope {
get { return root_scope; }
}
Modified: branches/martin/anonymous-methods2/mcs/iterators.cs
===================================================================
--- branches/martin/anonymous-methods2/mcs/iterators.cs 2006-11-16 16:57:22 UTC
(rev 68010)
+++ branches/martin/anonymous-methods2/mcs/iterators.cs 2006-11-16 17:00:55 UTC
(rev 68011)
@@ -124,7 +124,7 @@
}
}
- public class IteratorHost : AnonymousMethodHost
+ public class IteratorHost : RootScopeInfo
{
public readonly Iterator Iterator;
@@ -320,7 +320,7 @@
return new IteratorHostInitializer (this);
}
- protected class IteratorHostInitializer :
AnonymousMethodHostInitializer
+ protected class IteratorHostInitializer : RootScopeInitializer
{
new public readonly IteratorHost Host;
protected Iterator.State state;
@@ -781,7 +781,7 @@
get { return true; }
}
- public override AnonymousMethodHost RootScope {
+ public override RootScopeInfo RootScope {
get { return IteratorHost; }
}
Modified: branches/martin/anonymous-methods2/mcs/statement.cs
===================================================================
--- branches/martin/anonymous-methods2/mcs/statement.cs 2006-11-16 16:57:22 UTC
(rev 68010)
+++ branches/martin/anonymous-methods2/mcs/statement.cs 2006-11-16 17:00:55 UTC
(rev 68011)
@@ -2280,7 +2280,7 @@
ToplevelBlock child;
GenericMethod generic;
FlowBranchingToplevel top_level_branching;
- AnonymousMethodHost anonymous_method_host;
+ RootScopeInfo anonymous_method_host;
public bool HasVarargs {
get { return (flags & Flags.HasVarargs) != 0; }
@@ -2384,23 +2384,23 @@
return true;
}
- public AnonymousMethodHost CreateAnonymousMethodHost
(TypeContainer host)
+ public RootScopeInfo CreateAnonymousMethodHost (TypeContainer
host)
{
if (anonymous_method_host != null)
return anonymous_method_host;
if (Container != null)
- anonymous_method_host = new AnonymousMethodHost
(
+ anonymous_method_host = new RootScopeInfo (
this, Container.anonymous_method_host,
null, StartLocation);
else
- anonymous_method_host = new AnonymousMethodHost
(
+ anonymous_method_host = new RootScopeInfo (
this, host, generic, StartLocation);
ScopeInfo = anonymous_method_host;
return anonymous_method_host;
}
- public void CreateIteratorHost (AnonymousMethodHost root_scope)
+ public void CreateIteratorHost (RootScopeInfo root_scope)
{
Report.Debug (64, "CREATE ITERATOR HOST", this,
root_scope,
container, anonymous_method_host);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches