Author: marek
Date: 2006-03-20 14:15:27 -0500 (Mon, 20 Mar 2006)
New Revision: 58196
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/assign.cs
trunk/mcs/mcs/attribute.cs
trunk/mcs/mcs/class.cs
trunk/mcs/mcs/codegen.cs
trunk/mcs/mcs/constant.cs
trunk/mcs/mcs/cs-parser.jay
trunk/mcs/mcs/cs-tokenizer.cs
trunk/mcs/mcs/decl.cs
trunk/mcs/mcs/delegate.cs
trunk/mcs/mcs/doc.cs
trunk/mcs/mcs/driver.cs
trunk/mcs/mcs/enum.cs
trunk/mcs/mcs/expression.cs
trunk/mcs/mcs/flowanalysis.cs
trunk/mcs/mcs/iterators.cs
trunk/mcs/mcs/location.cs
trunk/mcs/mcs/namespace.cs
trunk/mcs/mcs/report.cs
trunk/mcs/mcs/statement.cs
trunk/mcs/mcs/typemanager.cs
Log:
2006-03-20 Marek Safar <[EMAIL PROTECTED]>
* assign.cs (CompoundAssign.ResolveSource): Removed.
* attribute.cs (ResolvePossibleAttributeType): Updated after
MemberAccess
clean up.
* class.cs (TypeContainer.FindMethods): Removed.
(TypeContainer.CheckMemberUsage): Made static.
* codegen.cs (GetAssemblyName): Uses Length for empty string test.
* constant.cs (CheckRange): Removed unused type argument.
(CheckUnsigned): Removed unused type argument.
* cs-parser.jay: Updated after MemberAccess clean up.
Uses Length for empty string test.
* cs-tokenizer.cs: Uses Length for empty string test.
(IsCastToken): Made static.
(is_hex): Made static.
(real_type_suffix): Made static.
* decl.cs (SetupCache): Made static.
(OnGenerateDocComment): Removed unused ds argument.
* delegate.cs (VerifyDelegate): Removed unused argument.
* doc.cs: Uses Length for empty string test.
* driver.cs: Uses Length for empty string test.
* enum.cs (IsValidEnumType): Made static
* expression.cs (EnumLiftUp): Removed unused argument.
(ResolveMethodGroup): Ditto.
(BetterConversion): Ditto.
(GetVarargsTypes): Ditto.
(UpdateIndices): Ditto.
(ValidateInitializers): Ditto.
(MemberAccess.ctor): Ditto.
(GetIndexersForType): Ditto.
* flowanalysis.cs: (MergeFinally): Removed unused argument.
* iterators.cs: Updated after MemberAccess clean up.
* location.cs: Uses Length for empty string test.
* namespace.cs: Uses Length for empty string test.
* report.cs (CheckWarningCode): Made static.
* statement.cs (LabeledStatement): Removed unused argument.
* typemanager.cs (FilterNone): Removed.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/ChangeLog 2006-03-20 19:15:27 UTC (rev 58196)
@@ -1,3 +1,60 @@
+2006-03-20 Marek Safar <[EMAIL PROTECTED]>
+
+ * assign.cs (CompoundAssign.ResolveSource): Removed.
+
+ * attribute.cs (ResolvePossibleAttributeType): Updated after
MemberAccess
+ clean up.
+
+ * class.cs (TypeContainer.FindMethods): Removed.
+ (TypeContainer.CheckMemberUsage): Made static.
+
+ * codegen.cs (GetAssemblyName): Uses Length for empty string test.
+
+ * constant.cs (CheckRange): Removed unused type argument.
+ (CheckUnsigned): Removed unused type argument.
+
+ * cs-parser.jay: Updated after MemberAccess clean up.
+ Uses Length for empty string test.
+
+ * cs-tokenizer.cs: Uses Length for empty string test.
+ (IsCastToken): Made static.
+ (is_hex): Made static.
+ (real_type_suffix): Made static.
+
+ * decl.cs (SetupCache): Made static.
+ (OnGenerateDocComment): Removed unused ds argument.
+
+ * delegate.cs (VerifyDelegate): Removed unused argument.
+
+ * doc.cs: Uses Length for empty string test.
+
+ * driver.cs: Uses Length for empty string test.
+
+ * enum.cs (IsValidEnumType): Made static
+
+ * expression.cs (EnumLiftUp): Removed unused argument.
+ (ResolveMethodGroup): Ditto.
+ (BetterConversion): Ditto.
+ (GetVarargsTypes): Ditto.
+ (UpdateIndices): Ditto.
+ (ValidateInitializers): Ditto.
+ (MemberAccess.ctor): Ditto.
+ (GetIndexersForType): Ditto.
+
+ * flowanalysis.cs: (MergeFinally): Removed unused argument.
+
+ * iterators.cs: Updated after MemberAccess clean up.
+
+ * location.cs: Uses Length for empty string test.
+
+ * namespace.cs: Uses Length for empty string test.
+
+ * report.cs (CheckWarningCode): Made static.
+
+ * statement.cs (LabeledStatement): Removed unused argument.
+
+ * typemanager.cs (FilterNone): Removed.
+
2006-03-18 Marek Safar <[EMAIL PROTECTED]>
* codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
Modified: trunk/mcs/mcs/assign.cs
===================================================================
--- trunk/mcs/mcs/assign.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/assign.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -606,11 +606,6 @@
return new CompoundAssign (this, loc);
}
- public Expression ResolveSource (EmitContext ec)
- {
- return original_source.Resolve (ec);
- }
-
public override Expression DoResolve (EmitContext ec)
{
original_source = original_source.Resolve (ec);
Modified: trunk/mcs/mcs/attribute.cs
===================================================================
--- trunk/mcs/mcs/attribute.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/attribute.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -178,7 +178,7 @@
if (LeftExpr == null) {
te = ResolveAsTypeTerminal (new SimpleName
(name, Location), rc, silent);
} else {
- te = ResolveAsTypeTerminal (new MemberAccess
(LeftExpr, name, Location), rc, silent);
+ te = ResolveAsTypeTerminal (new MemberAccess
(LeftExpr, name), rc, silent);
}
if (te == null)
@@ -926,7 +926,7 @@
ps.AddPermission (perm);
}
- object GetValue (object value)
+ static object GetValue (object value)
{
if (value is EnumConstant)
return ((EnumConstant) value).GetValue ();
Modified: trunk/mcs/mcs/class.cs
===================================================================
--- trunk/mcs/mcs/class.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/class.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -1930,16 +1930,6 @@
}
- //
- // FindMethods will look for methods not only in the type `t',
but in
- // any interfaces implemented by the type.
- //
- public static MethodInfo [] FindMethods (Type t, BindingFlags
bf,
- MemberFilter filter,
object criteria)
- {
- return null;
- }
-
/// <summary>
/// Emits the values for the constants
/// </summary>
@@ -1951,7 +1941,7 @@
return;
}
- void CheckMemberUsage (MemberCoreArrayList al, string
member_type)
+ static void CheckMemberUsage (MemberCoreArrayList al, string
member_type)
{
if (al == null)
return;
@@ -3350,9 +3340,9 @@
// FIXME: with a few effort, it could be done with XmlReader,
// that means removal of DOM use.
//
- internal override void OnGenerateDocComment (DeclSpace ds,
XmlElement el)
+ internal override void OnGenerateDocComment (XmlElement el)
{
- DocUtil.OnMethodGenerateDocComment (this, ds, el);
+ DocUtil.OnMethodGenerateDocComment (this, el);
}
//
@@ -3750,7 +3740,7 @@
if (ParameterInfo.Count > 0) {
ArrayList al =
(ArrayList)ParentContainer.MemberCache.Members [Name];
if (al.Count > 1)
-
ParentContainer.MemberCache.VerifyClsParameterConflict (al, this,
MethodBuilder);
+ MemberCache.VerifyClsParameterConflict
(al, this, MethodBuilder);
}
return true;
@@ -4255,7 +4245,7 @@
if (ParameterInfo.Count > 0) {
ArrayList al =
(ArrayList)Parent.MemberCache.Members [".ctor"];
if (al.Count > 3)
-
Parent.MemberCache.VerifyClsParameterConflict (al, this, ConstructorBuilder);
+ MemberCache.VerifyClsParameterConflict
(al, this, ConstructorBuilder);
if (Parent.TypeBuilder.IsSubclassOf
(TypeManager.attribute_type)) {
foreach (Type param in ParameterTypes) {
Modified: trunk/mcs/mcs/codegen.cs
===================================================================
--- trunk/mcs/mcs/codegen.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/codegen.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -1152,7 +1152,7 @@
}
else {
string value =
a.GetString ();
- if (value !=
String.Empty)
+ if
(value.Length != 0)
RootContext.StrongNameKeyFile = value;
}
break;
@@ -1166,7 +1166,7 @@
}
else {
string value =
a.GetString ();
- if (value !=
String.Empty)
+ if
(value.Length != 0)
RootContext.StrongNameKeyContainer = value;
}
break;
Modified: trunk/mcs/mcs/constant.cs
===================================================================
--- trunk/mcs/mcs/constant.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/constant.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -212,7 +212,7 @@
return retval;
}
- protected void CheckRange (EmitContext ec, ulong value, Type
type, ulong max)
+ protected static void CheckRange (EmitContext ec, ulong value,
ulong max)
{
if (!ec.ConstantCheckState)
return;
@@ -221,7 +221,7 @@
throw new OverflowException ();
}
- protected void CheckRange (EmitContext ec, double value, Type
type, long min, long max)
+ protected static void CheckRange (EmitContext ec, double value,
long min, long max)
{
if (!ec.ConstantCheckState)
return;
@@ -230,7 +230,7 @@
throw new OverflowException ();
}
- protected void CheckUnsigned (EmitContext ec, long value, Type
type)
+ protected static void CheckUnsigned (EmitContext ec, long value)
{
if (!ec.ConstantCheckState)
return;
@@ -470,7 +470,7 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type)
@@ -608,15 +608,15 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MinValue, Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MinValue,
Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type) {
- CheckRange (ec, Value, target_type,
Int16.MinValue, Int16.MaxValue);
+ CheckRange (ec, Value, Int16.MinValue,
Int16.MaxValue);
return new ShortConstant ((short) Value,
Location);
}
if (target_type == TypeManager.int32_type)
@@ -722,23 +722,23 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.short_type)
return new ShortConstant ((short) Value,
Location);
if (target_type == TypeManager.ushort_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new UShortConstant ((ushort) Value,
Location);
} if (target_type == TypeManager.int32_type)
return new IntConstant ((int) Value,
Location);
if (target_type == TypeManager.uint32_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new UIntConstant ((uint) Value,
Location);
} if (target_type == TypeManager.int64_type)
return new LongConstant ((long) Value,
Location);
if (target_type == TypeManager.uint64_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new ULongConstant ((ulong) Value,
Location);
}
if (target_type == TypeManager.float_type)
@@ -746,7 +746,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -837,27 +837,27 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MinValue, Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MinValue,
Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.ushort_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new UShortConstant ((ushort) Value,
Location);
}
if (target_type == TypeManager.int32_type)
return new IntConstant ((int) Value, Location);
if (target_type == TypeManager.uint32_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new UIntConstant ((uint) Value,
Location);
}
if (target_type == TypeManager.int64_type)
return new LongConstant ((long) Value,
Location);
if (target_type == TypeManager.uint64_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new ULongConstant ((ulong) Value,
Location);
}
if (target_type == TypeManager.float_type)
@@ -865,7 +865,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
Char.MinValue, Char.MaxValue);
+ CheckRange (ec, Value, Char.MinValue,
Char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -956,15 +956,15 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MinValue, Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MinValue,
Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type) {
- CheckRange (ec, Value, target_type,
Int16.MinValue, Int16.MaxValue);
+ CheckRange (ec, Value, Int16.MinValue,
Int16.MaxValue);
return new ShortConstant ((short) Value,
Location);
}
if (target_type == TypeManager.int32_type)
@@ -980,7 +980,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
Char.MinValue, Char.MaxValue);
+ CheckRange (ec, Value, Char.MinValue,
Char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -1133,29 +1133,29 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MinValue, Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MinValue,
Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type) {
- CheckRange (ec, Value, target_type,
Int16.MinValue, Int16.MaxValue);
+ CheckRange (ec, Value, Int16.MinValue,
Int16.MaxValue);
return new ShortConstant ((short) Value,
Location);
}
if (target_type == TypeManager.ushort_type) {
- CheckRange (ec, Value, target_type,
UInt16.MinValue, UInt16.MaxValue);
+ CheckRange (ec, Value, UInt16.MinValue,
UInt16.MaxValue);
return new UShortConstant ((ushort) Value,
Location);
}
if (target_type == TypeManager.uint32_type) {
- CheckRange (ec, Value, target_type,
Int32.MinValue, Int32.MaxValue);
+ CheckRange (ec, Value, Int32.MinValue,
Int32.MaxValue);
return new UIntConstant ((uint) Value,
Location);
}
if (target_type == TypeManager.int64_type)
return new LongConstant ((long) Value,
Location);
if (target_type == TypeManager.uint64_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new ULongConstant ((ulong) Value,
Location);
}
if (target_type == TypeManager.float_type)
@@ -1163,7 +1163,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
Char.MinValue, Char.MaxValue);
+ CheckRange (ec, Value, Char.MinValue,
Char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -1253,23 +1253,23 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Char.MinValue, Char.MaxValue);
+ CheckRange (ec, Value, Char.MinValue,
Char.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type) {
- CheckRange (ec, Value, target_type,
Int16.MinValue, Int16.MaxValue);
+ CheckRange (ec, Value, Int16.MinValue,
Int16.MaxValue);
return new ShortConstant ((short) Value,
Location);
}
if (target_type == TypeManager.ushort_type) {
- CheckRange (ec, Value, target_type,
UInt16.MinValue, UInt16.MaxValue);
+ CheckRange (ec, Value, UInt16.MinValue,
UInt16.MaxValue);
return new UShortConstant ((ushort) Value,
Location);
}
if (target_type == TypeManager.int32_type) {
- CheckRange (ec, Value, target_type,
Int32.MinValue, Int32.MaxValue);
+ CheckRange (ec, Value, Int32.MinValue,
Int32.MaxValue);
return new IntConstant ((int) Value, Location);
}
if (target_type == TypeManager.int64_type)
@@ -1281,7 +1281,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
Char.MinValue, Char.MaxValue);
+ CheckRange (ec, Value, Char.MinValue,
Char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -1387,31 +1387,31 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MinValue, Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MinValue,
Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type) {
- CheckRange (ec, Value, target_type,
Int16.MinValue, Int16.MaxValue);
+ CheckRange (ec, Value, Int16.MinValue,
Int16.MaxValue);
return new ShortConstant ((short) Value,
Location);
}
if (target_type == TypeManager.ushort_type) {
- CheckRange (ec, Value, target_type,
UInt16.MinValue, UInt16.MaxValue);
+ CheckRange (ec, Value, UInt16.MinValue,
UInt16.MaxValue);
return new UShortConstant ((ushort) Value,
Location);
}
if (target_type == TypeManager.int32_type) {
- CheckRange (ec, Value, target_type,
Int32.MinValue, Int32.MaxValue);
+ CheckRange (ec, Value, Int32.MinValue,
Int32.MaxValue);
return new IntConstant ((int) Value, Location);
}
if (target_type == TypeManager.uint32_type) {
- CheckRange (ec, Value, target_type,
UInt32.MinValue, UInt32.MaxValue);
+ CheckRange (ec, Value, UInt32.MinValue,
UInt32.MaxValue);
return new UIntConstant ((uint) Value,
Location);
}
if (target_type == TypeManager.uint64_type) {
- CheckUnsigned (ec, Value, target_type);
+ CheckUnsigned (ec, Value);
return new ULongConstant ((ulong) Value,
Location);
}
if (target_type == TypeManager.float_type)
@@ -1419,7 +1419,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
Char.MinValue, Char.MaxValue);
+ CheckRange (ec, Value, Char.MinValue,
Char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -1512,31 +1512,31 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type, (ulong)
SByte.MaxValue);
+ CheckRange (ec, Value, (ulong) SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type) {
- CheckRange (ec, Value, target_type, (ulong)
Int16.MaxValue);
+ CheckRange (ec, Value, (ulong) Int16.MaxValue);
return new ShortConstant ((short) Value,
Location);
}
if (target_type == TypeManager.ushort_type) {
- CheckRange (ec, Value, target_type,
UInt16.MaxValue);
+ CheckRange (ec, Value, UInt16.MaxValue);
return new UShortConstant ((ushort) Value,
Location);
}
if (target_type == TypeManager.int32_type) {
- CheckRange (ec, Value, target_type,
Int32.MaxValue);
+ CheckRange (ec, Value, Int32.MaxValue);
return new IntConstant ((int) Value, Location);
}
if (target_type == TypeManager.uint32_type) {
- CheckRange (ec, Value, target_type,
UInt32.MaxValue);
+ CheckRange (ec, Value, UInt32.MaxValue);
return new UIntConstant ((uint) Value,
Location);
}
if (target_type == TypeManager.int64_type) {
- CheckRange (ec, Value, target_type, (ulong)
Int64.MaxValue);
+ CheckRange (ec, Value, (ulong) Int64.MaxValue);
return new LongConstant ((long) Value,
Location);
}
if (target_type == TypeManager.float_type)
@@ -1544,7 +1544,7 @@
if (target_type == TypeManager.double_type)
return new DoubleConstant ((double) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
Char.MaxValue);
+ CheckRange (ec, Value, Char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
@@ -1729,11 +1729,11 @@
public override Constant Reduce (EmitContext ec, Type
target_type)
{
if (target_type == TypeManager.byte_type) {
- CheckRange (ec, Value, target_type,
Byte.MinValue, Byte.MaxValue);
+ CheckRange (ec, Value, Byte.MinValue,
Byte.MaxValue);
return new ByteConstant ((byte) Value,
Location);
}
if (target_type == TypeManager.sbyte_type) {
- CheckRange (ec, Value, target_type,
SByte.MinValue, SByte.MaxValue);
+ CheckRange (ec, Value, SByte.MinValue,
SByte.MaxValue);
return new SByteConstant ((sbyte) Value,
Location);
}
if (target_type == TypeManager.short_type)
@@ -1751,7 +1751,7 @@
if (target_type == TypeManager.float_type)
return new FloatConstant ((float) Value,
Location);
if (target_type == TypeManager.char_type) {
- CheckRange (ec, Value, target_type,
char.MinValue, char.MaxValue);
+ CheckRange (ec, Value, char.MinValue,
char.MaxValue);
return new CharConstant ((char) Value,
Location);
}
if (target_type == TypeManager.decimal_type)
Modified: trunk/mcs/mcs/cs-parser.jay
===================================================================
--- trunk/mcs/mcs/cs-parser.jay 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/cs-parser.jay 2006-03-20 19:15:27 UTC (rev 58196)
@@ -391,7 +391,7 @@
}
current_namespace = new NamespaceEntry (
- current_namespace, file, name.GetName (),
name.Location);
+ current_namespace, file, name.GetName ());
}
namespace_body opt_semicolon
{
@@ -2753,12 +2753,12 @@
: primary_expression DOT IDENTIFIER
{
LocatedToken lt = (LocatedToken) $3;
- $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location);
+ $$ = new MemberAccess ((Expression) $1, lt.Value);
}
| predefined_type DOT IDENTIFIER
{
LocatedToken lt = (LocatedToken) $3;
- $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location);
+ $$ = new MemberAccess ((Expression) $1, lt.Value);
}
;
@@ -3102,7 +3102,7 @@
LocatedToken lt = (LocatedToken) $3;
deref = new Unary (Unary.Operator.Indirection, (Expression) $1,
lt.Location);
- $$ = new MemberAccess (deref, lt.Value, lt.Location);
+ $$ = new MemberAccess (deref, lt.Value);
}
;
@@ -3689,7 +3689,7 @@
: IDENTIFIER COLON
{
LocatedToken lt = (LocatedToken) $1;
- LabeledStatement labeled = new LabeledStatement (lt.Value,
lt.Location);
+ LabeledStatement labeled = new LabeledStatement (lt.Location);
if (current_block.AddLabel (lt.Value, labeled, lt.Location))
current_block.AddStatement (labeled);
@@ -4679,8 +4679,8 @@
{
Namespace ns = current_namespace.NS;
- if (current_container.Name == ""){
- if (ns.Name != "")
+ if (current_container.Name.Length == 0){
+ if (ns.Name.Length != 0)
return new MemberName (ns.MemberName, class_name);
else
return class_name;
@@ -4844,7 +4844,7 @@
public CSharpParser (SeekableStreamReader reader, SourceFile file, ArrayList
defines)
{
- current_namespace = new NamespaceEntry (null, file, null,
Location.Null);
+ current_namespace = new NamespaceEntry (null, file, null);
this.name = file.Name;
this.file = file;
current_container = RootContext.Tree.Types;
@@ -4881,7 +4881,7 @@
RootContext.Tree.Types.NamespaceEntry = null;
}
-void CheckToken (int error, int yyToken, string msg, Location loc)
+static void CheckToken (int error, int yyToken, string msg, Location loc)
{
if (yyToken >= Token.FIRST_KEYWORD && yyToken <= Token.LAST_KEYWORD)
Report.Error (error, loc, "{0}: `{1}' is a keyword", msg,
yyNames [yyToken].ToLower ());
Modified: trunk/mcs/mcs/cs-tokenizer.cs
===================================================================
--- trunk/mcs/mcs/cs-tokenizer.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/cs-tokenizer.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -405,7 +405,7 @@
// FIXME: This could be `Location.Push' but we have to
// find out why the MS compiler allows this
//
- Mono.CSharp.Location.Push (file, 0);
+ Mono.CSharp.Location.Push (file);
}
static bool is_identifier_start_character (char c)
@@ -696,12 +696,12 @@
return seen_digits;
}
- bool is_hex (int e)
+ static bool is_hex (int e)
{
return (e >= '0' && e <= '9') || (e >= 'A' && e <= 'F')
|| (e >= 'a' && e <= 'f');
}
- int real_type_suffix (int c)
+ static int real_type_suffix (int c)
{
int t;
@@ -1160,7 +1160,7 @@
return val;
}
- bool IsCastToken (int token)
+ static bool IsCastToken (int token)
{
switch (token) {
case Token.BANG:
@@ -1270,13 +1270,13 @@
//
bool PreProcessLine (string arg)
{
- if (arg == "")
+ if (arg.Length == 0)
return false;
if (arg == "default"){
ref_line = line;
ref_name = file_name;
- Location.Push (ref_name, line);
+ Location.Push (ref_name);
return true;
} else if (arg == "hidden"){
//
@@ -1298,7 +1298,7 @@
ref_name = Location.LookupFile (name);
file_name.HasLineDirective = true;
ref_name.HasLineDirective = true;
- Location.Push (ref_name, ref_line);
+ Location.Push (ref_name);
} else {
ref_line = System.Int32.Parse (arg);
}
@@ -1314,7 +1314,7 @@
//
void PreProcessDefinition (bool is_define, string arg)
{
- if (arg == "" || arg == "true" || arg == "false"){
+ if (arg.Length == 0 || arg == "true" || arg == "false"){
Report.Error (1001, Location, "Missing
identifer to pre-processor directive");
return;
}
@@ -1642,7 +1642,7 @@
goto case "endif";
case "if":
- if (arg == ""){
+ if (arg.Length == 0){
Error_InvalidDirective ();
return true;
}
Modified: trunk/mcs/mcs/decl.cs
===================================================================
--- trunk/mcs/mcs/decl.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/decl.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -142,7 +142,7 @@
}
Expression lexpr = Left.GetTypeExpression ();
- return new MemberAccess (lexpr, Name, Location);
+ return new MemberAccess (lexpr, Name);
}
public MemberName Clone ()
@@ -494,7 +494,7 @@
// Raised (and passed an XmlElement that contains the comment)
// when GenerateDocComment is writing documentation expectedly.
//
- internal virtual void OnGenerateDocComment (DeclSpace ds,
XmlElement intermediateNode)
+ internal virtual void OnGenerateDocComment (XmlElement
intermediateNode)
{
}
@@ -1274,7 +1274,7 @@
/// <summary>
/// Bootstrap this member cache by doing a deep-copy of our
base.
/// </summary>
- Hashtable SetupCache (MemberCache base_class)
+ static Hashtable SetupCache (MemberCache base_class)
{
Hashtable hash = new Hashtable ();
@@ -1934,7 +1934,9 @@
/// <summary>
/// Cls compliance check whether methods or constructors
parameters differing only in ref or out, or in array rank
/// </summary>
- public void VerifyClsParameterConflict (ArrayList al,
MethodCore method, MemberInfo this_builder)
+ ///
+ // TODO: refactor as method is always 'this'
+ public static void VerifyClsParameterConflict (ArrayList al,
MethodCore method, MemberInfo this_builder)
{
EntryType tested_type = (method is Constructor ?
EntryType.Constructor : EntryType.Method) | EntryType.Public;
Modified: trunk/mcs/mcs/delegate.cs
===================================================================
--- trunk/mcs/mcs/delegate.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/delegate.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -437,7 +437,7 @@
/// Verifies whether the delegate in question is compatible
with this one in
/// order to determine if instantiation from the same is
possible.
/// </summary>
- public static bool VerifyDelegate (EmitContext ec, Type
delegate_type, Type probe_type, Location loc)
+ public static bool VerifyDelegate (EmitContext ec, Type
delegate_type, Location loc)
{
Expression ml = Expression.MemberLookup (
ec.ContainerType, delegate_type, "Invoke", loc);
@@ -754,7 +754,7 @@
Argument a = (Argument) Arguments [0];
- if (!a.ResolveMethodGroup (ec, loc))
+ if (!a.ResolveMethodGroup (ec))
return null;
Expression e = a.Expr;
@@ -766,9 +766,7 @@
if (mg != null)
return ResolveMethodGroupExpr (ec, mg);
- Type e_type = e.Type;
-
- if (!TypeManager.IsDelegateType (e_type)) {
+ if (!TypeManager.IsDelegateType (e.Type)) {
Report.Error (149, loc, "Method name expected");
return null;
}
@@ -784,8 +782,8 @@
// This is what MS' compiler reports. We could always
choose
// to be more verbose and actually give delegate-level
specifics
- if (!Delegate.VerifyDelegate (ec, type, e_type, loc)) {
- Report.Error (29, loc, "Cannot implicitly
convert type '" + e_type + "' " +
+ if (!Delegate.VerifyDelegate (ec, type, loc)) {
+ Report.Error (29, loc, "Cannot implicitly
convert type '" + e.Type + "' " +
"to type '" + type + "'");
return null;
}
Modified: trunk/mcs/mcs/doc.cs
===================================================================
--- trunk/mcs/mcs/doc.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/doc.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -149,7 +149,7 @@
XmlElement el = n as XmlElement;
if (el != null) {
- mc.OnGenerateDocComment (ds, el);
+ mc.OnGenerateDocComment (el);
// FIXME: it could be done with
XmlReader
XmlNodeList nl = n.SelectNodes
(".//include");
@@ -200,7 +200,7 @@
el.ParentNode.InsertBefore
(el.OwnerDocument.CreateComment (" Include tag is invalid "), el);
keepIncludeNode = true;
}
- else if (path == "") {
+ else if (path.Length == 0) {
Report.Warning (1590, 1, mc.Location, "Invalid
XML `include' element. Missing `path' attribute");
el.ParentNode.InsertBefore
(el.OwnerDocument.CreateComment (" Include tag is invalid "), el);
keepIncludeNode = true;
@@ -358,7 +358,7 @@
if (ml == null)
return empty_member_infos;
- return FilterOverridenMembersOut (type, (MemberInfo [])
ml);
+ return FilterOverridenMembersOut ((MemberInfo []) ml);
}
static bool IsOverride (PropertyInfo deriv_prop, PropertyInfo
base_prop)
@@ -386,7 +386,7 @@
}
private static MemberInfo [] FilterOverridenMembersOut (
- Type type, MemberInfo [] ml)
+ MemberInfo [] ml)
{
if (ml == null)
return empty_member_infos;
@@ -481,7 +481,7 @@
type, MemberTypes.All,
BindingFlags.Public |
BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance,
memberName, null);
- mis = FilterOverridenMembersOut (type, mis);
+ mis = FilterOverridenMembersOut (mis);
if (mis == null || mis.Length == 0)
return null;
if (warn419 && IsAmbiguous (mis))
@@ -897,13 +897,13 @@
// that means removal of DOM use.
//
internal static void OnMethodGenerateDocComment (
- MethodCore mc, DeclSpace ds, XmlElement el)
+ MethodCore mc, XmlElement el)
{
Hashtable paramTags = new Hashtable ();
foreach (XmlElement pelem in el.SelectNodes ("param")) {
int i;
string xname = pelem.GetAttribute ("name");
- if (xname == "")
+ if (xname.Length == 0)
continue; // really? but MS looks doing
so
if (xname != "" &&
mc.Parameters.GetParameterByName (xname, out i) == null)
Report.Warning (1572, 2, mc.Location,
"XML comment on `{0}' has a param tag for `{1}', but there is no parameter by
that name",
Modified: trunk/mcs/mcs/driver.cs
===================================================================
--- trunk/mcs/mcs/driver.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/driver.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -983,7 +983,7 @@
return true;
case "/out":
- if (value == ""){
+ if (value.Length == 0){
Usage ();
Environment.Exit (1);
}
@@ -1009,7 +1009,7 @@
case "/define": {
string [] defs;
- if (value == ""){
+ if (value.Length == 0){
Usage ();
Environment.Exit (1);
}
@@ -1031,7 +1031,7 @@
case "/pkg": {
string packages;
- if (value == ""){
+ if (value.Length == 0){
Usage ();
Environment.Exit (1);
}
@@ -1104,7 +1104,7 @@
return true;
case "/recurse":
- if (value == ""){
+ if (value.Length == 0){
Report.Error (5, "-recurse requires an
argument");
Environment.Exit (1);
}
@@ -1113,7 +1113,7 @@
case "/r":
case "/reference": {
- if (value == ""){
+ if (value.Length == 0){
Report.Error (5, "-reference requires
an argument");
Environment.Exit (1);
}
@@ -1134,7 +1134,7 @@
return true;
}
case "/addmodule": {
- if (value == ""){
+ if (value.Length == 0){
Report.Error (5, arg + " requires an
argument");
Environment.Exit (1);
}
@@ -1146,7 +1146,7 @@
return true;
}
case "/win32res": {
- if (value == "") {
+ if (value.Length == 0) {
Report.Error (5, arg + " requires an
argument");
Environment.Exit (1);
}
@@ -1155,7 +1155,7 @@
return true;
}
case "/win32icon": {
- if (value == "") {
+ if (value.Length == 0) {
Report.Error (5, arg + " requires an
argument");
Environment.Exit (1);
}
@@ -1164,7 +1164,7 @@
return true;
}
case "/doc": {
- if (value == ""){
+ if (value.Length == 0){
Report.Error (2006, arg + " requires an
argument");
Environment.Exit (1);
}
@@ -1174,7 +1174,7 @@
case "/lib": {
string [] libdirs;
- if (value == ""){
+ if (value.Length == 0){
Report.Error (5, "/lib requires an
argument");
Environment.Exit (1);
}
@@ -1236,7 +1236,7 @@
case "/nowarn": {
string [] warns;
- if (value == ""){
+ if (value.Length == 0){
Report.Error (5, "/nowarn requires an
argument");
Environment.Exit (1);
}
@@ -1278,7 +1278,7 @@
case "/main":
case "/m":
- if (value == ""){
+ if (value.Length == 0){
Report.Error (5, arg + " requires an
argument");
Environment.Exit (1);
}
@@ -1463,7 +1463,7 @@
for (i = 0; i < args.Length; i++){
string arg = args [i];
- if (arg == "")
+ if (arg.Length == 0)
continue;
if (arg.StartsWith ("@")){
Modified: trunk/mcs/mcs/enum.cs
===================================================================
--- trunk/mcs/mcs/enum.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/enum.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -71,7 +71,7 @@
}
}
- bool IsValidEnumType (Type t)
+ static bool IsValidEnumType (Type t)
{
return (t == TypeManager.int32_type || t ==
TypeManager.uint32_type || t == TypeManager.int64_type ||
t == TypeManager.byte_type || t ==
TypeManager.sbyte_type || t == TypeManager.short_type ||
Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/expression.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -1519,7 +1519,7 @@
+ "'");
}
- bool IsOfType (EmitContext ec, Type l, Type r, Type t, bool
check_user_conversions)
+ static bool IsOfType (EmitContext ec, Type l, Type r, Type t,
bool check_user_conversions)
{
if ((l == t) || (r == t))
return true;
@@ -2286,7 +2286,7 @@
return this;
}
- Constant EnumLiftUp (EmitContext ec, Constant left, Constant
right)
+ Constant EnumLiftUp (Constant left, Constant right)
{
switch (oper) {
case Operator.BitwiseOr:
@@ -2363,11 +2363,11 @@
// The conversion rules are ignored in enum context but
why
if (!ec.InEnumContext && lc != null && rc != null &&
(TypeManager.IsEnumType (left.Type) || TypeManager.IsEnumType (right.Type))) {
- left = lc = EnumLiftUp (ec, lc, rc);
+ left = lc = EnumLiftUp (lc, rc);
if (lc == null)
return null;
- right = rc = EnumLiftUp (ec, rc, lc);
+ right = rc = EnumLiftUp (rc, lc);
if (rc == null)
return null;
}
@@ -3986,7 +3986,7 @@
TypeManager.CSharpName (a.Expr.Type);
}
- public bool ResolveMethodGroup (EmitContext ec, Location loc)
+ public bool ResolveMethodGroup (EmitContext ec)
{
// FIXME: csc doesn't report any error if you try to
use `ref' or
// `out' in a delegate creation expression.
@@ -4135,7 +4135,7 @@
/// q if a->q is better,
/// null if neither is better
/// </summary>
- static Type BetterConversion (EmitContext ec, Argument a, Type
p, Type q, Location loc)
+ static Type BetterConversion (EmitContext ec, Argument a, Type
p, Type q)
{
Type argument_type = a.Type;
Expression argument_expr = a.Expr;
@@ -4236,7 +4236,7 @@
/// </remarks>
static bool BetterFunction (EmitContext ec, ArrayList args, int
argument_count,
MethodBase candidate, bool
candidate_params,
- MethodBase best, bool best_params,
Location loc)
+ MethodBase best, bool best_params)
{
ParameterData candidate_pd =
TypeManager.GetParameterData (candidate);
ParameterData best_pd = TypeManager.GetParameterData
(best);
@@ -4261,7 +4261,7 @@
continue;
same = false;
- Type better = BetterConversion (ec, a, ct, bt,
loc);
+ Type better = BetterConversion (ec, a, ct, bt);
// for each argument, the conversion to 'ct'
should be no worse than
// the conversion to 'bt'.
@@ -4758,7 +4758,7 @@
if (BetterFunction (ec, Arguments, arg_count,
candidate, cand_params,
- method, method_params,
loc)) {
+ method, method_params)) {
method = candidate;
method_params = cand_params;
}
@@ -4777,8 +4777,7 @@
bool cand_params = candidate_to_form != null
&& candidate_to_form.Contains (candidate);
if (!BetterFunction (ec, Arguments, arg_count,
method, method_params,
- candidate, cand_params,
- loc)) {
+ candidate, cand_params)) {
Report.SymbolRelatedToPreviousError
(candidate);
ambiguous = candidate;
}
@@ -5177,8 +5176,7 @@
}
}
- static Type[] GetVarargsTypes (EmitContext ec, MethodBase mb,
- ArrayList arguments)
+ static Type[] GetVarargsTypes (MethodBase mb, ArrayList
arguments)
{
ParameterData pd = TypeManager.GetParameterData (mb);
@@ -5359,7 +5357,7 @@
call_op = OpCodes.Callvirt;
if ((method.CallingConvention &
CallingConventions.VarArgs) != 0) {
- Type[] varargs_types = GetVarargsTypes (ec,
method, Arguments);
+ Type[] varargs_types = GetVarargsTypes (method,
Arguments);
ig.EmitCall (call_op, (MethodInfo) method,
varargs_types);
return;
}
@@ -6017,7 +6015,7 @@
return true;
}
- public void UpdateIndices (EmitContext ec)
+ public void UpdateIndices ()
{
int i = 0;
for (ArrayList probe = initializers; probe != null;) {
@@ -6040,7 +6038,7 @@
}
- public bool ValidateInitializers (EmitContext ec, Type
array_type)
+ public bool ValidateInitializers (EmitContext ec)
{
if (initializers == null) {
return !expect_initializers;
@@ -6064,7 +6062,7 @@
if (!CheckIndices (ec, initializers, 0, false))
return false;
- UpdateIndices (ec);
+ UpdateIndices ();
if (arguments.Count != dimensions) {
Error_IncorrectArrayInitializer ();
@@ -6120,7 +6118,7 @@
// First step is to validate the initializers and fill
// in any missing bits
//
- if (!ValidateInitializers (ec, type))
+ if (!ValidateInitializers (ec))
return null;
if (arguments == null)
@@ -6720,19 +6718,13 @@
this.loc = loc;
}
- public bool ResolveBase (EmitContext ec)
+ public override Expression DoResolve (EmitContext ec)
{
eclass = ExprClass.Variable;
type = TypeManager.runtime_argument_handle_type;
- return true;
- }
- public override Expression DoResolve (EmitContext ec)
- {
- if (!ResolveBase (ec))
- return null;
-
- if (ec.IsFieldInitializer ||
!ec.CurrentBlock.Toplevel.HasVarargs) {
+ if (ec.IsFieldInitializer ||
!ec.CurrentBlock.Toplevel.HasVarargs)
+ {
Error (190, "The __arglist construct is valid
only within " +
"a variable argument method.");
return null;
@@ -6951,7 +6943,7 @@
public override FullNamedExpression ResolveAsTypeStep
(IResolveContext ec, bool silent)
{
if (alias == "global")
- return new MemberAccess (RootNamespace.Global,
identifier, loc).ResolveAsTypeStep (ec, silent);
+ return new MemberAccess (RootNamespace.Global,
identifier).ResolveAsTypeStep (ec, silent);
int errors = Report.Errors;
FullNamedExpression fne =
ec.DeclContainer.NamespaceEntry.LookupAlias (alias);
@@ -6965,7 +6957,7 @@
Report.Error (431, loc, "`{0}' cannot
be used with '::' since it denotes a type", alias);
return null;
}
- return new MemberAccess (fne, identifier,
loc).ResolveAsTypeStep (ec, silent);
+ return new MemberAccess (fne,
identifier).ResolveAsTypeStep (ec, silent);
}
public override Expression DoResolve (EmitContext ec)
@@ -6983,7 +6975,7 @@
}
}
- Expression retval = new MemberAccess (fne, identifier,
loc).DoResolve (ec);
+ Expression retval = new MemberAccess (fne,
identifier).DoResolve (ec);
if (retval == null)
return null;
@@ -7024,8 +7016,7 @@
public readonly string Identifier;
Expression expr;
- // TODO: Location can be removed
- public MemberAccess (Expression expr, string id, Location l)
+ public MemberAccess (Expression expr, string id)
{
this.expr = expr;
Identifier = id;
@@ -7850,7 +7841,7 @@
BindingFlags.DeclaredOnly, p_name, null);
}
- static public Indexers GetIndexersForType (Type caller_type,
Type lookup_type, Location loc)
+ static public Indexers GetIndexersForType (Type caller_type,
Type lookup_type)
{
Indexers ix = empty;
@@ -7926,7 +7917,7 @@
bool found_any = false, found_any_getters = false;
Type lookup_type = indexer_type;
- Indexers ilist = Indexers.GetIndexersForType
(current_type, lookup_type, loc);
+ Indexers ilist = Indexers.GetIndexersForType
(current_type, lookup_type);
if (ilist.Properties != null) {
found_any = true;
foreach (Indexers.Indexer ix in
ilist.Properties) {
@@ -8000,7 +7991,7 @@
bool found_any = false, found_any_setters = false;
- Indexers ilist = Indexers.GetIndexersForType
(current_type, indexer_type, loc);
+ Indexers ilist = Indexers.GetIndexersForType
(current_type, indexer_type);
if (ilist.Properties != null) {
found_any = true;
foreach (Indexers.Indexer ix in
ilist.Properties) {
Modified: trunk/mcs/mcs/flowanalysis.cs
===================================================================
--- trunk/mcs/mcs/flowanalysis.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/flowanalysis.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -701,7 +701,7 @@
return result;
}
- protected void MergeFinally (FlowBranching branching,
UsageVector f_origins,
+ protected static void MergeFinally (UsageVector
f_origins,
MyBitVector f_params)
{
for (UsageVector vector = f_origins; vector !=
null; vector = vector.Next) {
@@ -710,15 +710,15 @@
}
}
- public void MergeFinally (FlowBranching branching,
UsageVector f_vector,
+ public void MergeFinally (UsageVector f_vector,
UsageVector f_origins)
{
if (parameters != null) {
if (f_vector != null) {
- MergeFinally (branching,
f_origins, f_vector.Parameters);
+ MergeFinally (f_origins,
f_vector.Parameters);
MyBitVector.Or (ref parameters,
f_vector.ParameterVector);
} else
- MergeFinally (branching,
f_origins, parameters);
+ MergeFinally (f_origins,
parameters);
}
if (f_vector != null && f_vector.LocalVector !=
null)
@@ -1492,7 +1492,7 @@
{
UsageVector vector = Merge (catch_vectors);
- vector.MergeFinally (this, finally_vector,
finally_origins);
+ vector.MergeFinally (finally_vector, finally_origins);
return vector;
}
Modified: trunk/mcs/mcs/iterators.cs
===================================================================
--- trunk/mcs/mcs/iterators.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/iterators.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -652,7 +652,7 @@
Expression ce = new MemberAccess (
new SimpleName ("System.Threading.Interlocked",
Location),
- "CompareExchange", Location);
+ "CompareExchange");
Expression pc = new FieldExpression (this, pc_field);
Expression before = new IntLiteral ((int)
State.Running, Location);
Modified: trunk/mcs/mcs/location.cs
===================================================================
--- trunk/mcs/mcs/location.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/location.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -162,7 +162,7 @@
// </remarks>
static public SourceFile LookupFile (string name)
{
- string path = name == "" ? "" : Path.GetFullPath (name);
+ string path = name.Length == 0 ? "" : Path.GetFullPath
(name);
if (!source_files.Contains (path)) {
if (source_count >= (1 << checkpoint_bits))
@@ -178,7 +178,7 @@
return (SourceFile) source_list [index - 1];
}
- static public void Push (SourceFile file, int line)
+ static public void Push (SourceFile file)
{
current_source = file.Index;
// File is always pushed before being changed.
Modified: trunk/mcs/mcs/namespace.cs
===================================================================
--- trunk/mcs/mcs/namespace.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/namespace.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -86,7 +86,7 @@
protected void EnsureNamespace (string dotted_name)
{
- if (dotted_name != null && dotted_name != "" && !
IsNamespace (dotted_name))
+ if (dotted_name != null && dotted_name.Length != 0 && !
IsNamespace (dotted_name))
GetNamespace (dotted_name, true);
}
@@ -278,7 +278,7 @@
if (parent != null && parent.MemberName !=
MemberName.Null)
MemberName = new MemberName (parent.MemberName,
name);
- else if (name == "")
+ else if (name.Length == 0)
MemberName = MemberName.Null;
else
MemberName = new MemberName (name);
@@ -352,7 +352,7 @@
t = tdecl.TypeBuilder;
}
}
- string lookup = t != null ? t.FullName : (fullname ==
"" ? name : fullname + "." + name);
+ string lookup = t != null ? t.FullName :
(fullname.Length == 0 ? name : fullname + "." + name);
Type rt = root.LookupTypeReflection (lookup, loc);
if (t == null)
t = rt;
@@ -541,7 +541,7 @@
}
}
- public NamespaceEntry (NamespaceEntry parent, SourceFile file,
string name, Location loc)
+ public NamespaceEntry (NamespaceEntry parent, SourceFile file,
string name)
{
this.parent = parent;
this.file = file;
Modified: trunk/mcs/mcs/report.cs
===================================================================
--- trunk/mcs/mcs/report.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/report.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -668,7 +668,7 @@
return result;
}
- bool CheckWarningCode (int code, Location loc)
+ static bool CheckWarningCode (int code, Location loc)
{
if (Report.IsValidWarning (code))
return true;
Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/statement.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -676,7 +676,7 @@
FlowBranching.UsageVector vectors;
- public LabeledStatement (string label_name, Location l)
+ public LabeledStatement (Location l)
{
this.loc = l;
}
@@ -4386,7 +4386,7 @@
//
if (return_type.IsInterface ||
- !FetchMoveNext (ec, return_type) ||
+ !FetchMoveNext (return_type) ||
!FetchGetCurrent (ec, return_type))
{
move_next =
TypeManager.bool_movenext_void;
get_current = new PropertyExpr (
@@ -4399,7 +4399,7 @@
// find if they support the
GetEnumerator pattern.
//
- if (TypeManager.HasElementType
(return_type) || !FetchMoveNext (ec, return_type) || !FetchGetCurrent (ec,
return_type)) {
+ if (TypeManager.HasElementType
(return_type) || !FetchMoveNext (return_type) || !FetchGetCurrent (ec,
return_type)) {
Report.Error (202, loc,
"foreach statement requires that the return type `{0}' of `{1}' must have a
suitable public MoveNext method and public Current property",
TypeManager.CSharpName
(return_type), TypeManager.CSharpSignature (mi));
return false;
@@ -4417,7 +4417,7 @@
//
// Retrieves a `public bool MoveNext ()' method from
the Type `t'
//
- bool FetchMoveNext (EmitContext ec, Type t)
+ bool FetchMoveNext (Type t)
{
MemberList move_next_list;
Modified: trunk/mcs/mcs/typemanager.cs
===================================================================
--- trunk/mcs/mcs/typemanager.cs 2006-03-20 18:58:31 UTC (rev 58195)
+++ trunk/mcs/mcs/typemanager.cs 2006-03-20 19:15:27 UTC (rev 58196)
@@ -2140,11 +2140,6 @@
// uses NonPublic for both protected and private), we need to
distinguish.
//
- static internal bool FilterNone (MemberInfo m, object filter_criteria)
- {
- return true;
- }
-
internal class Closure {
internal bool private_ok;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches