2002-01-24 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / mcs / ChangeLog
index 431acb93f6b59b86562972199679dab704095ada..6c50c25cd1427142d8701be233c3ab3c596b8322 100755 (executable)
@@ -1,3 +1,951 @@
+2002-01-24  Miguel de Icaza  <miguel@ximian.com>
+
+       * 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.
+
+       (ParameterReference.EmitAssign, Emit): handle
+       bools as bytes.
+
+       (ArrayAccess.EmitLoadOpcode): Handle bool type here.
+       (ArrayAccess.EmitStoreOpcode): ditto.
+
+       * cs-tokenizer.cs (is_punct): Eliminated empty computation.
+
+       * expression.cs (MakeByteBlob): Complete all the missing types
+       (uint, short, ushort, byte, sbyte)
+
+       * class.cs: Only init instance field initializers on instance
+       constructors. 
+
+       Rename `constructors' to instance_constructors. 
+
+       (TypeContainer.AddConstructor): Only add constructors to the list
+       if it is not static.
+
+       Make sure that we handle default_static_constructor independently
+       everywhere where we handle instance_constructors
+
+2001-12-28  Miguel de Icaza  <miguel@ximian.com>
+
+       * class.cs: Do not lookup or create a base initializer for a
+       static constructor.
+
+       (ConstructorInitializer.Resolve): use the proper type to lookup
+       for constructors.
+
+       * cs-parser.jay: Report error 1585 (modifiers between type and name).
+
+       * enum.cs, interface.cs: Remove CloseType, this is taken care by
+       in DeclSpace. 
+
+       * decl.cs: CloseType is now an virtual method, the default
+       implementation just closes this type.
+       
+2001-12-28  Ravi Pratap  <ravi@ximian.com>
+
+       * attribute.cs (DefinePInvokeMethod): Set the implementation flags
+       to PreserveSig by default. Also emit HideBySig on such methods.
+
+       Basically, set the defaults to standard values.
+
+       * expression.cs (Invocation.BetterFunction): We need to make sure that for each
+       argument, if candidate is better, it can't be worse than the best !
+
+       (Invocation): Re-write bits to differentiate between methods being
+       applicable in their expanded form and their normal form - for params
+       methods of course.
+
+       Get rid of use_standard everywhere as only standard conversions are allowed
+       in overload resolution. 
+
+       More spec conformance.
+       
+2001-12-27  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs: Add --timestamp, to see where the compiler spends
+       most of its time.
+
+       * ecore.cs (SimpleName.DoResolve): Do not create an implicit
+       `this' in static code.
+
+       (SimpleName.DoResolve): Implement in terms of a helper function
+       that allows static-references to be passed upstream to
+       MemberAccess.
+
+       (Expression.ResolveWithSimpleName): Resolve specially simple
+       names when called by MemberAccess to implement the special
+       semantics. 
+
+       (Expression.ImplicitReferenceConversion): Handle conversions from
+       Null to reference types before others, as Null's type is
+       System.Object. 
+
+       * expression.cs (Invocation.EmitCall): Handle the special case of
+       calling methods declared on a reference type from a ValueType
+       (Base classes System.Object and System.Enum)
+
+       (MemberAccess.Resolve): Only perform lookups on Enumerations if
+       the left hand side is a TypeExpr, not on every enumeration. 
+
+       (Binary.Resolve): If types are reference types, then do a cast to
+       object on operators != and == of both arguments.
+       
+       * typemanager.cs (FindMembers): Extract instance and static
+       members if requested.
+
+       * interface.cs (PopulateProperty): Use void_type instead of null
+       as the return type for the setter method.
+
+       (PopulateIndexer): ditto.
+
+2001-12-27  Ravi Pratap  <ravi@ximian.com>
+
+       * support.cs (ReflectionParameters): Fix minor bug where we
+       were examining the wrong parameter for the ParamArray attribute.
+
+       Cope with requests for the type of the parameter at position
+       greater than the params parameter's. We now return the element
+       type of the params array as that makes more sense.
+
+       * expression.cs (Invocation.IsParamsMethodApplicable): Update 
+       accordingly as we no longer have to extract the element type
+       ourselves.
+
+       (Invocation.OverloadResolve): Update.
+
+2001-12-27  Miguel de Icaza  <miguel@ximian.com>
+
+       * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
+       against IEnumerator, test whether the return value is a descendant
+       of the IEnumerator interface.
+
+       * class.cs (Indexer.Define): Use an auxiliary method to implement
+       the other bits of the method definition.  Begin support for
+       explicit interface implementation.
+
+       (Property.DefineMethod): Use TypeManager.void_type instead of null
+       for an empty return value.
+
+2001-12-26  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (MemberAccess.ResolveMemberAccess): if we are
+       dealing with a FieldExpr which is composed of a FieldBuilder, in
+       the code path we did extract the constant, but we should have
+       obtained the underlying value to be able to cast it (otherwise we
+       end up in an infinite loop, this is what Ravi was running into).
+
+       (ArrayCreation.UpdateIndices): Arrays might be empty.
+
+       (MemberAccess.ResolveMemberAccess): Add support for section
+       14.5.4.1 that deals with the special case of E.I when E is a type
+       and something else, that I can be a reference to a static member.
+
+       (ArrayCreation.MakeByteBlob): It is not an error to not be able to
+       handle a particular array type to create byte blobs, it is just
+       something we dont generate byteblobs for.
+
+       * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
+       arguments. 
+
+       * location.cs (Push): remove the key from the hashtable that we
+       are about to add.   This happens for empty files.
+
+       * driver.cs: Dispose files after we have parsed them.
+
+       (tokenize): new function that only runs the tokenizer on its
+       input, for speed testing.
+
+2001-12-26  Ravi Pratap  <ravi@ximian.com>
+
+       * class.cs (Event.Define): Define the private field only if there
+       are no accessors defined.
+
+       * expression.cs (ResolveMemberAccess): If there is no associated
+       field with the event, that means we have an event defined with its
+       own accessors and we should flag error cs0070 since transforming
+       ourselves into a field is not valid in that case.
+
+       * ecore.cs (SimpleName.DoResolve): Same as above.
+
+       * attribute.cs (DefinePInvokeMethod): Set the default calling convention
+       and charset to sane values.
+
+2001-12-25  Ravi Pratap  <ravi@ximian.com>
+
+       * assign.cs (DoResolve): Perform check on events only if they 
+       are being accessed outside the declaring type.
+
+       * cs-parser.jay (event_declarations): Update rules to correctly
+       set the type of the implicit parameter etc.
+
+       (add_accessor, remove_accessor): Set current local parameters.
+
+       * expression.cs (Binary): For delegate addition and subtraction,
+       cast the return value from the method into the appropriate delegate
+       type.
+
+2001-12-24  Ravi Pratap  <ravi@ximian.com>
+
+       * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
+       of these as the workaround is unnecessary.
+
+       * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
+       delegate data - none of that is needed at all.
+
+       Re-write bits to extract the instance expression and the delegate method
+       correctly.
+
+       * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
+       on delegates too.
+
+       * attribute.cs (ApplyAttributes): New method to take care of common tasks
+       of attaching attributes instead of duplicating code everywhere.
+
+       * everywhere : Update code to do attribute emission using the above method.
+
+2001-12-23  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (IsParamsMethodApplicable): if there are not
+       parameters, return immediately.
+
+       * ecore.cs: The 0 literal can be implicity converted to an enum
+       type. 
+
+       (SimpleName.DoResolve): First lookup the type, then lookup the
+       members. 
+
+       (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
+       want to get its address.  If the InstanceExpression is not
+       addressable, store the result in a temporary variable, then get
+       the address of it.
+
+       * codegen.cs: Only display 219 errors on warning level or above. 
+
+       * expression.cs (ArrayAccess): Make it implement the
+       IMemoryLocation interface.
+
+       (Binary.DoResolve): handle the operator == (object a, object b)
+       and operator != (object a, object b) without incurring into a
+       BoxedCast (because 5 != o should never be performed).
+
+       Handle binary enumerator operators.
+
+       (EmitLoadOpcode): Use Ldelema if the object we are loading is a
+       value type, otherwise use Ldelem_ref.
+
+       Use precomputed names;
+
+       (AddressOf): Implement address of
+
+       * cs-parser.jay (labeled_statement): Fix recursive block
+       addition by reworking the production.
+
+       * expression.cs (New.DoEmit): New has a special case:
+               
+                If we are dealing with a ValueType, we have a few
+                situations to deal with:
+               
+                   * The target of New is a ValueType variable, that is
+                     easy, we just pass this as the variable reference
+               
+                   * The target of New is being passed as an argument,
+                     to a boxing operation or a function that takes a
+                     ValueType.
+               
+                     In this case, we need to create a temporary variable
+                     that is the argument of New.
+
+
+2001-12-23  Ravi Pratap  <ravi@ximian.com>
+
+       * rootcontext.cs (LookupType): Check that current_type is not null before
+       going about looking at nested types.
+
+       * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
+       not implement the IAssignMethod interface any more.
+
+       * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
+       where we tranform them into FieldExprs if they are being resolved from within
+       the declaring type.
+
+       * ecore.cs (SimpleName.DoResolve): Do the same here.
+
+       * assign.cs (DoResolve, Emit): Clean up code considerably. 
+
+       * ../errors/bug10.cs : Add.
+
+       * ../errors/cs0070.cs : Add.
+
+       * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
+
+       * assign.cs : Get rid of EventIsLocal everywhere.
+       
+2001-12-23  Miguel de Icaza  <miguel@ximian.com>
+
+       * ecore.cs (ConvertIntLiteral): finished the implementation.
+
+       * statement.cs (SwitchLabel): Convert the value we are using as a
+       key before looking up the table.
+
+2001-12-22  Miguel de Icaza  <miguel@ximian.com>
+
+       * codegen.cs (EmitTopBlock): Require a Location argument now.
+
+       * cs-parser.jay (constructor_declarator): We need to setup
+       current_local_parameters before we parse the
+       opt_constructor_initializer, to allow the variables to be bound
+       to the constructor arguments.
+
+       * rootcontext.cs (LookupType): First lookup nested classes in our
+       class and our parents before we go looking outside our class.
+
+       * expression.cs (ConstantFold): Extract/debox the values at the
+       beginnning. 
+
+       * rootcontext.cs (EmitCode): Resolve the constants first before we
+       resolve the types.  This is not really needed, but it helps debugging.
+
+       * statement.cs: report location.
+       
+       * cs-parser.jay: pass location to throw statement.
+
+       * driver.cs: Small bug fix.
+
+       * report.cs: Updated format to be 4-zero filled digits.
+
+2001-12-22  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (CheckIndices): Fix minor bug where the wrong
+       variable was being referred to ;-)
+
+       (DoEmit): Do not call EmitStaticInitializers when the 
+       underlying type is System.Object.
+
+2001-12-21  Ravi Pratap  <ravi@ximian.com>
+
+       * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
+       and do the usual workaround for SRE.
+
+       * class.cs (MyEventBuilder.EventType): New member to get at the type
+       of the event, quickly.
+
+       * expression.cs (Binary.ResolveOperator): Handle delegate addition.
+
+       * assign.cs (Assign.DoResolve): Handle the case when the target
+       is an EventExpr and perform the necessary checks.
+
+       * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
+       interface.
+
+       (SimpleName.MemberStaticCheck): Include check for EventExpr.
+
+       (EventExpr): Set the type in the constructor itself since we 
+       are meant to be born fully resolved.
+
+       (EventExpr.Define): Revert code I wrote earlier.
+               
+       * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
+       instance expression is null. The instance expression is a This in that case
+       or a null, depending on whether it is a static method or not.
+
+       Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
+       refers to more than one method.
+
+       * assign.cs (DoResolve): Check whether the event belongs to the same Type container
+       and accordingly flag errors.
+
+2001-12-21  Miguel de Icaza  <miguel@ximian.com>
+
+       * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
+
+2001-12-22  Miguel de Icaza  <miguel@ximian.com>
+
+       * location.cs (ToString): Provide useful rutine.
+
+2001-12-21  Miguel de Icaza  <miguel@ximian.com>
+
+       * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
+       objects, return the actual integral boxed.
+
+       * statement.cs (SwitchLabel): define an ILLabel for each
+       SwitchLabel. 
+       
+       (Switch.CheckSwitch): If the value is a Literal, extract
+       the underlying literal.
+       
+       Also in the unused hashtable we had, add the SwitchLabel so we can
+       quickly look this value up.
+
+       * constant.cs: Implement a bunch of new constants.  Rewrite
+       Literal based on this.  Made changes everywhere to adapt to this.
+       
+       * expression.cs (Expression.MakeByteBlob): Optimize routine by
+       dereferencing array only once, and also copes with enumrations.
+
+       bytes are two bytes wide, not one.
+
+       (Cast): Perform constant conversions.
+       
+       * ecore.cs (TryImplicitIntConversion): Return literals instead of
+       wrappers to the literals here.
+
+       * expression.cs (DoNumericPromotions): long literals can converted
+       to ulong implicity (this is taken care of elsewhere, but I was
+       missing this spot).
+
+       * ecore.cs (Expression.Literalize): Make the return type Literal,
+       to improve type checking.
+
+       * rootcontext.cs: Lookup for nested classes in our class hierarchy.
+
+2001-12-20  Miguel de Icaza  <miguel@ximian.com>
+
+       * literal.cs: Revert code from ravi that checked the bounds.  The
+       bounds are sane by the definition of the type itself. 
+
+       * typemanager.cs: Fix implementation of ImplementsInterface.  We
+       need to actually look up in our parent hierarchy for interfaces
+       implemented. 
+
+       * const.cs: Use the underlying type for enumerations
+
+       * delegate.cs: Compute the basename for the delegate creation,
+       that should fix the delegate test case, and restore the correct
+       Type Lookup semantics in rootcontext
+
+       * rootcontext.cs: Revert Ravi's last patch.  The correct way of
+       referencing a nested type with the Reflection API is using the "+"
+       sign. 
+
+       * cs-parser.jay: Do not require EOF token at the end.
+
+2001-12-20  Ravi Pratap  <ravi@ximian.com>
+
+       * rootcontext.cs (LookupType): Concatenate type names with
+       a '.' instead of a '+' The test suite passes again.
+
+       * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
+       field of the enumeration.
+
+       * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
+       the case when the member is an EventExpr.
+
+       * ecore.cs (EventExpr.InstanceExpression): Every event which is not
+       static has an associated instance expression.
+
+       * typemanager.cs (RegisterEvent): The usual workaround, now for events.
+
+       (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
+
+       * class.cs (Event.Define): Register event and perform appropriate checks
+       for error #111.
+
+       We define the Add and Remove methods even if the use provides none because
+       in that case, we provide default implementations ourselves.
+
+       Define a private field of the type of the event. This is done by the CSC compiler
+       and we should be doing it too ;-)
+
+       * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
+       More methods we use in code we generate.
+
+       (multicast_delegate_type, delegate_type): Two separate types since the distinction
+       is important.
+
+       (InitCoreTypes): Update accordingly for the above.
+
+       * class.cs (Event.Emit): Generate code for default accessors that we provide
+
+       (EmitDefaultMethod): Do the job in the above.
+
+       * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
+       appropriate place.
+
 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
 
        * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set