2002-03-06 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / mcs / ChangeLog
index b50cca386d5b97413708f59648b434fc23247473..4d12b33586c8fb41b3868d068df534dbb90f0c1b 100755 (executable)
@@ -1,3 +1,236 @@
+2002-03-06  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay: Add opt_semicolon to the interface declaration.
+
+       * expression.cs: Pass location information to
+       ConvertImplicitStandard. 
+
+       * class.cs: Added debugging code to track return values from
+       interfaces. 
+
+2002-03-05  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (Is.DoResolve): If either side of the `is' is an
+       interface, do not flag the warning.
+
+       * ecore.cs (ImplicitReferenceConversion): We need a separate test
+       for interfaces
+
+       * report.cs: Allow for --fatal to be used with --probe.
+       
+       * typemanager.cs (NoTypes): Move the definition for the empty Type
+       array here. 
+
+       * class.cs (TypeContainer.FindMembers): Also look for methods defined by
+       properties. 
+       (TypeContainer.DefineProxy): New function used to proxy to parent
+       implementations when implementing interfaces.
+       (TypeContainer.ParentImplements): used to lookup if our parent
+       implements a public function that is required by an interface.
+       (TypeContainer.VerifyPendingMethods): Hook this up.
+
+       * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
+       `modules' and `assemblies' arraylists into arrays.  We only grow
+       these are the very early start up of the program, so this improves
+       the speedof LookupType (nicely measured).
+
+       * expression.cs (MakeByteBlob): Replaced unsafe code with
+       BitConverter, as suggested by Paolo.
+
+       * cfold.cs (ConstantFold.Binary): Special case: perform constant
+       folding of string concatenation, but if either side is a string,
+       and the other is not, then return null, and let the runtime use
+       the concatenation on the string plus the object (using
+       `Object.ToString'). 
+
+2002-03-04  Miguel de Icaza  <miguel@ximian.com>
+
+       Constant Folding has been implemented now.
+       
+       * expression.cs (Unary.Reduce): Do not throw an exception, catch
+       the error instead on types that are not supported in one's
+       complement. 
+
+       * constant.cs (Constant and all children): New set of functions to
+       perform implict and explicit conversions.
+       
+       * ecore.cs (EnumConstant): Implement the new functions to perform
+       conversion by proxying to the child expression.
+
+       * codegen.cs: (ConstantCheckState): Constant evaluation has its
+       own separate setting that can not be turned off from the command
+       line using --unchecked or --checked and is only controlled using
+       the checked/unchecked statements and expressions.  This setting is
+       used by the constant folder to flag errors.
+
+       * expression.cs (CheckedExpr, UncheckedExpr): Set the
+       ConstantCheckState as well.   
+
+       During Resolve, they also have to flag the state, because the
+       constant folder runs completely in the Resolve phase.
+
+       * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
+       well.
+
+2002-03-01  Miguel de Icaza  <miguel@ximian.com>
+
+       * cfold.cs: New file, this file contains the constant folder.
+       
+       * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
+       argument to track whether we are using the resulting address to
+       load or store a value and provide better error messages. 
+
+       (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
+       new AddressOf arguments.
+
+       * statement.cs (Foreach.EmitCollectionForeach): Update
+
+       * expression.cs (Argument.Emit): Call AddressOf with proper
+       arguments to track usage.
+
+       (New.DoEmit): Call AddressOf with new arguments.
+
+       (Unary.Emit): Adjust AddressOf call.
+
+2002-03-01  Ravi Pratap  <ravi@ximian.com>
+
+       * cs-parser.jay (member_access): Change the case for pre-defined types
+       to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
+       this suggestion.
+
+       * class.cs (Operator::Emit): If we are abstract or extern, we don't have
+       a method body.
+
+       * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
+       essentially like methods and apply attributes like MethodImplOptions to them too.
+
+       * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
+       not being null.
+
+       * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
+       DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
+       is the DeclSpace.
+
+       * Update code everywhere accordingly.
+
+       * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
+
+       * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
+
+2002-02-28  Ravi Pratap  <ravi@ximian.com>
+
+       * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
+       try performing lookups against those instead of jumping straight into using
+       the 'using' clauses.
+
+       (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
+
+       (LookupType): Perform lookups in implicit parents too.
+
+       * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
+       sequence as RootContext.LookupType. 
+
+       * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
+       the various cases of namespace lookups into this method.
+
+2002-03-01  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay: Add support for [Attribute ()] (empty arguments
+       in positional arguments)
+
+       * class.cs (Operator): Update the AllowedModifiers to contain
+       extern. 
+
+       * cs-parser.jay: Update operator declaration to allow for the
+       operator body to be empty.
+
+       * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
+       values. 
+
+2002-02-27  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (Method.Emit): Label parameters.
+
+       * driver.cs: Return 1 or 0 as the program exit code.
+
+2002-02-26  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs: Special case the `null' object when trying to
+       auto-compute the type, as anything can be explicitly converted to
+       that. 
+
+       * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
+       spotting this Paolo.
+
+       (Expression.ImplicitNumericConversion): Perform comparissions of
+       the type using the underlying type in the case of an enumeration
+       rather than using the enumeration type for the compare.
+
+       Cope with the underlying == type case, which is not possible to
+       catch before. 
+
+       (Expression.ConvertNumericExplicit): Perform comparissions of
+       the type using the underlying type in the case of an enumeration
+       rather than using the enumeration type for the compare.
+
+       * driver.cs: If the user does not supply an extension, assume .exe
+
+       * cs-parser.jay (if_statement): Rewrote so that we can track the
+       location for the if statement.
+
+       * expression.cs (Binary.ConstantFold): Only concat strings when
+       the operation is "+", not everything ;-)
+
+       * statement.cs (Statement.EmitBoolExpression): Take a location
+       argument. 
+       (If, While, Do): Track location.
+
+       * expression.cs (Binary.ResolveOperator): In the object + string
+       case, I was missing a call to ConvertImplicit
+
+2002-02-25  Ravi Pratap  <ravi@ximian.com>
+
+       * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
+       Location arguments. Ensure we use RootContext.LookupType to do our work
+       and not try to do a direct Type.GetType and ModuleBuilder.GetType
+
+       * interface.cs (PopulateMethod): Handle the type of the parameter being
+       null gracefully.
+
+       * expression.cs (Invocation.BetterFunction): Handle the case when we 
+       have a params method with no fixed arguments and a call is made with no
+       arguments.
+
+2002-02-25  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-tokenizer.cs: Add support for the quote-escape-sequence in
+       the verbatim-string-literal
+
+       * support.cs (InternalParameters.ParameterModifier): handle null
+       fixed parameters.
+       (InternalParameters.ParameterType): ditto.
+
+       * parameter.cs (VerifyArgs): Also check if the fixed parameter is
+       duplicating the name of the variable parameter.
+       (GetParameterByName): Fix bug where we were not looking up array
+       paramters if they were the only present (thanks Paolo!).
+       (GetParameterInfo): We only have an empty set of types if both
+       fixed and array are set to null.
+       (GetParameterInfo-idx): Handle FixedParameter == null
+
+       * cs-parser.jay: Handle the case where there is no catch
+       statements (missing null test).
+
+2002-02-22  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs (MainDriver): Be conservative on our command line
+       handling.
+
+       Catch DirectoryNotFoundException when calling GetFiles.
+       
+       (SplitPathAndPattern): Used to split the input specification into
+       a path and a pattern that we can feed to Directory.GetFiles.
+
 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
 
        * statement.cs (Fixed): Implement the last case of the Fixed