* Makefile: Install mcs.exe.config file together with mcs.exe.
[mono.git] / mcs / mcs / ChangeLog
index cc3f71a224eeb32e82c1254cc57275d9576400b2..d440662ead6503535b8ed090a652ca5579c742c2 100755 (executable)
@@ -1,3 +1,423 @@
+2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * Makefile: Install mcs.exe.config file together with mcs.exe.
+       * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
+       correct runtime version.
+       
+2004-07-25  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-07-25  Martin Baulig  <martin@ximian.com>
+
+       * class.cs
+       (TypeContainer.RegisterOrder): Removed, this was unused.
+       (TypeContainer, interface_order): Removed.
+       (TypeContainer.AddClass, AddStruct, AddInterface): Take a
+       TypeContainer as argument since we can also be called with a
+       `PartialContainer' for a partial class/struct/interface.
+       (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
+       of checking whether we're an `Interface' - we could be a
+       `PartialContainer'.
+       (PartialContainer.Register): Override; call
+       AddClass()/AddStruct()/AddInterface() on our parent.
+
+       * cs-parser.jay (interface_member_declaration): Add things to the
+       `current_container', not the `current_class'.
+
+       * rootcontext.cs (RegisterOrder): The overloaded version which
+       takes an `Interface' was unused, removed.
+
+       * typemanager.cs (TypeManager.LookupInterface): Return a
+       `TypeContainer', not an `Interface'.
+       (TypeManager.IsInterfaceType): The `builder_to_declspace' may
+       contain a `PartialContainer' for an interface, so check it's
+       `Kind' to figure out what it is.
+
+2004-07-25  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (Class.DefaultTypeAttributes): New public constant.
+       (Struct.DefaultTypeAttributes): Likewise.
+       (Interface.DefaultTypeAttributes): Likewise.
+       (PartialContainer.TypeAttr): Override this and add the
+       DefaultTypeAttributes.
+
+2004-07-25  Martin Baulig  <martin@ximian.com>
+
+       * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
+       we can just use the `Parent' field instead.
+
+2004-07-25  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (TypeContainer.Emit): Renamed to EmitType().
+
+2004-07-25  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
+       our parts before defining any methods.
+       (TypeContainer.VerifyImplements): Make this virtual.
+       (ClassPart.VerifyImplements): Override and call VerifyImplements()
+       on our PartialContainer.
+
+2004-07-25  Martin Baulig  <martin@ximian.com>
+
+       * iterators.cs (Iterator.Define): Renamed to DefineIterator().
+
+       * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
+       argument, we can just use the `Parent' field instead.
+
+       * class.cs
+       (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
+       (MemberBase.DoDefine): Likewise.
+
+2004-07-24  Martin Baulig  <martin@ximian.com>
+
+       * decl.cs (MemberCore.Parent): New public field.
+       (DeclSpace.Parent): Moved to MemberCore.
+
+       * class.cs (MethodCore.ds): Removed; use `Parent' instead.
+       (MemberBase.ctor): Added TypeContainer argument, pass it to our
+       parent's .ctor.
+       (FieldBase, Field, Operator): Likewise.
+       (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
+       (EventField, Event): Likewise.
+
+2004-07-23  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (PartialContainer): New public class.
+       (ClassPart): New public class.
+       (TypeContainer): Added support for partial classes.
+       (TypeContainer.GetClassBases): Splitted some of the functionality
+       out into GetNormalBases() and GetPartialBases().
+
+       * cs-tokenizer.cs (Token.PARTIAL): New token.
+       (Tokenizer.consume_identifier): Added some hacks to recognize
+       `partial', but only if it's immediately followed by `class',
+       `struct' or `interface'.
+
+       * cs-parser.jay: Added support for partial clases.
+
+2004-07-23  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
+       a `DeclSpace' and also made it readonly.
+       (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
+       (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
+       (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
+
+       * cs-parser.jay: Pass the `current_class', not the
+       `current_container' (at the moment, this is still the same thing)
+       to a new Method, Property, Event, Indexer or Constructor.
+
+2004-07-23  Martin Baulig  <martin@ximian.com>
+
+       * cs-parser.jay (CSharpParser): Added a new `current_class' field
+       and removed the `current_interface' one.
+       (struct_declaration, class_declaration, interface_declaration):
+       Set `current_class' to the newly created class/struct/interface;
+       set their `Bases' and call Register() before parsing their body.
+
+2004-07-23  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (Kind): New public enum.
+       (TypeContainer): Made this class abstract.
+       (TypeContainer.Kind): New public readonly field.
+       (TypeContainer.CheckDef): New public method; moved here from
+       cs-parser.jay.
+       (TypeContainer.Register): New public abstract method.
+       (TypeContainer.GetPendingImplementations): New public abstract
+       method.
+       (TypeContainer.GetClassBases): Removed the `is_class' and
+       `is_iface' parameters.
+       (TypeContainer.DefineNestedTypes): Formerly known as
+       DoDefineType().
+       (ClassOrStruct): Made this class abstract.
+
+       * tree.cs (RootTypes): New public type. 
+
+2004-07-20  Martin Baulig  <martin@ximian.com>
+
+       * tree.cs (Tree.RecordNamespace): Removed.
+       (Tree.Namespaces): Removed.
+
+       * rootcontext.cs (RootContext.IsNamespace): Removed.
+
+       * cs-parser.jay (namespace_declaration): Just create a new
+       NamespaceEntry here.
+
+2004-07-20  Martin Baulig  <martin@ximian.com>
+
+       * statement.cs (ExceptionStatement): New abstract class.  This is
+       now used as a base class for everyone who's using `finally'.
+       (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
+       our local variables before using them.
+
+       * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
+       virtual method.  This is used by Yield.Resolve() to "steal" an
+       outer block's `finally' clauses.
+       (FlowBranchingException): The .ctor now takes an ExceptionStatement
+       argument.
+
+       * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
+       version which takes an ExceptionStatement.  This version must be
+       used to create exception branchings.
+
+       * iterator.cs
+       (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
+       (Iterator.EmitMoveNext): Added exception support; protect the
+       block with a `fault' clause, properly handle 'finally' clauses.
+       (Iterator.EmitDispose): Run all the `finally' clauses here.
+
+2004-07-20  Martin Baulig  <martin@ximian.com>
+
+       * iterator.cs: This is the first of a set of changes in the
+       iterator code.  Match the spec more closely: if we're an
+       IEnumerable, then GetEnumerator() must be called.  The first time
+       GetEnumerator() is called, it returns the current instance; all
+       subsequent invocations (if any) must create a copy.
+
+2004-07-19  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs: Resolve the constant expression before returning
+       it. 
+
+2004-07-19  Martin Baulig  <martin@ximian.com>
+
+       * iterators.cs (Iterator.MapVariable): Don't define fields twice.
+       (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
+       the return type of the new EmitContext.
+
+2004-07-18  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (Property.Define): Fix iterators.
+
+       * iterators.cs (Iterator.Define): Moved the
+       `container.AddInterator (this)' call here from the .ctor; only do
+       it if we resolved successfully.
+
+2004-07-17  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
+       `true' for preprocessing directives that we parse.  The return
+       value indicates whether we should return to regular tokenizing or
+       not, not whether it was parsed successfully.
+
+       In the past if we were in: #if false ... #line #endif, we would
+       resume parsing after `#line'.  See bug 61604.
+
+       * typemanager.cs: Removed an old hack from Gonzalo to get corlib
+       building: IsEnumType should return true only for enums, not for
+       enums or System.Enum itself.  This fixes #61593.
+
+       Likely what happened is that corlib was wrong: mcs depended on
+       this bug in some places.  The bug got fixed, we had to add the
+       hack, which caused bug 61593.
+
+       * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
+       that was a workaround for the older conditions.
+
+2004-07-16  Ben Maurer  <bmaurer@ximian.com>
+
+       * assign.cs: IAssignMethod has a new interface, as documented
+       inline. All assignment code now uses this new api.
+
+       * ecore.cs, expression.cs: All classes which implement
+       IAssignMethod now use the new interface.
+
+       * expression.cs (Invocation): add a hack to EmitCall so that
+       IndexerAccess can be the target of a compound assignment without
+       evaluating its arguments twice.
+
+       * statement.cs: Handle changes in Invocation api.
+
+2004-07-16  Martin Baulig  <martin@ximian.com>
+
+       * iterators.cs: Rewrote this.  We're now using one single Proxy
+       class for both the IEnumerable and the IEnumerator interface and
+       `Iterator' derives from Class so we can use the high-level API.
+
+       * class.cs (TypeContainer.AddIterator): New method.
+       (TypeContainer.DoDefineType): New protected virtual method, which
+       is called from DefineType().
+       (TypeContainer.DoDefineMembers): Call DefineType() and
+       DefineMembers() on all our iterators.
+       (TypeContainer.Emit): Call Emit() on all our iterators.
+       (TypeContainer.CloseType): Call CloseType() on all our iterators.
+
+       * codegen.cs (EmitContext.CurrentIterator): New public field.
+
+2004-07-15  Martin Baulig  <martin@ximian.com>
+
+       * typemanager.cs
+       (TypeManager.not_supported_exception_type): New type.   
+
+2004-07-14  Martin Baulig  <martin@ximian.com>
+
+       * iterators.cs: Use real error numbers.
+
+2004-07-14  Martin Baulig  <martin@ximian.com>
+
+       * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
+       requires this to be a System.Collection.IEnumerable and not a
+       class implementing that interface.
+       (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
+
+2004-07-13  Marek Safar  <marek.safar@seznam.cz>
+
+       * class.cs: Fixed previous fix, it broke some error tests.
+
+2004-07-12  Martin Baulig  <martin@ximian.com>
+
+       * enum.cs (Enum.Define): Call Emit() to emit the attributes.
+       Fixes #61293.
+
+2004-07-09  Miguel de Icaza  <miguel@ximian.com>
+
+       * assign.cs (LocalTemporary): Add new argument: is_address,If
+       `is_address' is true, then the value that we store is the address
+       to the real value, and not the value itself.
+       
+       * ecore.cs (PropertyExpr): use the new local temporary
+       stuff to allow us to handle X.Y += z (where X is a struct)
+
+2004-07-08  Martin Baulig  <martin@ximian.com>
+
+       * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
+       not always return, just like we're doing in Using.Resolve().
+
+2004-07-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay (fixed_statement): flag this as Pinned.
+
+2004-07-06  Miguel de Icaza  <miguel@ximian.com>
+
+       * typemanager.cs (TypeManager): Removed MakePinned method, this
+       mechanism is replaced with the .NET 2.x compatible mechanism of
+       calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
+
+       * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
+       Rename `Fixed' to `Pinned' as a flag, to distinguish from the
+       `IsFixed' property which has a different meaning.
+
+2004-07-02  Raja R Harinath  <rharinath@novell.com>
+
+       * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
+       visible from inside a nested class, not just the names of the
+       immediately enclosing class.
+       Fix for bug #60730.
+
+2004-06-24  Raja R Harinath  <rharinath@novell.com>
+
+       * expression.cs (BetterConversion): Remove buggy special-case
+       handling of "implicit constant expression conversions".  At this
+       point, we already know that the conversion is possible -- we're
+       only checking to see which is better.
+
+2004-06-24  Marek Safar  <marek.safar@seznam.cz>
+
+       * cs-parser.jay: Added error CS0210 test.
+
+2004-06-24  Marek Safar  <marek.safar@seznam.cz>
+
+       * cs-parser.jay: Added error CS0134 test.
+
+2004-06-24  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix bug #52507
+       * cs-parser.jay: Added error CS0145 test.
+
+2004-06-24  Marek Safar  <marek.safar@seznam.cz>
+
+       * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
+
+2004-06-23  Ben Maurer  <bmaurer@ximian.com>
+       
+       * expression.cs (StackAlloc.Resolve): The argument may not
+       be a constant; deal with this case.
+       
+2004-06-23  Marek Safar  <marek.safar@seznam.cz>
+
+       * attribute.cs (IndexerName_GetIndexerName): Renamed to
+       GetIndexerAttributeValue.
+       (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
+
+       * class.cs (Indexer.Define): Added error tests for CS0415,
+       CS0609.
+
+2004-06-23  Miguel de Icaza  <miguel@ximian.com>
+
+       * attribute.cs (Attribute.Resolve): Keep field code in sync with
+       property code.
+
+2004-06-23  Martin Baulig  <martin@ximian.com>
+
+       * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
+       neither return nor throw, reset the barrier as well.  Fixes #60457.
+
+2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * class.cs : EventAttributes is now set to None by default.
+         This fixes bug #60459.
+
+2004-06-18  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix bug #60219
+       * class.cs (ConstructorInitializer.GetOverloadedConstructor):
+       Don't throw exception but return null (it's sufficient now).
+
+2004-06-18  Marek Safar  <marek.safar@seznam.cz>
+
+       * typemanager.cs (GetArgumentTypes): Faster implementation.
+
+2004-06-18  Martin Baulig  <martin@ximian.com>
+
+       * attribute.cs (Attribute.Resolve): Check whether we're an
+       EmptyCast which a Constant child.  Fixes #60333.
+
+2004-06-17  Ben Maurer  <bmaurer@ximian.com>
+
+       * statement.cs (EmitCollectionForeach): Account for the fact that
+       not all valuetypes are in areas which we can take the address of.
+       For these variables, we store to a temporary variable. Also, make
+       sure that we dont emit a `callvirt' on a valuetype method.
+
+2004-06-15  Marek Safar  <marek.safar@seznam.cz>
+
+       * expression.cs (StackAlloc.DoReSolve): Added test for
+       negative parameter (CS0247).
+
+2004-06-15  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix bug #59792
+       * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
+
+2004-06-15  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix bug #59781
+       * expression.cs: (Binary.DoNumericPromotions): Added conversion for
+       ulong.
+
+2004-06-14  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix bug #58254 & cs1555.cs, cs1556.cs
+       * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
+
+2004-06-14  Marek Safar  <marek.safar@seznam.cz>
+
+       * cs-parser.jay: Added error CS1669 test for indexers.
+
+2004-06-11  Martin Baulig  <martin@ximian.com>
+
+       * expression.cs (Invocation.IsParamsMethodApplicable): We need to
+       call this twice: for params and varargs methods.
+
+2004-06-11  Marek Safar  <marek.safar@seznam.cz>
+
+       * class.cs:
+       (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
+
 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
 
        * attribute.cs (Attribute.GetValidTargets): Made public.
        CS1667 report.
        (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
 
-2004-06-04  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-06-11  Raja R Harinath  <rharinath@novell.com>
 
        Fix bug #59477.