Permalink
Browse files

This commit was manufactured by cvs2svn to create tag 'MCS_0_95'.

svn path=/tags/MCS_0_95/mcs/; revision=28626
  • Loading branch information...
5 parents f82a1f8 + 0fae05d + 4e4824a + 6e3884f + afe6148 commit 39c87c56fbaf6635cfe7a81285f4c0b8612f302f nobody committed Jun 1, 2004
@@ -1,3 +1,7 @@
+2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * syntax.cs: reverting my previous patch. It causes bigger problems.
+
2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* category.cs: added LastValue field to mark the end of enum Category.
@@ -773,9 +773,14 @@ class CharacterClass : Expression {
// initialize pos/neg category arrays
- int cat_size = (int) Category.LastValue;
- pos_cats = new BitArray (cat_size);
- neg_cats = new BitArray (cat_size);
+ Array cat_values = Enum.GetValues (typeof (Category));
+ int cat_size = (int)(Category)cat_values.GetValue (cat_values.Length - 1) + 1;
+ pos_cats = new bool[cat_size];
+ neg_cats = new bool[cat_size];
+ for (int i = 0; i < cat_size; ++ i) {
+ pos_cats[i] = false;
+ neg_cats[i] = false;
+ }
}
public CharacterClass (Category cat, bool negate) : this (false, false) {
@@ -796,8 +801,15 @@ class CharacterClass : Expression {
int n = (int)cat;
if (negate) {
+ if (pos_cats[n])
+ pos_cats[n] = false;
+
neg_cats[n] = true;
- } else {
+ }
+ else {
+ if (neg_cats[n])
+ neg_cats[n] = false;
+
pos_cats[n] = true;
}
}
@@ -926,7 +938,7 @@ class CharacterClass : Expression {
private static Interval upper_case_characters = new Interval ((char)65, (char)90);
private const int distance_between_upper_and_lower_case = 32;
private bool negate, ignore;
- private BitArray pos_cats, neg_cats;
+ private bool[] pos_cats, neg_cats;
private IntervalCollection intervals;
}
@@ -1,25 +0,0 @@
-Assembly.cs
-AssemblyNameFlags.cs
-BindingFlags.cs
-CallingConventions.cs
-ConstructorInfo.cs
-DefaultMemberAttribute.cs
-EventAttributes.cs
-EventInfo.cs
-FieldAttributes.cs
-FieldInfo.cs
-ICustomAttributeProvider.cs
-MemberFilter.cs
-MemberInfo.cs
-MemberTypes.cs
-MethodAttributes.cs
-MethodBase.cs
-MethodImplAttributes.cs
-MethodInfo.cs
-Module.cs
-ParameterAttributes.cs
-PropertyAttributes.cs
-PropertyInfo.cs
-ResourceAttributes.cs
-ResourceLocation.cs
-TypeAttributes.cs
@@ -485,6 +485,9 @@ public static int BinarySearch (Array array, object value)
if (array == null)
throw new ArgumentNullException ("array");
+ if (value == null)
+ return -1;
+
if (array.Rank > 1)
throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
@@ -502,7 +505,7 @@ public static int BinarySearch (Array array, object value, IComparer comparer)
if (array.Rank > 1)
throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
- if ((comparer == null) && !(value is IComparable))
+ if ((comparer == null) && (value != null) && !(value is IComparable))
throw new ArgumentException (Locale.GetText (
"comparer is null and value does not support IComparable."));
@@ -527,7 +530,7 @@ public static int BinarySearch (Array array, int index, int length, object value
if (index > array.GetLowerBound (0) + array.GetLength (0) - length)
throw new ArgumentException (Locale.GetText (
"index and length do not specify a valid range in array."));
- if (!(value is IComparable))
+ if ((value != null) && (!(value is IComparable)))
throw new ArgumentException (Locale.GetText (
"value does not support IComparable"));
@@ -553,7 +556,7 @@ public static int BinarySearch (Array array, int index, int length, object value
throw new ArgumentException (Locale.GetText (
"index and length do not specify a valid range in array."));
- if ((comparer == null) && !(value is IComparable))
+ if ((comparer == null) && (value != null) && !(value is IComparable))
throw new ArgumentException (Locale.GetText (
"comparer is null and value does not support IComparable."));
@@ -157,7 +157,8 @@ public string ToString (string format, IFormatProvider provider)
{
NumberFormatInfo nfi = NumberFormatInfo.GetInstance (provider);
- if (format == null)
+ // null or empty ("")
+ if ((format == null) || (format.Length == 0))
format = "G";
return IntegerFormatter.NumberToString (format, nfi, m_value);
@@ -1,3 +1,15 @@
+2004-06-01 Miguel de Icaza <miguel@ximian.com>
+
+ * String.cs: Flag concat with four arguments internal.
+
+2004-05-31 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Array.cs: Fixed legal case where value is null.
+ * Byte.cs: Fixed ToString when format is an empty string (use "G").
+ * Guid.cs: Renamed private fields (and changed some to signed) to
+ match MS implementation and allow serialization to work. Fix
+ bug #59113.
+
2004-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* DateTime.cs: adjust milliseconds for fraction specifier ('f').
Oops, something went wrong.

0 comments on commit 39c87c5

Please sign in to comment.