[Mono-list] work done tonight

Sean MacIsaac macisaac@ximian.com
17 Oct 2001 03:31:34 -0400


--=-LNHHPvj8Lx8SUS7CFWHc
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi all,

Here are the patches I made tonight.  I've been working on getting the
compiler to run in Linux.  Most of what I did was to add stub
classes/methods so that corlib.dll would have more of of the
requirements it needs to run mcs.exe (there are still some missing, but
I am going to sleep).

I also changed metadata/class.c so it gives some debugging output about
what classes we're missing rather than just returning System.MonoDummy.

Attached are my diffs.

Tomorrow I will work on getting the tests that we have written running
against the libraries we have written rather than Microsoft's.

Sean




--=-LNHHPvj8Lx8SUS7CFWHc
Content-Type: text/plain
Content-Disposition: attachment; filename=mcs.diff
Content-Transfer-Encoding: 7bit

Index: System/Array.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System/Array.cs,v
retrieving revision 1.5
diff -u -r1.5 Array.cs
--- System/Array.cs	2001/08/10 07:03:40	1.5
+++ System/Array.cs	2001/10/17 03:52:16
@@ -506,5 +506,8 @@
 				return comparer.Compare(value1, value2);
 		}
 	
+		public virtual void CopyTo (Array array, int index)
+		{
+		}
 	}
 }
Index: System/Type.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System/Type.cs,v
retrieving revision 1.9
diff -u -r1.9 Type.cs
--- System/Type.cs	2001/10/07 01:39:00	1.9
+++ System/Type.cs	2001/10/17 03:52:16
@@ -115,6 +115,68 @@
 				return(false);
 			}
 		}
+
+		public bool IsClass {
+			get {
+				// FIXME
+				return true;
+			}
+		}
+
+		public bool IsInterface {
+			get {
+				// FIXME
+				return false;
+			}
+		}
+
+		public bool IsArray {
+			get {
+				// FIXME
+				return false;
+			}
+		}
+
+		public bool IsSubclassOf (Type c)
+		{
+			// FIXME
+			return false;
+		}
+
+		public virtual Type[] FindInterfaces (TypeFilter filter, object filterCriteria)
+		{
+			// FIXME
+			return null;
+		}
+
+		public abstract Type[] GetInterfaces ();
 		
+		public virtual bool IsAssignableFrom (Type c)
+		{
+			// FIXME
+			return false;
+		}
+
+		public virtual int GetArrayRank ()
+		{
+			// FIXME
+			return 0;
+		}
+
+		public abstract Type GetElementType ();
+
+		public bool IsSealed {
+			get {
+				// FIXME
+				return false;
+			}
+		}
+
+		public bool IsAbstract {
+			get {
+				// FIXME
+				return false;
+			}
+		}
 	}
 }
Index: System.IO/FileLoadException.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.IO/FileLoadException.cs,v
retrieving revision 1.1
diff -u -r1.1 FileLoadException.cs
--- System.IO/FileLoadException.cs	2001/09/13 12:09:03	1.1
+++ System.IO/FileLoadException.cs	2001/10/17 03:52:16
@@ -25,5 +25,12 @@
 			: base (message, inner)
 		{
 		}
+
+		public string FusionLog {
+			get {
+				// FIXME
+				return null;
+			}
+		}
 	}
 }
Index: System.IO/FileNotFoundException.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.IO/FileNotFoundException.cs,v
retrieving revision 1.1
diff -u -r1.1 FileNotFoundException.cs
--- System.IO/FileNotFoundException.cs	2001/09/13 12:09:03	1.1
+++ System.IO/FileNotFoundException.cs	2001/10/17 03:52:16
@@ -25,5 +25,12 @@
 			: base (message, inner)
 		{
 		}
+
+		public string FusionLog {
+			get {
+				// FIXME
+				return null;
+			}
+		}
 	}
 }
