2002-07-02 Martin Baulig <martin@gnome.org>
[mono.git] / mcs / mcs / ChangeLog
index e799a88afa0f065b895994b90e2cd4d3446e1fa5..76e4b75b16e161f00eca0a26d542401f5e099098 100755 (executable)
@@ -1,5 +1,198 @@
+2002-07-02  Martin Baulig  <martin@gnome.org>
+
+       * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
+       ValueType, call TypeManager.TypeToCoreType() on it.
+       (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
+       the OpCodes.Newarr argument.
+
+2002-07-02  Martin Baulig  <martin@gnome.org>
+
+       * expression.cs (Invocation.EmitCall): When compiling corlib,
+       replace all calls to the system's System.Array type to calls to
+       the newly created one.
+
+       * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
+       System.Array methods.
+       (TypeManager.InitCoreTypes): When compiling corlib, get the methods
+       from the system's System.Array type which must be replaced.
+
+Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * typemanager.cs: load unverifiable_code_ctor so we can build
+       corlib using the correct type. Avoid using GetTypeCode() with
+       TypeBuilders.
+       * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
+       TypeManager.object_type to allow building corlib.
+
+Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * ecore.cs: handle System.Enum separately in LoadFromPtr().
+
+2002-07-01  Martin Baulig  <martin@gnome.org>
+
+       * class.cs: Make the last change actually work, we need to check
+       whether `ifaces != null' to avoid a crash.
+
+Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * class.cs: when we build structs without fields that implement
+       interfaces, we need to add the interfaces separately, since there is
+       no API to both set the size and add the interfaces at type creation
+       time.
+
+Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * expression.cs: the dimension arguments to the array constructors
+       need to be converted if they are a long.
+
+Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * class.cs: don't emit ldarg.0 if there is no parent constructor
+       (fixes showstopper for corlib).
+
+2002-06-29  Martin Baulig  <martin@gnome.org>
+
+       MCS now compiles corlib on GNU/Linux :-)
+
+       * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
+       ie. check for MethodImplOptions.InternalCall.
+
+       * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
+       and TypeManager.attribute_type are null, so we must explicitly check
+       whether parent is not null to find out whether it's an attribute type.
+       (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
+       and SetBuilder, not only if the property is neither abstract nor external.
+       This is necessary to set the MethodImplOptions on the accessor methods.
+       (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
+       SetBuilder, see Property.Emit().
+
+       * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
+       populate "System.Object", "System.ValueType" and "System.Attribute" since
+       they've already been populated from BootCorlib_PopulateCoreTypes().
+
+2002-06-29  Martin Baulig  <martin@gnome.org>
+
+       * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
+       is the NullLiteral, we also need to make sure that target_type is not
+       an enum type.   
+
+2002-06-29  Martin Baulig  <martin@gnome.org>
+
+       * rootcontext.cs (RootContext.ResolveCore): We must initialize
+       `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
+       before calling BootstrapCorlib_ResolveDelegate ().
+
+2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * statement.cs: fixed build-breaker. All tests passed ok.
+
+2002-06-27  Martin Baulig  <martin@gnome.org>
+
+       * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
+       for System.Decimal when compiling corlib.
+
+2002-06-27  Martin Baulig  <martin@gnome.org>
+
+       * statement.cs (Switch.TableSwitchEmit): Make this work with empty
+       switch blocks which contain nothing but a default clause.
+
+2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
+
+       * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
+
+2002-06-27  Martin Baulig  <martin@gnome.org>
+
+       * ecore.cs (PropertyExpr.PropertyExpr): Call
+       TypeManager.TypeToCoreType() on the `pi.PropertyType'.
+
+       * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
+       is already a TypeBuilder.
+
+2002-06-27  Martin Baulig  <martin@gnome.org>
+
+       * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
+       `target_type == TypeManager.array_type', not IsAssignableFrom() in
+       the "from an array-type to System.Array" case.  This makes it work
+       when compiling corlib.
+
+2002-06-27  Martin Baulig  <martin@gnome.org>
+
+       * ecore.cs (Expression.SimpleNameResolve): If the expression is a
+       non-static PropertyExpr, set its InstanceExpression.  This makes
+       the `ICollection.Count' property work in System/Array.cs.
+
+2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
+
+       * driver.cs: Made error handling more consistent.  Errors now
+       tracked by Report class, so many methods which used to return int
+       now return void.  Main() now prints success/failure and 
+       errors/warnings message.
+
+       Renamed '--probe' compiler argument to '--expect-error'.  Removed
+       the magic number return values (123 and 124).  Now, if the
+       expected error occurs, the compiler exits with success (exit value
+       0).  If the compilation completes without seeing that particular
+       error, the compiler exits with failure (exit value 1).  The
+       makefile in mcs/errors has been changed to handle the new behaviour.
+
+       * report.cs: Made 'expected error' number a property and renamed
+       it from 'Probe' to 'ExpectedError'.
+
+       * genericparser.cs: Removed error handling support, since it is
+       now all done by Report class.
+
+       * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
+       class, so parse() no longer returns an int.
+
+       * namespace.cs: Use Report.Error instead of GenericParser.error
+
+       
+2002-06-22  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
+       TypeContainer.AddOperator): At the front of the list put the
+       explicit implementations, so they get resolved/defined first. 
+
+2002-06-21  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (TypeContainer.VerifyImplements): Verifies that a given
+       interface type is implemented by this TypeContainer.  Used during
+       explicit interface implementation.
+
+       (Property.Define, Indexer.Define, Method.Define): Validate that
+       the given interface in the explicit implementation is one of the
+       base classes for the containing type.
+
+       Also if we are explicitly implementing an interface, but there is
+       no match in the pending implementation table, report an error.
+
+       (Property.Define): Only define the property if we are
+       not explicitly implementing a property from an interface.  Use the
+       correct name also for those properties (the same CSC uses,
+       although that is really not needed).
+       
+       (Property.Emit): Do not emit attributes for explicitly implemented
+       properties, as there is no TypeBuilder.
+
+       (Indexer.Emit): ditto.
+
+       Hiding then means that we do not really *implement* a pending
+       implementation, which makes code fail.
+
+2002-06-22  Martin Baulig  <martin@gnome.org>
+
+       * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
+       the return value of Object.GetType().  [FIXME: we need to do this whenever
+       we get a type back from the reflection library].
+
+Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
+
 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
 
+       * attribute.cs: Return null if we can not look up the type.
+
        * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
        the interface types found.
 
        context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
        be IA, IB, IC.
        
+2002-06-21  Martin Baulig  <martin@gnome.org>
+
+       * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
+       on System.Enum.
+
 2002-06-21  Martin Baulig  <martin@gnome.org>
 
        * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib