**** Merged from MCS ****
[mono.git] / mcs / gmcs / ChangeLog
index c7cc4ec292da94d76b42e038465b2a3d3b55d65c..f76e079a27ad4cff279b9da7ac66a9585df725c7 100755 (executable)
@@ -1,3 +1,394 @@
+2004-05-19  Raja R Harinath  <rharinath@novell.com>
+
+       * cs-parser.jay (attribute): Create a GlobalAttribute for the case
+       of a top-level attribute without an attribute target.
+       * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
+       Make non-static.
+       (Attribute.Conditional_GetConditionName), 
+       (Attribute.Obsolete_GetObsoleteMessage): Update.
+       (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
+       part of ScanForIndexerName.
+       (Attribute.CanIgnoreInvalidAttribute): New function.
+       (Attribute.ScanForIndexerName): Move to ...
+       (Attributes.ScanForIndexerName): ... here.
+       (Attributes.Attrs): Rename from now-misnamed AttributeSections.
+       (Attributes.Search): New internal variant that can choose not to
+       complain if types aren't resolved.  The original signature now
+       complains.
+       (Attributes.GetClsCompliantAttribute): Use internal variant, with
+       complaints suppressed.
+       (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
+       only if it not useful.
+       (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
+       top-level for attributes that are shared between the assembly
+       and a top-level class.
+       * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
+       * class.cs: Update to reflect changes.
+       (DefineIndexers): Fuse loops.
+       * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
+       a couple more variants of attribute names.
+
+2004-05-18  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix bug #52585 (Implemented explicit attribute declaration)
+
+       * attribute.cs:
+       (Attributable.ValidAttributeTargets): New abstract method. It gets
+       list of valid attribute targets for explicit target declaration.
+       (Attribute.Target): It holds target itself.
+       (AttributeSection): Removed.
+       (Attribute.CheckTargets): New method. It checks whether attribute
+       target is valid for the current element.
+
+       * class.cs:
+       (EventProperty): New class. For events that are declared like
+       property (with add and remove accessors).
+       (EventField): New class. For events that are declared like field.
+       class.cs
+
+       * cs-parser.jay: Implemented explicit attribute target declaration.
+
+       * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
+       Override ValidAttributeTargets.
+
+       * parameter.cs:
+       (ReturnParameter): Class for applying custom attributes on 
+       the return type.
+       (ParameterAtribute): New class. Class for applying custom
+       attributes on the parameter type.
+
+2004-05-17  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
+       definitions. 
+
+       (Method): Allow UNSAFE here.
+
+       * modifiers.cs: Support unsafe reporting.
+
+2004-05-17  Marek Safar  <marek.safar@seznam.cz>
+
+       * decl.cs: Fix bug #58478.
+
+2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * statement.cs: When checking for unreachable code on an EmptyStatement,
+       set the location. Fixes bug #58488.
+
+2004-05-13  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs: Add -pkg handling.
+
+       From Gonzalo: UseShelLExecute=false
+
+2004-05-12  Marek Safar  <marek.safar@seznam.cz>
+
+       * attribute.cs:
+       (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
+       for attribute.
+       (Attribute.IsClsCompliaceRequired): Moved to base for better
+       accesibility.
+       (Attribute.UsageAttribute): New property for AttributeUsageAttribute
+       when attribute is AttributeUsageAttribute.
+       (Attribute.GetValidTargets): Simplified.
+       (Attribute.GetAttributeUsage): New method returns AttributeUsage
+       attribute for this type.
+       (Attribute.ApplyAttributes): Method renamed to Emit and make
+       non-static.
+       (GlobalAttributeSection): New class for special handling of global
+       attributes (assembly, module).
+       (AttributeSection.Emit): New method.
+
+       * class.cs: Implemented Attributable abstract methods.
+       (MethodCore.LabelParameters): Moved to Parameter class.
+       (Accessor): Is back simple class.
+       (PropertyMethod): Implemented Attributable abstract class.
+       (DelegateMethod): Implemented Attributable abstract class.
+       (Event): New constructor for disctintion between normal Event
+       and Event with accessors.
+
+       * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
+
+       * codegen.cs, const.cs, decl.cs, delegate.cs:
+       (CommonAssemblyModulClass): Implemented Attributable abstract class
+       and simplified.
+
+       * enum.cs: Implement IAttributeSupport interface.
+       (EnumMember): New class for emum members. Implemented Attributable
+       abstract class
+
+       * parameter.cs:
+       (ParameterBase): Is abstract.
+       (ReturnParameter): New class for easier [return:] attribute handling.
+
+       * typemanager.cs: Removed builder_to_attr.
+
+2004-05-11  Raja R Harinath  <rharinath@novell.com>
+
+       Fix bug #57151.
+       * attribute.cs (Attribute.GetPositionalValue): New function.
+       * class.cs (TypeContainer.VerifyMembers): New function.
+       (TypeContainer.Emit): Use it.
+       (ClassOrStruct): New base class for Class and Struct.
+       (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
+       StructLayout(LayoutKind.Explicit) was ascribed to the struct or
+       class.
+       (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
+       then each non-static field should have a FieldOffset attribute.
+       Otherwise, none of the fields should have a FieldOffset attribute.
+       * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
+       and FieldOffset attributes.
+       * typemanager.cs (TypeManager.struct_layout_attribute_type)
+       (TypeManager.field_offset_attribute_type): New core types.
+       (TypeManager.InitCoreTypes): Initialize them.
+
+2004-05-11  Michal Moskal  <malekith@pld-linux.org>
+
+       * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
+       Return correct type.
+       From bug #58270.
+
+2004-05-09  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (Binary.DoNumericPromotions): 0 long constant can
+       be implicitly converted to ulong.
+       
+       * expression.cs: The logic for allowing operator &, | and ^ worked
+       was wrong, it worked before because we did not report an error in
+       an else branch.  Fixes 57895.
+
+       * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
+       allow volatile fields to be reference types.
+
+2004-05-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs: Add support for /debug-
+
+2004-05-07  Raja R Harinath  <rharinath@novell.com>
+
+       * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
+       Add a 'complain' parameter to silence errors.
+       (Attribute.Resolve): Update to changes.  Put in sanity check to catch
+       silently overlooked type-resolutions.
+       (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
+       to reflect changes.
+       (Attributes.Search): New function.
+       (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
+       (Attributes.GetAttributeFullName): Remove hack.
+       * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
+       Update to reflect changes.
+       * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
+       Use Attributes.Search instead of nested loops.
+
+2004-05-07  Marek Safar  <marek.safar@seznam.cz>
+
+       * decl.cs:
+       (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
+       (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
+       (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
+
+       * report.cs: (Report.Warning): Renamed to Warning_T because of
+       parameter collision.
+
+2004-05-05  Raja R Harinath  <rharinath@novell.com>
+
+       * expression.cs (MemberAccess.ResolveMemberAccess):
+       Exit with non-zero status after Report.Error.
+       * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
+       Likewise.
+       * typemanager.cs (TypeManager.CoreLookupType): Likewise.
+
+2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * support.cs: Don't hang when the file is empty.
+
+2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * support.cs: In SeekableStreamReader, compute the preamble size of the
+         underlying stream. Position changes should take into account that initial
+         count of bytes.
+
+2004-05-03  Todd Berman  <tberman@sevenl.net>
+
+       * driver.cs: remove unused GetSysVersion function.
+
+2004-05-03  Todd Berman  <tberman@sevenl.net>
+
+       * driver.cs: Remove the hack from saturday, as well as the hack
+       from jackson (LoadAssemblyFromGac), also adds the CWD to the
+       link_paths to get that bit proper.
+
+2004-05-01  Todd Berman  <tberman@sevenl.net>
+
+       * driver.cs: Try a LoadFrom before a Load, this checks the current
+       path. This is currently a bug in mono that is be fixed, however, this
+       provides a workaround for now. This will be removed when the bug
+       is fixed.
+
+2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * CryptoConvert.cs: Updated to latest version. Fix issue with 
+       incomplete key pairs (#57941).
+
+2004-05-01  Todd Berman  <tberman@sevenl.net>
+
+       * driver.cs: Remove '.' from path_chars, now System.* loads properly
+       from the GAC
+
+2004-04-30  Jackson Harper  <jackson@ximian.com>
+
+       * codegen.cs: Open keys readonly.
+       
+2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * typemanager.cs: don't report cyclic struct layout when a struct
+       contains 2 or more fields of the same type. Failed for Pango.AttrShape
+       which has 2 Pango.Rectangle fields.
+
+2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
+
+       * expression.cs: Handle IntPtr comparisons with IL code
+       rather than a method call.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
+       the list of PropertyInfo's in class hierarchy and find the
+       accessor.  Fixes #56013.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
+
+       * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (ConstructorInitializer.Resolve): Check whether the
+       parent .ctor is accessible.  Fixes #52146.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
+
+       * statement.cs (Using.EmitLocalVariableDecls): Use
+       TypeManager.idisposable_type, not typeof (IDisposable).
+       (Foreach.EmitCollectionForeach): Added support for valuetypes.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (Event.Define): Don't emit the field and don't set
+       RTSpecialName and SpecialName for events on interfaces.  Fixes
+       #57703. 
+
+2004-04-29  Raja R Harinath  <rharinath@novell.com>
+
+       Refactor Attribute.ApplyAttributes.
+       * attribute.cs (Attributable): New base class for objects that can
+       have Attributes applied on them.
+       (Attribute): Make AttributeUsage fields public.
+       (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
+       (Attribute.IsInternalCall): New property.
+       (Attribute.UsageAttr): Convert to a public read-only property.
+       (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
+       (Attribute.ResolveType, Attribute.Resolve)
+       (Attribute.ScanForIndexerName): Update to reflect changes.
+       (Attribute.CheckAttributeTarget): Re-format.
+       (Attribute.ApplyAttributes): Refactor, to various
+       Attributable.ApplyAttributeBuilder methods.
+       * decl.cs (MemberCore): Make Attributable.
+       * class.cs (Accessor): Make Attributable.
+       (MethodData.ApplyAttributes): Use proper attribute types, not
+       attribute names.
+       (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
+       (TypeContainer.ApplyAttributeBuilder)
+       (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
+       (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
+       (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
+       (Operator.ApplyAttributeBuilder): New factored-out methods.
+       * const.cs (Const.ApplyAttributeBuilder): Likewise.
+       * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
+       * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
+       * parameter.cs (ParameterBase): New Attributable base class
+       that can also represent Return types.
+       (Parameter): Update to the changes.
+
+2004-04-29  Jackson Harper  <jackson@ximian.com>
+
+       * driver.cs: Prefer the corlib system version when looking for
+       assemblies in the GAC. This is still a hack, but its a better hack
+       now.
+       
+2004-04-29  Marek Safar  <marek.safar@seznam.cz>
+
+       * decl.cs, enum.cs: Improved error 3005 reporting.
+  
+       * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
+        (related_symbols): New private member for list of symbols
+       related to reported error/warning.
+        
+       * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       * ecore.cs (Expression.Constantify): If we're an enum and
+       TypeManager.TypeToCoreType() doesn't give us another type, use
+       t.UnderlyingSystemType.  Fixes #56178.  
+
+2004-04-29  Martin Baulig  <martin@ximian.com>
+
+       * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
+       interfaces and for each interface, only add members directly
+       declared in that interface.  Fixes #53255.
+
+2004-04-28  Martin Baulig  <martin@ximian.com>
+
+       * expression.cs (ConditionalLogicalOperator): Use a temporary
+       variable for `left' to avoid that we evaluate it more than once;
+       bug #52588.
+
+2004-04-28  Martin Baulig  <martin@ximian.com>
+
+       * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
+       `void[]' (CS1547).
+
+2004-04-28  Martin Baulig  <martin@ximian.com>
+
+       * statement.cs (LocalInfo.Resolve): Check whether the type is not
+       void (CS1547).
+
+       * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
+       whether the type is not void (CS1547).
+
+2004-04-28  Martin Baulig  <martin@ximian.com>
+
+       * expression.cs (Unary.DoResolveLValue): Override this and report
+       CS0131 for anything but Operator.Indirection.
+
+2004-04-28  Martin Baulig  <martin@ximian.com>
+
+       Committing a patch from Ben Maurer; see bug #50820.
+
+       * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
+       check for classes.
+
+       * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
+       classes.        
+
+2004-04-28  Martin Baulig  <martin@ximian.com>
+
+       Committing a patch from Ben Maurer; see bug #50820.
+
+       * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
+       check for classes.
+
+       * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
+       classes.        
+
 2004-04-28  Martin Baulig  <martin@ximian.com>
 
        * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
        for a named field or property, implicity convert it to the correct
        type.
 
->>>>>>> 1.1450
 2004-04-27  Raja R Harinath  <rharinath@novell.com>
 
        * statement.cs (Block.Block): Implicit blocks share
        parameter.
        Fixes #56442.
 
+2004-04-08  Martin Baulig  <martin@ximian.com>
+
+       Merged latest changes into gmcs.  Please keep this comment in
+       here, it makes it easier for me to see what changed in MCS since
+       the last time I merged.
+
 2004-04-16  Raja R Harinath  <rharinath@novell.com>
 
        * class.cs (TypeContainer.AddIndexer): Use