Index: System.Reflection/Assembly.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Reflection/Assembly.cs,v
retrieving revision 1.3
diff -u -r1.3 Assembly.cs
--- System.Reflection/Assembly.cs	2001/10/08 12:02:19	1.3
+++ System.Reflection/Assembly.cs	2001/10/17 03:52:16
@@ -16,7 +16,7 @@
 
 namespace System.Reflection {
 
-	public class Assembly : System.Object, System.Reflection.ICustomAttributeProvider,
+	public class Assembly : System.Reflection.ICustomAttributeProvider,
 		System.Security.IEvidenceFactory, System.Runtime.Serialization.ISerializable {
 
 		private string codebase;
Index: System.Reflection/FieldInfo.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Reflection/FieldInfo.cs,v
retrieving revision 1.1
diff -u -r1.1 FieldInfo.cs
--- System.Reflection/FieldInfo.cs	2001/09/02 17:50:37	1.1
+++ System.Reflection/FieldInfo.cs	2001/10/17 03:52:16
@@ -12,5 +12,15 @@
 namespace System.Reflection {
 
 	public abstract class FieldInfo : MemberInfo {
+
+		public abstract Type FieldType { get; }
+
+		public abstract object GetValue(object obj);
+
+		// FIXME
+		public bool IsLiteral { get { return true; } } 
+
+		// FIXME
+		public bool IsStatic { get { return false; } }
 	}
 }
Index: System.Reflection.Emit/AssemblyBuilder.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs,v
retrieving revision 1.6
diff -u -r1.6 AssemblyBuilder.cs
--- System.Reflection.Emit/AssemblyBuilder.cs	2001/10/08 12:02:19	1.6
+++ System.Reflection.Emit/AssemblyBuilder.cs	2001/10/17 03:52:16
@@ -164,5 +164,10 @@
 			entry_point = entryMethod;
 		}
 
+		public void SetEntryPoint (MethodInfo entryMethod, PEFileKinds fileKind)
+		{
+			entry_point = entryMethod;
+		}
+
 	}
 }
Index: System.Reflection.Emit/TypeBuilder.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs,v
retrieving revision 1.4
diff -u -r1.4 TypeBuilder.cs
--- System.Reflection.Emit/TypeBuilder.cs	2001/10/08 12:02:19	1.4
+++ System.Reflection.Emit/TypeBuilder.cs	2001/10/17 03:52:16
@@ -56,5 +56,8 @@
 			return null;
 		}
 
+		public override Type GetElementType () { return null; }
+
+		public override Type[] GetInterfaces () { return null; }
 	}
 }
Index: System.Text/StringBuilder.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Text/StringBuilder.cs,v
retrieving revision 1.3
diff -u -r1.3 StringBuilder.cs
--- System.Text/StringBuilder.cs	2001/07/16 22:01:34	1.3
+++ System.Text/StringBuilder.cs	2001/10/17 03:52:16
@@ -373,6 +373,10 @@
 			return Append( value.ToString().ToCharArray() );
 		}
 
+		public StringBuilder Append( char value ) {
+			return Append (value, 1);
+		}
+
 		public StringBuilder Append( char value, int repeatCount ) {
 			if( repeatCount < 0 ) {
 				throw new ArgumentOutOfRangeException();

--=-LNHHPvj8Lx8SUS7CFWHc
Content-Type: text/plain
Content-Disposition: attachment; filename=mono.diff
Content-Transfer-Encoding: 7bit

Index: ChangeLog
===================================================================
RCS file: /cvs/public/mono/mono/metadata/ChangeLog,v
retrieving revision 1.76
diff -u -r1.76 ChangeLog
--- ChangeLog	2001/10/15 09:50:03	1.76
+++ ChangeLog	2001/10/17 03:57:53
@@ -1,3 +1,8 @@
+2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
+
+	* class.c (mono_class_create_from_typeref): added debugging output
+	to print class name when MonoDummy is returned instead of real class
+
 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
  
	 	* class.c (mono_class_metadata_init): interface offset table now
Index: class.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/class.c,v
retrieving revision 1.42
diff -u -r1.42 class.c
--- class.c	2001/10/15 09:50:03	1.42
+++ class.c	2001/10/17 03:57:53
@@ -46,6 +46,7 @@
 		 * detected a reference to mscorlib, we simply return a reference to a dummy 
 		 * until we have a better solution.
 		 */
+		fprintf(stderr, "Sending dummy where %s expected\n", mono_metadata_string_heap (image, cols [MONO_TYPEREF_NAME])); 
 		res = mono_class_from_name (image, "System", "MonoDummy");
 		/* prevent method loading */
 		res->dummy = 1;

--=-LNHHPvj8Lx8SUS7CFWHc--