2009-08-12 Marek Safar <marek.safar@gmail.com>
authorMarek Safar <marek.safar@gmail.com>
Wed, 12 Aug 2009 14:26:36 +0000 (14:26 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 12 Aug 2009 14:26:36 +0000 (14:26 -0000)
* typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
class.cs: Removed unused parameters and methods.

svn path=/trunk/mcs/; revision=139767

mcs/mcs/ChangeLog
mcs/mcs/class.cs
mcs/mcs/decl.cs
mcs/mcs/ecore.cs
mcs/mcs/expression.cs
mcs/mcs/namespace.cs
mcs/mcs/typemanager.cs

index 77e0458626603088e554b6b6c3cb9fd0c1d0cb9a..54c4e99c1996c674cb1b6b82f824d5660c3b08c9 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-12  Marek Safar  <marek.safar@gmail.com>
+
+       * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
+       class.cs: Removed unused parameters and methods.
+
 2009-08-11  Marek Safar  <marek.safar@gmail.com>
 
        * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
index bcae3c9ea550a8c9782dee192d8285e52350c886..bcda744557d545600722df8874ec915b3db72a1b 100644 (file)
@@ -733,33 +733,6 @@ namespace Mono.CSharp {
                        }
                }
 
-               //
-               // Emits the instance field initializers
-               //
-               public bool EmitFieldInitializers (EmitContext ec)
-               {
-                       if (partial_parts != null) {
-                               foreach (TypeContainer part in partial_parts)
-                                       part.EmitFieldInitializers (ec);
-                       }
-
-                       ArrayList fields;
-                       
-                       if (ec.IsStatic){
-                               fields = initialized_static_fields;
-                       } else {
-                               fields = initialized_fields;
-                       }
-
-                       if (fields == null)
-                               return true;
-
-                       foreach (FieldInitializer f in fields) {
-                               f.EmitStatement (ec);
-                       }
-                       return true;
-               }
-               
                public override string DocComment {
                        get {
                                return comment;
index dcfea8878bb40654fc0fe038383c4d853ff821c5..227312834dde875eca428e33837c916d93a3532c 100644 (file)
@@ -1214,7 +1214,7 @@ namespace Mono.CSharp {
                        else if (Parent != null)
                                e = Parent.LookupNamespaceOrType (name, loc, ignore_cs0104);
                        else
-                               e = NamespaceEntry.LookupNamespaceOrType (this, name, loc, ignore_cs0104);
+                               e = NamespaceEntry.LookupNamespaceOrType (name, loc, ignore_cs0104);
 
                        if (errors == Report.Errors)
                                Cache [name] = e;
index 05bca73325040065f303865fa3822936dde4a5db..b23c4816324aa7dec72326fd5c87330b142696e1 100644 (file)
@@ -2968,7 +2968,7 @@ namespace Mono.CSharp {
                        //
                        if (type == null) {
                                Namespace ns = GlobalRootNamespace.Instance.GetNamespace (ns_name, false);
-                               FullNamedExpression fne = ns.Lookup (null, name, loc);
+                               FullNamedExpression fne = ns.Lookup (name, loc);
                                if (fne != null)
                                        type = fne.Type;
                        }
index 6748eb42b5dfb2047f0cef9e29091801e8ec373b..1053b861968792ae8bcbbc86a12f5969098b004d 100644 (file)
@@ -1789,7 +1789,7 @@ namespace Mono.CSharp {
                                //
                                // Start a new concat expression using converted expression
                                //
-                               return new StringConcat (ec, b.loc, b.left, b.right).Resolve (ec);
+                               return new StringConcat (b.loc, b.left, b.right).Resolve (ec);
                        }
                }
 
@@ -3687,15 +3687,15 @@ namespace Mono.CSharp {
        public class StringConcat : Expression {
                Arguments arguments;
                
-               public StringConcat (EmitContext ec, Location loc, Expression left, Expression right)
+               public StringConcat (Location loc, Expression left, Expression right)
                {
                        this.loc = loc;
                        type = TypeManager.string_type;
                        eclass = ExprClass.Value;
 
                        arguments = new Arguments (2);
-                       Append (ec, left);
-                       Append (ec, right);
+                       Append (left);
+                       Append (right);
                }
 
                public override Expression CreateExpressionTree (EmitContext ec)
@@ -3741,7 +3741,7 @@ namespace Mono.CSharp {
                        return this;
                }
                
-               public void Append (EmitContext ec, Expression operand)
+               public void Append (Expression operand)
                {
                        //
                        // Constant folding
@@ -7326,10 +7326,10 @@ namespace Mono.CSharp {
 
                        Namespace ns = expr_resolved as Namespace;
                        if (ns != null) {
-                               FullNamedExpression retval = ns.Lookup (ec.DeclContainer, LookupIdentifier, loc);
+                               FullNamedExpression retval = ns.Lookup (LookupIdentifier, loc);
 
                                if (retval == null)
-                                       ns.Error_NamespaceDoesNotExist (ec.DeclContainer, loc, LookupIdentifier);
+                                       ns.Error_NamespaceDoesNotExist (loc, LookupIdentifier);
                                else if (targs != null)
                                        retval = new GenericTypeExpr (retval.Type, targs, loc).ResolveAsTypeStep (ec, false);
 
@@ -7486,10 +7486,10 @@ namespace Mono.CSharp {
 
                        Namespace ns = expr_resolved as Namespace;
                        if (ns != null) {
-                               FullNamedExpression retval = ns.Lookup (rc.DeclContainer, LookupIdentifier, loc);
+                               FullNamedExpression retval = ns.Lookup (LookupIdentifier, loc);
 
                                if (retval == null && !silent)
-                                       ns.Error_NamespaceDoesNotExist (rc.DeclContainer, loc, LookupIdentifier);
+                                       ns.Error_NamespaceDoesNotExist (loc, LookupIdentifier);
                                else if (targs != null)
                                        retval = new GenericTypeExpr (retval.Type, targs, loc).ResolveAsTypeStep (rc, silent);
 
index 2cfbea142b6490861577c7834a849f9f0ac310ba..01979f61b3e7d97d097373888c962117f1fabe80 100644 (file)
@@ -295,7 +295,7 @@ namespace Mono.CSharp {
                        retval.AddAssemblyReference (assembly);
                }
 
-               public override void Error_NamespaceDoesNotExist(DeclSpace ds, Location loc, string name)
+               public override void Error_NamespaceDoesNotExist(Location loc, string name)
                {
                        Report.Error (400, loc, "The type or namespace name `{0}' could not be found in the global namespace (are you missing an assembly reference?)",
                                name);
@@ -406,10 +406,10 @@ namespace Mono.CSharp {
                        return this;
                }
 
-               public virtual void Error_NamespaceDoesNotExist (DeclSpace ds, Location loc, string name)
+               public virtual void Error_NamespaceDoesNotExist (Location loc, string name)
                {
                        if (name.IndexOf ('`') > 0) {
-                               FullNamedExpression retval = Lookup (ds, SimpleName.RemoveGenericArity (name), loc);
+                               FullNamedExpression retval = Lookup (SimpleName.RemoveGenericArity (name), loc);
                                if (retval != null) {
                                        Error_TypeArgumentsCannotBeUsed (retval, loc);
                                        return;
@@ -553,7 +553,7 @@ namespace Mono.CSharp {
                        return null;
                }
 
-               public FullNamedExpression Lookup (DeclSpace ds, string name, Location loc)
+               public FullNamedExpression Lookup (string name, Location loc)
                {
                        if (namespaces.Contains (name))
                                return (Namespace) namespaces [name];
@@ -1084,12 +1084,12 @@ namespace Mono.CSharp {
                        return parent.LookupExtensionMethod (extensionType, currentClass, name, loc);
                }
 
-               public FullNamedExpression LookupNamespaceOrType (DeclSpace ds, string name, Location loc, bool ignore_cs0104)
+               public FullNamedExpression LookupNamespaceOrType (string name, Location loc, bool ignore_cs0104)
                {
                        // Precondition: Only simple names (no dots) will be looked up with this function.
                        FullNamedExpression resolved = null;
                        for (NamespaceEntry curr_ns = this; curr_ns != null; curr_ns = curr_ns.ImplicitParent) {
-                               if ((resolved = curr_ns.Lookup (ds, name, loc, ignore_cs0104)) != null)
+                               if ((resolved = curr_ns.Lookup (name, loc, ignore_cs0104)) != null)
                                        break;
                        }
                        return resolved;
@@ -1140,12 +1140,12 @@ namespace Mono.CSharp {
                        return null;
                }
 
-               private FullNamedExpression Lookup (DeclSpace ds, string name, Location loc, bool ignore_cs0104)
+               private FullNamedExpression Lookup (string name, Location loc, bool ignore_cs0104)
                {
                        //
                        // Check whether it's in the namespace.
                        //
-                       FullNamedExpression fne = ns.Lookup (ds, name, loc);
+                       FullNamedExpression fne = ns.Lookup (name, loc);
 
                        //
                        // Check aliases. 
@@ -1182,7 +1182,7 @@ namespace Mono.CSharp {
                        //
                        FullNamedExpression match = null;
                        foreach (Namespace using_ns in GetUsingTable ()) {
-                               match = using_ns.Lookup (ds, name, loc);
+                               match = using_ns.Lookup (name, loc);
                                if (match == null || !(match is TypeExpr))
                                        continue;
                                if (fne != null) {
index 47dec4b23bcfea2fe30c674e03caa52fa9368549..249fdfdb8775b016a699597079336026f5887c74 100644 (file)
@@ -787,7 +787,7 @@ namespace Mono.CSharp {
        public static Type CoreLookupType (string ns_name, string name, Kind type_kind, bool required)
        {
                Namespace ns = GlobalRootNamespace.Instance.GetNamespace (ns_name, true);
-               Expression expr = ns.Lookup (RootContext.ToplevelTypes, name, Location.Null);
+               Expression expr = ns.Lookup (name, Location.Null);
 
                if (expr == null) {
                        if (required) {