2008-05-03 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
index 73c1696337c7839f07124c201f70885859a54cca..f67917a11523e010be3624e63fd8273210d4e58a 100644 (file)
@@ -1,5 +1,503 @@
+2008-05-03  Marek Safar  <marek.safar@gmail.com>
+
+       * assign.cs: EventAddOrRemove is a statement and cannot have a type.
+       
+       * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
+       method.
+       
+       * nullable.cs: Constant coalescing operator optimizations.
+
+2008-05-03  Marek Safar  <marek.safar@gmail.com>
+
+       * constant.cs: Use unsigned conversion for values which are unsigned only.
+
+2008-05-03  Marek Safar  <marek.safar@gmail.com>
+
+       * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
+       coalescing operator as it should be.
+
+2008-05-02  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #371016
+       * expression.cs: All predefined delegate operators require implicit method
+       group conversion.
+       
+2008-05-02  Marek Safar  <marek.safar@gmail.com>
+
+       * constant.cs: Emit long constant as uint when fits the range.
+       
+       * convert.cs, expression.cs: Fixed few unsafe conversions.
+
+2008-05-02  Marek Safar  <marek.safar@gmail.com>
+
+       * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
+
+2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix #385758
+       * convert.cs (ImplicitNumericConversion): Don't modify the type of
+       'expr'.
+       * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
+
+2008-05-01  Marek Safar  <marek.safar@gmail.com>
+
+       * constant.cs, literal.cs: IsLiteral property for error reporting.
+       
+       * ecore.cs, expression.cs: Implemented Property expression.
+
+2008-05-01  Marek Safar  <marek.safar@gmail.com>
+
+       * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
+       
+       * nullable.cs: Implemented nullable coalescing null operator.
+
+       * ecore.cs, expression.cs: Expression trees work.
+
+2008-05-01  Marek Safar  <marek.safar@gmail.com>
+
+       * ecore.cs: CreateExpressionTree is finally abstract.
+
+       * expression.cs, linq.cs: Updated.
+
+2008-05-01  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs, ecore.cs: Block base access expression inside expression
+       tree.
+
+2008-05-01  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #385058
+       * expression.cs: User-defined operator implementations always take
+       precedence over predefined operator implementations.
+
+2008-04-30  Marek Safar  <marek.safar@gmail.com>
+
+       * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
+       class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
+       expression tree conversions.
+       
+2008-04-30  Marek Safar  <marek.safar@gmail.com>
+
+       * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
+       operators method details to Operator class.
+
+2008-04-30  Marek Safar  <marek.safar@gmail.com>
+
+       * anonymous.cs: Pass unsafe flags to anonymous container.
+       
+       * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
+       inside expression tree.
+
+2008-04-29  Martin Baulig  <martin@ximian.com>
+
+       * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
+       (Tokenizer.PopPosition): Also restore the `line'.
+
+2008-04-29  Marek Safar  <marek.safar@gmail.com>
+
+       * delegate.cs: Implemented Invoke expression.
+
+2008-04-29  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs: Fixed equality reference comparison regression.
+
+2008-04-29  Marek Safar  <marek.safar@gmail.com>
+
+       * ecore.cs: Clean up EmptyCast hack.
+       
+       * expression.cs, nullable.cs: Implemented enum binary and unary operations
+       using correct conversion rules. Also fixes #383993.
+
+2008-04-28  Martin Baulig  <martin@ximian.com>
+
+       * class.cs (Constructor.Emit): Don't emit debugging information
+       for generated default .ctor's.
+
+2008-04-28  Marek Safar  <marek.safar@gmail.com>
+
+       * convert.cs: Empty-cast ushort to int conversion.
+
+2008-04-28  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #384191
+       * ecore.cs, expression.cs: Fixed expression cloning.
+
+2008-04-28  Marek Safar  <marek.safar@gmail.com>
+
+       * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
+
+2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix #381559, test-638.cs, test-639.cs
+       * assign.cs (CompoundAssign.Helper): New wrapper.
+       (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
+       access.
+       * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
+       Pass unconverted expressions to the params array creation expression.
+       (FieldExpr.EmitAssign): Don't special-case StringConcat.
+       (PropertyExpr.EmitAssign): Likewise.
+       * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
+       element if it is of kind CompoundAssign.Helper.
+       (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
+       first before anything else.
+       (ArrayAccess.EmitAssign): Don't special-case StringConcat.
+       (ArrayAccess.LoadArrayAndArguments): Simplify.
+
+2008-04-27  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs: Fixed cloning of typeof(void).
+
+2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
+
+       * assign.cs (Assign.DoResolve): Remove support for EventExprs.
+       (Assign.Emit): Likewise.  Move it to ...
+       (CompoundAssign.DoResolve): ... here and ...
+       (CompoundAssign.Emit): ... here.
+       (EventAddOrRemove): New helper to handle += and -= on events, and
+       avoid the use of BinaryDelegates.
+       * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
+       (EventExpr.EmitAddOrRemove): Improve.
+       * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
+
+       * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
+       create VarExprs for 'foo.bar.var'.
+       * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
+       is a highly inappropriate name for its functionality.
+
+2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
+
+       Simplify handling of multiple assignments
+       * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
+       inheritable-only.
+       (SimpleAssign): New.  Class to be used for normal assignments.
+       * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
+       * expression.cs, parameter.cs, statement.cs: Likewise.
+
+2008-04-25  Marek Safar  <marek.safar@gmail.com>
+
+       * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
+       for incompatible underlying types, more to come, uff.
+
+2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix gtest-388.cs
+       * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
+       Handle 'leave_copy'.
+
+2008-04-25  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs, nullable.cs: Implemented UnaryPlus expression.
+
+2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
+       * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
+       * statement.cs (While, Do, For): Allow test to have side effects.
+       (For.DoEmit): Always emit InitStatement.
+
+       Fix test-635.cs
+       * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
+       Always create SideEffectConstant.
+       (Binary.EnumLiftUp): Don't assume that the enumeration constant is
+       of type EnumConstant.
+
+       * expression.cs (Binary.EmitBranchable) <Equality with constant>:
+       Handle 'right' being SideEffectConstant of type 'bool'.
+
+       * expression.cs (Binary.EmitBranchable) <Equality with constant>:
+       Use left.EmitBranchable instead of open coding it, so as to
+       improve optimization opportunities.
+
+       * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
+
+       * ecore.cs (Expression.EmitBranchable): Document some non-obvious
+       assumptions.
+       (Expression.EmitSideEffect): Document.
+
+2008-04-23  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
+
+2008-04-23  Marek Safar  <marek.safar@gmail.com>
+
+       * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
+
+2008-04-23  Marek Safar  <marek.safar@gmail.com>
+
+       * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
+       conversion to expression tree.
+
+2008-04-23  Marek Safar  <marek.safar@gmail.com>
+
+       * ecore.cs: Removed unused expression.
+
+2008-04-22  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs: Implemented NegateChecked and New expressions.
+
+2008-04-22  Marek Safar  <marek.safar@gmail.com>
+
+       * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
+
+2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix #351102
+       * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
+       needing final 'ret' instruction.
+
+2008-04-22  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
+
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs: Emit ldnull and not null expression as an instance argument
+        of static method expression calls.
+
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #378200
+       * expression.cs: Fixed crash when creating parameterless expression tree
+       method call.
+
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #375297
+       * anonymous.cs: Fixed crash when inferring from null argument anonymous
+       method.
+
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #377596
+       * decl.cs, class.cs: Emit delegate type argument attributes.
+
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #365314
+       * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
+       
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
+       only.
+
+2008-04-21  Marek Safar  <marek.safar@gmail.com>
+
+       * generic.cs (TypeParameter): Removed redundant location.
+
+2008-04-19  Marek Safar  <marek.safar@gmail.com>
+
+       * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
+       delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
+       FullNamedExpression in all declaration type expression, statements will come
+       later.
+
+2008-04-18  Marek Safar  <marek.safar@gmail.com>
+
+       * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
+       nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
+
+2008-04-18  Marek Safar  <marek.safar@gmail.com>
+
+       * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
+       code.
+
+2008-04-17  Marek Safar  <marek.safar@gmail.com>
+
+       * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
+       constraints.
+
+2008-04-17  Marek Safar  <marek.safar@gmail.com>
+
+       * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
+       name expressions.
+       Also fixes #340463.
+
+2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
+
+       Hook up 'EmitSideEffect'
+       * constant.cs (Constant.EmitSideEffect): New.
+       (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
+       (SideEffectConstant.EmitSideEffect): New.
+       * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
+       unconditional branch in EmitBranchable.
+       (FieldExpr.EmitBranchable): New.
+       * expression.cs (Unary.EmitSideEffect): New.
+       (Binary.EmitSideEffect): New.
+       (VariableReference.EmitSideEffect): New.  Do nothing.
+
+2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
+
+       Introduce 'EmitSideEffect'
+       * ecore.cs (Expression.EmitSideEffect): New.
+       (TypeCast): Rename from EmptyCast.
+       (EmptyCast): New.
+       (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
+       (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
+       * convert.cs, nullable.cs: Update to changes.
+
+2008-04-16  Marek Safar  <marek.safar@gmail.com>
+
+       * class.cs, cs-parser.jay: Early check for base types expression.
+
+2008-04-16  Marek Safar  <marek.safar@gmail.com>
+
+       * decl.cs (MemberName): Declare PrettyName as obsolete.
+
+2008-04-16  Marek Safar  <marek.safar@gmail.com>
+
+       * namespace.cs: Use MemberName comparison.
+
+2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix build break
+       * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
+       FullName.
+       (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
+       (MemberName.FullyQualifiedName): New.  Provides the functionality
+       that users assume FullName would have.
+       * ecore.cs, namespace.cs: Update to changes.
+
+       * statement.cs (Using.assign): Make into ExpressionStatement.
+       (Using.EmitPreTryBody): Simplify.
+
+2008-04-16  Marek Safar  <marek.safar@gmail.com>
+
+       * report.cs: ColorFormat is protected.
+       
+       * rootcontext.cs: Unused fields clean-up.
+       
+       * namespace.cs: Made UsingEntry name private.
+
+2008-04-16  Marek Safar  <marek.safar@gmail.com>
+
+       * cs-tokenizer.cs, location.cs: Removed unused field.
+
+2008-04-16  Jan Oravec <jan.oravec@6com.sk>
+           Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix #379822
+       * constant.cs (SideEffectConstant.value): Rename from 'left'.
+       (SideEffectConstant.side_effect): Rename from 'right'.
+       (SideEffectConstant..ctor): Normalize 'side_effect'.
+       (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
+       value of this constant.
+       * cfold.cs: Update to changes.
+
+2008-04-15  Marek Safar  <marek.safar@gmail.com>
+
+       * cs-paser.jay: Removed unused variable.
+       
+       * driver.cs: Made Compile instance method.
+
+2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
+
+       * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
+
+2008-04-15  Marek Safar  <marek.safar@gmail.com>
+
+       * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
+
+2008-04-13  Jb Evain  <jbevain@novell.com>
+
+       * namespace.cs: update the System.Core fullname for 2.1
+       * driver.cs: update the list of required assemblies for 2.1.
+       Merged from the Moonlight 2 branch.
+
+2008-04-11  Marek Safar  <marek.safar@gmail.com>
+
+       * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
+       types and user defined operators. User operators arguments has to be checked
+       for null value before invocation, which also means no operator is called
+       when any argument is not convertible to unwrapped nullable type.
+       
+2008-04-09  Marek Safar  <marek.safar@gmail.com>
+
+       * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
+       of Unary expressions to follow operator overloading rules precisely.
+       Also fixes #321794, #323794
+       
+2008-04-08  Marek Safar  <marek.safar@gmail.com>
+
+       * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
+       expression.
+       
+2008-04-08  Marek Safar  <marek.safar@gmail.com>
+
+       * expression.cs, ecore.cs: Implemented MemberInit expression.
+       
+2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix mono/tests/exception4.cs
+       * statement.cs (ExceptionStatement, TryCatch): Revert to using
+       ec.NeedReturnLabel () rather emitting a 'nop'.
+
+       * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
+       simple heuristic.
+       (TryCatch.SomeCodeFollows): Likewise.
+       * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
+       for 'break', 'continue' and 'return' statements inside a try.
+       We're fairly sure that the generated IL stream will have more
+       instructions textually following the try.
+       (FlowBranchingTryCatch): Likewise.
+
+       * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
+       * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
+       overrides.
+
+       * statement.cs (CollectionForeach.DisposableWrapper): Make a true
+       wrapper -- forward everything to CollectionForeach.
+       (CollectionForeach.NonDisposableWrapper): New.
+       (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
+       instead of a pop + branch to end.
+
+2008-04-07  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #377485
+       * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
+       Propagate location for extension method groups. Report conversion failure at
+       right place.
+
+2008-04-07  Marek Safar  <marek.safar@gmail.com>
+
+       * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
+       ListInit and Field expressions.
+
+2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
+
+       * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
+       Since $PC is always -1 inside the body of MoveNext, the fault
+       handler is a no-op.
+       * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
+       * statement.cs (ExceptionStatement.emit_finally): Likewise.
+       (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
+
+       The denouement!  Fix #324708
+       * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
+       (Iterator.EmitYieldBreak): We no longer need to reset $PC.
+       * statement.cs (ExceptionStatement.DoEmit): Actually emit the
+       'finally' inside the finally clause.
+
+       * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
+       inside an iterator.  Don't emit the body of the 'finally' inside
+       the finally clause yet.
+
+       Use the ResumableStatement infrastructure for MoveNext ()
+       * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
+       (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
+       'old_resume_points'.  Move dispatcher upfront.
+       (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
+       * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
+       in an enumerator.  This encodes the main fix in this patch series
+       -- we can only jump into the first instruction of a try from the
+       outside, but we want to emit try/finally regions in iterators and
+       resume in the middle of them.
+
 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
 
+       * statement.cs (ExceptionStatement.ResolveFinally): Move setting
+       of NeedReturnLabel here.
+
        Introduce a common point for emitting try/finally to IL
        * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
        features of the various subclasses, which are now driven by ...