Fix bug in BetterConversion and in ConvertImplicit
[mono.git] / mcs / mcs / ChangeLog
index 5d19b5d118a7343c3ce1a5461c246fc39339eaf9..63c93928e6608ebe12f98134bc5a3086e46cdbbb 100755 (executable)
@@ -1,3 +1,126 @@
+2001-09-27  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (Invocation::BetterConversion): Fix to cope
+       with q being null, since this was introducing a bug.
+
+       * expression.cs (ConvertImplicit): Do built-in conversions first.
+
+2001-09-27  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (UserImplicitCast::Resolve): Fix bug.
+
+2001-09-27  Ravi Pratap  <ravi@ximian.com>
+
+       * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
+       I had introduced long ago (what's new ?).
+
+       * expression.cs (UserImplicitCast::CanConvert): Static method to do 
+       the work of all the checking. 
+       (ConvertImplicit): Call CanConvert and only then create object if necessary.
+       (UserImplicitCast::CanConvert, ::Resolve): Re-write.
+
+       (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
+       that is the right way. 
+
+       (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
+       overloading resolution. Use everywhere instead of cutting and pasting code.
+
+       (Binary::ResolveOperator): Use MakeUnionSet.
+
+       (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
+       we have to convert to bool types. Not complete yet.
+       
+2001-09-27  Miguel de Icaza  <miguel@ximian.com>
+
+       * typemanager.cs (TypeManager::CSharpName): support ushort.
+
+       * expression.cs (Expression::TryImplicitIntConversion): Attempts
+       to provide an expression that performsn an implicit constant int
+       conversion (section 6.1.6).
+       (Expression::ConvertImplicitRequired): Reworked to include
+       implicit constant expression conversions.
+
+       (Expression::ConvertNumericExplicit): Finished.
+
+       (Invocation::Emit): If InstanceExpression is null, then it means
+       that we perform a call on this.
+       
+2001-09-26  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (Unary::Emit): Remove some dead code.
+       (Probe): Implement Resolve and Emit for `is'.
+       (Expression::ConvertImplicitRequired): Attempt to do constant
+       expression conversions here.  Maybe should be moved to
+       ConvertImplicit, but I am not sure.
+       (Expression::ImplicitLongConstantConversionPossible,
+       Expression::ImplicitIntConstantConversionPossible): New functions
+       that tell whether is it possible to apply an implicit constant
+       expression conversion.
+
+       (ConvertNumericExplicit): Started work on explicit numeric
+       conversions.
+
+       * cs-parser.jay: Update operator constants.
+
+       * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
+       (Parameters::GetSignature): Hook up VerifyArgs here.
+       (Parameters::VerifyArgs): Verifies that no two arguments have the
+       same name. 
+
+       * class.cs (Operator): Update the operator names to reflect the
+       ones that the spec expects (as we are just stringizing the
+       operator names).
+       
+       * expression.cs (Unary::ResolveOperator): Fix bug: Use
+       MethodInfo's ReturnType instead of LookupMethodByBuilder as the
+       previous usage did only work for our methods.
+       (Expression::ConvertImplicit): Handle decimal implicit numeric
+       conversions as well.
+       (Expression::InternalTypeConstructor): Used to invoke constructors
+       on internal types for default promotions.
+
+       (Unary::Emit): Implement special handling for the pre/post
+       increment/decrement for overloaded operators, as they need to have
+       the same semantics as the other operators.
+
+       (Binary::ResolveOperator): ditto.
+       (Invocation::ConversionExists): ditto.
+       (UserImplicitCast::Resolve): ditto.
+       
+2001-09-26  Ravi Pratap  <ravi@ximian.com>
+
+       * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
+       operator, return after emitting body. Regression tests pass again !
+
+       * expression.cs (ConvertImplicit): Take TypeContainer as first argument
+       (Unary::ForceConversion, Binary::ForceConversion): Ditto.
+       (Invocation::OverloadResolve): Ditto.
+       (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
+
+       * everywhere : update calls to the above methods accordingly.
+
+2001-09-26  Miguel de Icaza  <miguel@ximian.com>
+
+       * assign.cs (Assign): Make it inherit from ExpressionStatement.
+
+       * expression.cs (ExpressionStatement): New base class used for
+       expressions that can appear in statements, so that we can provide
+       an alternate path to generate expression that do not leave a value
+       on the stack.
+
+       (Expression::Emit, and all the derivatives): We no longer return
+       whether a value is left on the stack or not.  Every expression
+       after being emitted leaves a single value on the stack.
+
+       * codegen.cs (EmitContext::EmitStatementExpression): Use the
+       facilties of ExpressionStatement if possible.
+
+       * cs-parser.jay: Update statement_expression.
+
+2001-09-25  Miguel de Icaza  <miguel@ximian.com>
+
+       * driver.cs: Change the wording of message
+
 2001-09-25  Ravi Pratap  <ravi@ximian.com>
 
        * expression.cs (Binary::ResolveOperator): Had forgottten to set