2002-03-06 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / mcs / ChangeLog
index 37236059cc296e93b840573b6e539cc30bec17d2..4d12b33586c8fb41b3868d068df534dbb90f0c1b 100755 (executable)
@@ -1,5 +1,933 @@
+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
+       statement (string handling).
+
+       * expression.cs (StringPtr): New class used to return a char * to
+       a string;  Used by the Fixed statement.
+
+       * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
+
+       * expression.cs (Binary.ResolveOperator): Remove redundant
+       MemberLookup pn parent type.
+       Optimize union call, we do not need a union if the types are the same.
+       (Unary.ResolveOperator): REmove redundant MemberLookup on parent
+       type.
+
+       Specialize the use of MemberLookup everywhere, instead of using
+       the default settings. 
+
+       (StackAlloc): Implement stackalloc keyword.
+
+       * cs-parser.jay: Add rule to parse stackalloc.
+       
+       * driver.cs: Handle /h, /help, /?
+
+       * expression.cs (MakeByteBlob): Removed the hacks we had in place
+       before we supported unsafe code.
+       
+       * makefile: add --unsafe to the self compilation of mcs.
+
+2002-02-20  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (PointerArithmetic): New class that is used to
+       perform pointer arithmetic.
+       (Binary.Resolve): Handle pointer arithmetic
+       Handle pointer comparission.
+       (ArrayPtr): Utility expression class that is used to take the
+       address of an array.
+
+       (ElementAccess): Implement array access for pointers
+       
+       * statement.cs (Fixed): Implement fixed statement for arrays, we
+       are missing one more case before we are done.
+
+       * expression.cs (Indirection): Implement EmitAssign and set the
+       ExprClass to Variable.  This allows pointer dereferences to be
+       treated as variables, and to have values assigned to them.
+       
+       * ecore.cs (Expression.StoreFromPtr): New utility function to
+       store values dereferencing.
+
+2002-02-20  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (Binary.ResolveOperator): Ensure that we are
+       not trying to operate on a void type - this fixes the reported
+       bug.
+
+       * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
+       the parent implementation is sealed.
+
+       * ../errors/cs0239.cs : Add.
+
+       * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
+
+       * typemanager.cs (unverifiable_code_type): Corresponds to 
+       System.Security.UnverifiableCodeAttribute. We need to emit this for modules
+       which have unsafe code in them.
+
+       * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
+       unsafe context.
+
+2002-02-19  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-tokenizer.cs: Add support for @"litreal strings"
+
+       Make tokenizer accept pre-processor directives
+       on any column (remove the old C-like limitation). 
+
+       * rootcontext.cs (EmitCode): Emit any global attributes.
+       (AddGlobalAttributes): Used to keep track of assembly attributes. 
+
+       * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
+
+       * cs-parser.jay: Add support for global attributes.  
+
+2002-02-17  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (Indirection): New helper class.  Unary will
+       create Indirection classes to be able to implement the
+       IMemoryLocation interface on it.
+
+2002-02-16  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay (fixed_statement): reference the right statement.
+
+       * statement.cs (Fixed.Emit): Finish implementing the fixed
+       statement for the &x case.
+
+2002-02-14  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (Property.Define, Method.Define): Remove newslot when
+       `implementing'.  
+
+       * modifiers.cs: My use of NewSlot when `Abstract' was set was
+       wrong.  NewSlot should only be used if the `new' keyword is present.
+
+       * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
+       locating our system dir.  Sorry about this.
+
+2002-02-13  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs (GetSystemDir): Compute correctly the location of our
+       system assemblies.  I was using the compiler directory instead of
+       the library directory.
+
+2002-02-13  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (BetterFunction): Put back in what Miguel commented out
+       since it is the correct fix. The problem is elsewhere ;-)
+
+       (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
+       parameters of the parms method are themselves compatible or not !
+
+       (StandardConversionExists): Fix very dangerous bug where we were forgetting
+       to check that a class implements an interface before saying that an implicit
+       conversion was allowed. Use ImplementsInterface to do the checking.
+
+2002-02-13  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (Method.Define): Track whether we are an explicit
+       implementation or not.  And only call DefineMethodOverride if we
+       are an explicit implementation.
+
+       (Property.DefineMethod): Ditto.
+
+2002-02-11  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (BetterFunction): Catch hideous bug which was
+        preventing us from detecting ambiguous calls due to implicit casts i.e
+       cs0121.
+
+2002-01-29  Miguel de Icaza  <miguel@ximian.com>
+
+       * support.cs (Pair): Remove un-needed method.  I figured why I was
+       getting the error in cs-parser.jay, the variable in a foreach loop
+       is readonly, and the compiler does not really treat this as a variable.
+
+       * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
+       instead of EQUALS in grammar.  
+
+       * typemanager.cs (VerifyUnmanaged): Report correct error (208)
+
+       * expression.cs (Unary.DoResolve): Check whether the argument is
+       managed or not.
+
+2002-01-28  Miguel de Icaza  <miguel@ximian.com>
+
+       * support.cs: Api for Pair to set a value.  Despite the fact that
+       the variables are public the MS C# compiler refuses to compile
+       code that accesses the field if the variable is part of a foreach
+       statement. 
+
+       * statement.cs (Fixed): Begin implementation of the fixed
+       statement.
+
+       (Block.AddVariable): Return the VariableInfo on success and null
+       on failure instead of true/false. 
+
+       * cs-parser.jay (foreach): Catch errors on variables already
+       defined (we were ignoring this value before) and properly unwind
+       the block hierarchy
+
+       (fixed_statement): grammar for the fixed statement.
+
+2002-01-25  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
+       pointer types to be incretemented.
+
+       (SizeOf): Implement.
+
+       * cs-parser.jay (pointer_member_access): Implement
+       expr->IDENTIFIER production.
+
+       * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
+       MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
+       on safe contexts.
+
+       (Unary): Implement indirection.
+
+       * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
+       use in non-unsafe context).
+
+       (SimpleName.DoResolve): Check for pointers in field access on safe
+       contexts. 
+
+       (Expression.LoadFromPtr): Factor the load-indirect code in this
+       function.  This was duplicated in UnboxCast and ParameterReference
+
+2002-01-24  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (ComposedCast): report an error if a pointer cast
+       is used in a safe region.
+
+       * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
+       pointer type casts in unsafe context.
+
+       * codegen.cs (EmitContext): Set up IsUnsafe.
+
+       * cs-parser.jay (non_expression_type): Add productions for pointer
+       casts. 
+
+       * expression.cs (Invocation.EmitCall): Remove chunk of buggy
+       code.  We should not use force into static mode if the method is
+       not virtual.  Fixes bug in MIS
+
+       * statement.cs (Do.Emit, While.Emit, For.Emit,
+       Statement.EmitBoolExpression): Add support to Do and While to
+       propagate infinite loop as `I do return' semantics.
+
+       Improve the For case to also test for boolean constants.
+
+       * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
+       to the list of attributes we can add.
+
+       Remove `EmitContext' argument.
+
+       * class.cs (Method.Define): Apply parameter attributes.
+       (Constructor.Define): Apply parameter attributes.
+       (MethodCore.LabelParameters): Move here the core of labeling
+       parameters. 
+
+       * support.cs (ReflectionParameters.ParameterModifier,
+       InternalParameters.ParameterModifier): Use IsByRef on the type and
+       only return the OUT bit for these parameters instead of in/out/ref
+       flags.
+
+       This is because I miss-understood things.  The ParameterInfo.IsIn
+       and IsOut represent whether the parameter has the [In] and [Out]
+       attributes set.  
+
+2002-01-22  Miguel de Icaza  <miguel@ximian.com>
+
+       * ecore.cs (FieldExpr.Emit): Release temporaries.
+
+       * assign.cs (LocalTemporary.Release): new function.
+
+       * codegen.cs (EmitContext.GetTemporaryStorage,
+       EmitContext.FreeTemporaryStorage): Rework the way we deal with
+       temporary storage.  Now we can "put back" localbuilders when we
+       are done with them
+
+2002-01-21  Miguel de Icaza  <miguel@ximian.com>
+
+       * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
+       need to make a copy of the variable to generate verifiable code.
+
+2002-01-19  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs: Compute dynamically the system directory.
+
+       * ecore.cs (CopyNewMethods): reworked, exposed, made public.
+       Slower, but more generally useful.  Used by the abstract
+       registering implementation. 
+
+       * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
+       the rules for the special rule on Type/instances.  First check if
+       we have the same name, and if so, try that special static path
+       rather than the instance path.
+       
+2002-01-18  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay: Emit 642 (warning: possible empty statement) for
+       for, while and if.
+
+       * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
+       Enum, ValueType, Delegate or Array for non-corlib compiles.
+
+       * cs-tokenizer.cs: Catch long identifiers (645)
+
+       * typemanager.cs (IndexerPropetyName): Ravi never tested this
+       piece of code.
+
+       * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
+       fix, we were returning too early, so we were not registering
+       pending methods from abstract classes.
+
+       Do not register pending methods if the class is abstract.
+
+       * expression.cs (Conditional.DoResolve): Report circular implicit
+       conversions when we neecd to compute it for conditional
+       expressions. 
+
+       (Is.DoResolve): If the expression is always of the provided type,
+       flag warning 183.  If the expression can not ever be of the
+       provided type flag warning 184.
+
+       * class.cs: Catch 169 as well.
+
+       * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
+       read. 
+
+2002-01-18  Nick Drochak  <ndrochak@gol.com>
+
+       * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
+
+2002-01-17  Miguel de Icaza  <miguel@ximian.com>
+
+       * interface.cs: (PopulateMethod): Check for pointers being defined
+       only if the unsafe context is active.
+       (PopulateProperty): ditto.
+       (PopulateIndexer): ditto.
+
+       * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
+       specified.  If pointers are present, make sure that they are
+       present in an unsafe context.
+       (Constructor, Constructor.Define): ditto.
+       (Field, Field.Define): ditto.
+       (Property, Property.Define): ditto.
+       (Event, Event.Define): ditto.
+
+       * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
+       hashtable if there are classes or structs defined.
+
+       * expression.cs (LocalVariableReference.DoResolve): Simplify this
+       code, as the constant resolution moved.
+
+       * statement.cs (Block.EmitMeta): Resolve all constants as we emit
+       the metadata, so we can flag error 133. 
+
+       * decl.cs (MemberCore.UnsafeOK): New function to test that a
+       pointer is being declared in an unsafe context.
+
+2002-01-16  Miguel de Icaza  <miguel@ximian.com>
+
+       * modifiers.cs (Modifiers.Check): Require a Location argument.
+       Report error 227 for Unsafe use.
+
+       * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
+
+       * statement.cs (For.Emit): If the test is null, then report that
+       we do `return', as we wont reach anything afterwards.
+
+       (Switch.SwitchGoverningType): Track the expression that matched
+       the conversion.
+
+       * driver.cs: Allow negative numbers as an error code to flag.
+
+       * cs-parser.jay: Handle 1551.
+
+       * namespace.cs: Add 1537 checking (repeated using alias namespaces).
+
+2002-01-15  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay: Report 1518 (type declaration can only contain
+       class, struct, interface, enum or delegate)
+
+       (switch_label): Report 1523 (keywords `case' or `default' must
+       preced code)
+
+       (opt_switch_sections): Report 1522 (empty switch)
+
+       * driver.cs: Report 1515 (response file specified multiple times)
+       Report 1516 (Source file specified multiple times).
+
+       * expression.cs (Argument.Resolve): Signal 1510
+
+       (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
+       access not allowed in static code)
+
+2002-01-11  Ravi Pratap  <ravi@ximian.com>
+
+       * typemanager.cs (IsPointerType): Utility method which we are going
+       to need a lot.
+
+       * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
+       the object type, so we take care of that.
+
+       * expression.cs (FullMethodDesc): Also include the return type in descriptions.
+       
+       * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
+       added to non-params parameters :-)
+
+       * typemanager.cs (CSharpName): Include 'void' type too. 
+
+       (void_ptr_type): Include in the set of core types.
+
+       * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
+       duplicating code.
+
+       (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
+       an unsafe context.
+
+       * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
+       completely forgotten about it.
+
+2002-01-10  Ravi Pratap  <ravi@ximian.com>
+
+       * cs-parser.jay (pointer_type): Add. This begins our implementation
+       of parsing rules for unsafe code.
+
+       (unsafe_statement): Implement.
+
+       (embedded_statement): Modify to include the above.
+
+       * statement.cs (Unsafe): Implement new class for unsafe blocks.
+
+       * codegen.cs (EmitContext.InUnsafe): Add. This determines
+       if the current context is an unsafe one.
+
+       * cs-parser.jay (local_variable_pointer_type): Since local variable types
+       are handled differently, we need separate rules for them.
+
+       (local_variable_declaration): Update to use local_variable_pointer_type
+       to allow variable declarations of unmanaged pointer types.
+
+       * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
+       in unsafe contexts.
+
+       * ../errors/cs0214.cs : Add.
+
+2002-01-16  Nick Drochak  <ndrochak@gol.com>
+
+       * makefile: remove 'response' file when cleaning.
+
+2002-01-15  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-parser.jay: Report 1524.
+
+2002-01-14  Miguel de Icaza  <miguel@ximian.com>
+
+       * typemanager.cs (RegisterMethod): drop checking if we have
+       registered this from here
+
+2002-01-12  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs (Method.EmitDestructor): Implement calling our base
+       destructor. 
+
+       * statement.cs (Try.Emit): Fix to reset the InFinally to the old
+       value of InFinally.
+
+       * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
+       this routine and will wrap the call in a try/catch block.  Deal
+       with the case.
+
+2002-01-11  Miguel de Icaza  <miguel@ximian.com>
+
+       * ecore.cs (Expression.MemberLookup): instead of taking a
+       parameter `same_type' that was used to tell whether we could
+       access private members we compute our containing type from the
+       EmitContext.
+
+       (FieldExpr): Added partial support for volatile fields.  This does
+       not work for volatile fields exposed from assemblies, as I can not
+       figure out how to extract the modreq from it.
+
+       Updated all the source files to use this.
+
+       * codegen.cs (EmitContext): Compute ContainerType ahead of time,
+       because it is referenced by MemberLookup very often. 
+
+2002-01-09  Ravi Pratap  <ravi@ximian.com>
+
+       * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
+       TypeBuilder.GetCustomAttributes to retrieve what we need.
+
+       Get rid of redundant default_member_attr_type as this is the same as
+       default_member_type which already exists.
+
+       * interface.cs, attribute.cs : Update accordingly.
+       
+2002-01-08  Miguel de Icaza  <miguel@ximian.com>
+
+       * typemanager.cs: Enable IndexerPropertyName again.  It does not
+       work for TYpeBuilders though.  Ravi, can you please fix this?
+
+       * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
+
+       * expression.cs (Argument.Emit): Handle the case of ref objects
+       being passed to ref functions;  
+
+       (ParameterReference.EmitLoad): Loads the content of the pointer
+       without dereferencing.
+
+2002-01-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-tokenizer.cs: Implemented the pre-processing expressions.
+
+2002-01-08  Ravi Pratap  <ravi@ximian.com>
+
+       * class.cs (Indexer.DefineMethod): Incorporate the interface
+       type in the name of the method if we are doing explicit interface
+       implementation.
+
+       * expression.cs (ConversionExists): Remove as it is completely obsolete.
+
+       (BetterConversion): Fix extremely trivial bug where we were referring to
+       ConversionExists instead of StandardConversionExists ! Hooray, things are fine
+       again !
+
+       * ../errors/bug16.cs : Add although we have fixed it.
+
+2002-01-07  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (BaseIndexer): Begin implementation.
+
+       * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
+
+       * cs-parser.jay (indexer_declarator): Use qualified_identifier
+       production directly to remove a shift/reduce, and implement
+       explicit interface implementation.
+
+       * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
+       after a floating point suffix.
+
+       * expression.cs (DoNumericPromotions): Improved the conversion for
+       uint/uint.  If we have a constant, we avoid doing a typecast to a
+       larger type.
+
+       * class.cs (Indexer): Implement explicit interface implementation
+       for indexers.
+       
+Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
+
+       * class.cs: make the default instance constructor public and hidebysig.
+
+2001-01-03  Ravi Pratap  <ravi@ximian.com>
+
+       * interface.cs (EmitDefaultMemberAttr): Make this helper method static
+       so we can call it from elsewhere.
+
+       * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
+       we emit it internally if the class has a defined indexer; otherwise the user
+       emits it by decorating the class definition with the DefaultMemberAttribute.
+
+       * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
+       attribute is not used on a type which defines an indexer.
+
+       * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
+       character when we skip whitespace.
+
+       * ../errors/cs0646.cs : Add.
+
+2002-01-03  Miguel de Icaza  <miguel@ximian.com>
+
+       * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
+       again. 
+
+       * makefile: Add practical target `mcs3.exe' which builds the third
+       generation compiler. 
+
+       * expression.cs (New): Fix structures constructor calling.
+
+       * class.cs (Property, Method, Indexer): Emit Final flag on the
+       method if we are an interface implementation and we are not
+       abstract. 
+
+       * ecore.cs (PropertyExpr): New public field `IsBase', tells
+       whether this property is referencing a `base' method.
+
+       * expression.cs (Invocation.EmitCall): take an extra argument:
+       is_base, this is used to determine whether the `call' or
+       `callvirt' opcode should be used.
+
+       
+       * delegate.cs: update EmitCall.
+
+       * class.cs (Method.Define): Set NewSlot for the cases where we are
+       not implementing an interface method.
+
+       (Property.Define): ditto.
+
+2002-01-02  Miguel de Icaza  <miguel@ximian.com>
+
+       * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
+       'r'.  Allows mcs to parse itself fully.
+
+2002-01-02  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
+       of the number of initializers that require the InitializeArray method.
+
+       (CheckIndices): Store the Expression in all cases - not the plain value. Also
+       update the above field where necessary.
+
+       (MakeByteBlob): Update accordingly.
+
+       (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
+       greater than 2.
+
+       (EmitDynamicInitializers): Update in accordance with the new optimization.
+
+       (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
+       same OpCode applies.
+
+       * cs-parser.jay : Fix some glaring errors I introduced.
+
+2002-01-01  Ravi Pratap  <ravi@ximian.com> 
+
+       * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
+       so that we can check for name clashes there too.
+
+       * typemanager.cs (default_member_attr_type): The attribute that we need to emit
+       for interface indexers.
+
+       * interfaces.cs (Define): Emit the default member attribute.
+
+       * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
+       variable was being referred to while setting the value ;-)
+
+2002-01-01  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (MakeByteBlob): Optimize: we do not need to fill
+       byte-by-byte information when we know the data is zero.
+
+       Make the block always a multiple of 4, because
+       DefineInitializedData has a bug.
+
+       * assign.cs: Fix, we should assign from the temporary, not from
+       the source. 
+
+       * expression.cs (MakeByteBlob): Fix my incorrect code.
+
+2001-12-31  Miguel de Icaza  <miguel@ximian.com>
+
+       * typemanager.cs (EnumToUnderlying): This function is used to get
+       the underlying type from an enumeration, because it does not
+       always work. 
+
+       * constant.cs: Use the I4_S form for values between -128 and 127.
+
+       * statement.cs (Block.LookupLabel): Looks up a label.
+       (Block): Drop support for labeled blocks.
+
+       (LabeledStatement): New kind of statement that represents a label
+       only.
+
+       (Goto): Finally implement this bad boy.
+       
+       * cs-parser.jay: Update to reflect new mechanism to implement
+       labels.
+
+2001-12-30  Miguel de Icaza  <miguel@ximian.com>
+
+       * codegen.cs (EmitContext.This): a codegen property that keeps the
+       a single instance of this instead of creating many different this
+       instances. 
+
+       * delegate.cs (Delegate.DoResolve): Update to use the property;
+
+       * ecore.cs (SimpleName.SimpleNameResolve): Ditto
+
+       * expression.cs (BaseAccess.DoResolve): Ditto.
+
+2001-12-29  Ravi Pratap  <ravi@ximian.com>
+
+       * typemanager.cs (methodimpl_attr_type): Add to hold the type
+       corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
+
+       (InitCoreTypes): Update accordingly.
+
+       * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
+       so we can quickly store the state.
+
+       (ApplyAttributes): Set the correct implementation flags
+       for InternalCall methods.
+
 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
 
+       * expression.cs (EmitCall): if a method is not virtual, then do
+       not use callvirt on it.
+
+       (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
+       user defined stuff) requires the use of stobj, which takes an
+       address on the stack instead of an array and an index.  So emit
+       the Ldelema operation for it.
+
+       (EmitStoreOpcode): Use stobj for valuetypes.
+
+       (UnaryMutator.EmitCode): Use the right 1 value depending on
+       whether we are dealing with int64/uint64, float or doubles.
+
+       * class.cs (TypeContainer.AddConstructor): Fix the logic to define
+       constructors that I implemented last night.
+
+       (Constructor.IsDefault): Fix to work properly for static
+       constructors.
+
+       * cs-parser.jay (CheckDef): report method signature errors.
+       Update error number 103 to be 132.
+
+       * decl.cs: New AdditionResult enumeration value: MethodExists.
+       Although we do this check for methods later on in the semantic
+       analysis, catching repeated default constructors is so easy that
+       we catch these here. 
+       
        * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
        promotions code.