X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2FChangeLog;h=a1953cf9ae279968cf642c9ca853605ef2aa18a7;hb=740b5e1ef4f9b44ecf9cb10a905cad26a6306551;hp=274ef071be24fe92b56039619ce89be8a7f5f94b;hpb=8eaed0c3dfb48a6b2639e028a7fd8ae5bfa652b2;p=mono.git diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 274ef071be2..a1953cf9ae2 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,6 +1,635 @@ +2007-02-12 Marek Safar + + A fix for bug #80749 + * assign.cs (FieldInitializer): FieldInitializer has to keep track of + its parent container. + + * class.cs (DefineFieldInitializers): Each initializer can has different + resolve context. + + * const.cs: Updated. + +2007-02-11 Miguel de Icaza + + * lambda.cs (LambdaExpression.Compatible): Remove some early code, + now all the heavy lifting to check that embedded statements or + expressions have the right form is done in the ContextualReturn. + + (ContextualReturn): New class. + + * ecore.cs (Error_InvalidExpressionStatement): Make a helper + method that can be invoked to report 201, so we do not replicate + this everywhere. + + * cs-parser.jay: Reuse Error_InvalidExpressionStatement. + + * cs-tokenizer.cs (xtoken): Correctly compute the column, it was + treating tabs as spaces. + +2007-02-09 Marek Safar + + A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle) + * assign.cs: Use full implicit conversion for right side check. + +2007-02-09 Marek Safar + + * statement.cs (Switch): Switch over boolean type is not standardized. + +2007-02-08 Marek Safar + + A fix for bug #80755 + * decl.cs (FindBaseEvent): Don't use method cache for events. + +2007-02-07 Marek Safar + + * cs-parser.jay: Better syntax error handling. + + * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name + instead of underlying type value. + +2007-02-06 Marek Safar + + * driver.cs: Check define identifier before is registered. + + * namespace.cs: Use existing error message. + + * report.cs: New warning. + +2007-02-06 Marek Safar + + A fix for bug #80742 + * expression.cs: Delegate Invoke method can be called directly. + +2007-02-06 Marek Safar + + A fix for bug #80676 + * class.cs (IsEntryPoint): The Main method can have params modifier. + +2007-02-04 Miguel de Icaza + + * parameter.cs (Parameter, Parameters): Add Clone method. + + * anonymous.cs (Compatible): Turn method into virtual method, so + LambdaExpression can implement a different behavior. + + (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor + out the basic checking here, so it can be used by + LambdaExpressions. + + * lambda.cs: Introduce "Compatible" function that will do the + heavy lifting. + +2007-02-02 Marek Safar + + * attribute.cs: Unified one error message. + + * class.cs (Class): Use type attributes and not properties to test static + class. + (IsEntryPoint): Don's pass local variable. + + * convert.cs: Removed duplicate check. + + * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType. + + * driver.cs: Don't crash when soft reference does not exist. + + * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace. + (UsingEntry): Removed redundant allocation. + + * parameter.cs: Add fast path for type parameters. + + * support.cs: Don't allocate attribute when it's not used. + +2007-01-30 Miguel de Icaza + + * anonymous.cs + (AnonymousMethodExpression.ImplicitStandardConversionExists): turn + this into a virtual method, so we can override it in LambdaExpression. + + * driver.cs: Improve diagnostics in case of failure. + + * cs-tokenizer.cs: Instead of trying to parse a type and a name, + write a function that is slightly more complex and that parses: + + type identifier [, type identifier]* ) + + The old function would return incorrectly a OPEN_PARENS_LAMBDA for + this expression: + + (canEmpty ? i >= 0 : i > 0) + +2007-01-30 Raja R Harinath + + * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an + exception on possibly valid code. + +2007-01-29 Raja R Harinath + + * cs-tokenizer.cs (is_punct) ['<']: Update to changes in + Push/PopPosition. + (parse_opt_type_arguments): Remove. It's almost the same as + parse_less_than. + (parse_namespace_or_typename): Use parse_less_than. + +2007-01-28 Miguel de Icaza + + * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE, + this bug took a few hours to find, because the state saved and + restored by PushPosition and PopPosition was ignoring the state of + parse_generic_less_than. + + I can also now remove the handling of OP_LT and OP_GT, this solves + the big mistery. + + * cs-tokenizer.cs: store the location for the ARROW token, we use + that in the parser. + + (PushPosition, PopPosition): save/restore also `current_token', + restore `parse_generic_less_than' (was missing). + + (parse_opt_type_arguments): use parse_type, not + parse_namespace_or_typename to parse types. + + * lambda.cs: Empty new file, will eventually have the lambda + expression implementation. + + * lambda.test: used to test the internal tokenizer. + + * report.cs (FeatureIsNotISO1): Rename from + FeatureIsNotStandardized, because it was about the language level + (1 vs 2) it was not about standarization. + + (FeatureRequiresLINQ): New. + + * support.cs (SeekableStreamReader): Only require that the reader + is a TextReader, not a StreamReader, so we can plug StringReader. + + * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a + given position in the input stream the following tokens can be + parsed as a type followed by an identifier. + + (is_punct): after a '(' if parse_type_and_parameter returns true, + then return a special token OPEN_PARENS_LAMBDA which is used to + avoid reduce/reduce errors in the grammar for the + lambda_expression rules. + + (parse_type): implement a type parser inside the + tokenizer, the parser only returns true or false depending on + whether the input at a given position can be parsed as a type. + + (peek_token): new method used during type parsing. + +2007-01-28 Raja R Harinath + + Fix #80531 + * anonymous.cs (ScopeInfo.InflateParameters): New. + (AnonymousContainer.Resolve): Use it to redirect types of + delegate parameters. + +2007-01-27 Raja R Harinath + + Fix #80530 + * expression.cs (Error_InvalidArguments): Don't use two different + messages for CS1503. Use ExtraInformation and + SymbolRelatedToPreviousError instead. + + Fix #80358 + * decl.cs (DeclSpace.initialize_type_params): Don't access + 'type_params' of a partial class directly. + +2007-01-26 Miguel de Icaza + + * constant.cs: Removed a handful of out-of-range checks that were + not necessary. + +2007-01-25 Marek Safar + + * expression.cs (CheckUselessComparison): Add additional check for char + constants. + + * namespace.cs: Fixed typo. + +2007-01-23 Miguel de Icaza + + * constant.cs: Bloat removal, CheckRange and CheckUnsigned are + gone, instead we inline the test, preventing the needless casts to + longs, ulongs and doubles for the parameters, avoiding calls to + methods that overchecked stuff, and instead inlined things + nicely. + +2007-01-20 Marek Safar + + * cs-parser.jay: Better parameter error handling. + +2007-01-17 Marek Safar + + A fix for bug #80368, #80522 + * expression.cs (ArrayCreation.only_constant_initializers): Indicates + whether array initializer contains constants only. + (ArrayCreation.Emit): Use better formula to decide when + are array initializers for static initialization. + (ArrayCreation.EmitDynamicInitializers): When the array is small enough we + have to emit even constants otherwise they are pre-initialized. + +2007-01-17 Bill Holmes + Raja R Harinath + + Fix emit order of 'get' vs. 'set'. + * support.cs (Accessors): New. + * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'. + Note the order in which accessors are declared in the source. + * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New. + Refactored from Property.Define and Indexer.Define. + (PropertyBase.DefineAccessors): New helper that calls the above in + appropriate order as noted by the parser. + (Property.Define, Indexer.Define): Update to changes. + (PropertyBase.SetMethod.PropertyInfo): Don't return a null. + +2007-01-17 Raja R Harinath + + Fix cs0029-6.cs and gcs0029-2.cs (regression) + * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that + there's an implicit conversion from the current type to the target + type before converting the underlying constant. + +2007-01-16 Marek Safar + + * const.cs (ResolveValue): Updated after constant conversion was made more + generic. + + * constant.cs (GetAttributableValue): constant to object conversion is + used for attributes only. + (IntConstant.ConvertImplicitly): Moved from convert to be used in all + constant conversions. + (LongConstant.ConvertImplicitly): Ditto. + + * convert.cs (ImplicitNumericConversion): Extracted constant bussiness. + (ImplicitConversionStandard): Handle constant conversion as extra step. + It solves the issue when constant conversion was called indirectly like + inside array initializer and constant folding was skipped. + + * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by + this change. + + * statement.cs(ImplicitConversionStandard): Updated after constant + conversion was made more generic. + +2007-01-16 Sergey P. Kondratyev + + * expression.cs (As.DoResolve): Use GenericConstraints instead of + Constraints, solves the problem where the compiler incorrectly + reported that a type parameter was not constrained to a class (Bug + 80518) + +2007-01-14 Marek Habersack + + * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase. + +2007-01-14 Marek Safar + + A fix for bug #80368 + * assign.cs (FieldInitializer): New class implements field + initializer statement. + + * attribute.cs: Update after FieldMember rename. + + * class.cs (PropertyBasedMember): New common class for property based + types. + (InterfaceMemberBase): New base class for all members which can be used as + an interface members. + (MethodCore): Moved really common code to InterfaceMemberBase. + (Method.Define): Equal and GetHasCode detection is relevant for methods + only. + (MethodData.Define): Don't assume that public event implements an + interface automatically. + (MethodData.DefineMethodBuilder): Issue an error even if only extern + modifier is used. + (MemberBase): Moved all interface speficic code to InterfaceMemberBase. + (FieldMember): Merged with FieldBase. + (EventProperty.AEventPropertyAccessor): New specialization to check whether + event extern modifier can be used. + (EventField.EventFieldAccessor): Moved event field specific code here. + (Event.AllowedModifiers): Even event can be extern. + (Event.FindOutBaseMethod): New override specific to events. + (Indexer.parameters): Reintroduce parameters because base class holds + only properties common data. + (Indexer.CheckForDuplications): Indexers are threated as methods so we + need do extra parameters check. + + * const.cs: Update after FieldMember rename. + + * decl.cs (MemberCache.FindBaseEvent): New method. + + * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument + to reflect that indexer is now derived from PropertyBased. + + * ecore.cs (GetMemberType): Made public. + (EventExpr.ResolveMemberAccess): Use right event cache and checks for + obsolete event. + + * flowanalysis.cs, statement.cs: Update after FieldMember rename. + + * typemanager.cs (CSharpSignature): Correctly print event accessors. + (RegisterEvent): Removed. + (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField. + (GetPrivateFieldOfEvent): Renamed to GetEventField. + +2007-01-11 Raja R Harinath + + Fix #80249 + * statement.cs (CollectionForeach.TryType): Prefer generic + GetEnumerator over non-generic variant. Fix code to follow comments. + +2007-01-09 Raja R Harinath + + Fix #80446 + * support.cs (ReflectionParameter): Don't use an invalid index on + the generic parameter data. + +2007-01-08 Miguel de Icaza + + * driver.cs: Just add a tiny bit of infrastructure. + +2007-01-02 Marek Safar + + * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list + where field type is struct from current assembly. + + * ecore.cs (EnumConstant.AsString): Report an enum member name whenever + it is possible. + +2007-01-02 Marek Safar + + A fix for bug #80381 + * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers + the core types. + + * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error + messages. + (Namespace.LookupType): Always use core types from corlib when speficied. + + * report.cs: A new warning. + + * rootcontext.cs (BootstrapCorlib_ResolveInterface, + BootstrapCorlib_ResolveClass): Register type as non-obsolete type. + (ResolveCore): Add missing System.Runtime.InteropServices._Attribute. + + * typemanager.cs (CoreLookupType): Register type as non-obsolete type. + (InitCoreTypes): Set expression type of object_type and value_type + immediately after lookup. + +2007-01-01 Miguel de Icaza + + * cs-tokenizer.cs: Accept Pc class characters (Connector + Punctuation) as valid identifiers. Fixes #78259 + + * expression.cs (Invocation.DoResolve): Moved the check for the + use of `this' for doing method calls to the Invocation resolution + step, after overload resolution has taken place instead of doing + the check at the low-level `This.DoResolve' level. + + The `This.DoResolve' happens before overload resolution, so it has + no way of knowing if the method that will be called will be + instace or static, triggering an erroneous report for cs0188 (Bug + 78113). + + We now do the check for instance method invocations after we know + what method will be called. + + (This.CheckThisUsage): Move the actual use of this structure + checking into its own method and expose it. + + * Everywhere that called Error_ValueCannotBeConverted: pass a new + EmitContext. + + Exceptions: Null.ConvertImplicitly, + Constant.ImplicitConversionRequired as there are too many call + sites for passing the ec. + + * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an + EmitContext, if the value is null, then we do not try to provide + the extra information from the error (If a userdefined conversion + exists, as UserDefinedConversion requires a non null-EmitContext). + + Fixes: #80347 + +2006-12-30 Raja R Harinath + + * flowanalysis.cs (MyBitVector): Document some invariants. + (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations + introduced below, and add a couple of others, + +2006-12-30 Marek Safar + + * attribute.cs (GetMethodObsoleteAttribute): Uses new + GetPropertyFromAccessor and GetEventFromAccessor. + + * class.cs (MethodCore.CheckBase): A new warning when obsolete member + overrides non-obsolete one. + (Indexer.Define): Error message has been moved to the parser. + + * cs-parser.jay: Better syntax errors handling. + + * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message + when an invocation has no arguments. + + * ecore.cs: Removed not used caching. + + * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager + implementation. + + * report.cs: Add a new warning. + + * support.cs (ReflectionParameters): Implements Equals, GetHashCode. + + * typemanager.cs (enumeration_type): Removed. + (CSharpSignature): Reuses IsSpecialMethod. + (IsEqual): Hack for MS BCL. + (GetPropertyFromAccessor): New method. + (GetEventFromAccessor): New method. + (IsSpecialMethod): Fixed to handle more cases. + +2006-12-30 Marek Safar + + * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive): + Made white spaces array static. + + * ecore.cs (RemoveGenericArity): Optimized. + + * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to + 10 times faster). + (MyBitVector.initialize_vector): Simplified. + +2006-12-22 Miguel de Icaza + + * ecore.cs: Am not entirely happy with this hack, but it seems to + address the issue in 80257 (a small test case for + CreativeDocs.NET). + + I set the MethodGroupExpr.Type to an internal compiler type + (itself in this case) to force the resolution to take place. Why + it does not take place with a null is beyond me. + +2006-12-20 Marek Safar + + A fix for bug #80288 + * expression.cs (ResolveOperator): Consider user defined conversion for + logical and operator too. + (EmitBranchable): Optimization for logical and when full constant folding + could not be applied but one operand is constant. + +2006-12-19 Marek Safar + + * class.cs (GetClassBases): Write 5 times every day, will never use + FullName for error reporting. + + * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first. + +2006-12-19 Martin Baulig + + * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit + the symbol file info here. + +2006-12-18 Marek Safar + + * cs-tokenizer.cs (handle_preprocessing_directive): When previous section + of `elseif' is taking then following sections are not taking. + Fixes an issue reported on mono mailing list. + +2006-12-18 Marek Safar + + A fix for bug #80300 + * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when + a caller is not taking. + +2006-12-18 Raja R Harinath + + * anonymous.cs: Change several TypeContainer declarations to DeclSpace. + (CompilerGeneratedClass): Use parent.PartialContainer unconditionally. + (RootScopeInfo, AnonymousMethodMethod): Update to changes. + * iterator.cs: Change several TypeContainer declarations to DeclSpace. + * class.cs: Update to changes. + +2006-12-17 Marek Safar + + A fix for bug #79934 + * anonymous.cs (CompilerGeneratedClass): Register class in a shared + partial container. + + * class.cs (ResolveMembers): Register an iterator in current container and + not in shared one. + +2006-12-16 Raja R Harinath + + Fix test-543.cs + * expression.cs (VerifyArgumentsCompat): Allow zero arguments to + satisfy a params annotated parameter. + +2006-12-16 Marek Safar + + A fix for bug #77014 + * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic + paramters correctly and not rely on hacks in Parameters class. + (Invocation.IsParamsMethodApplicable): Changed to accept params parameter + at any possition. + (Invocation.VerifyArgumentsCompat): Ditto. + (Invocation.EmitArguments): Changed to correctly emit params arguments at + any possition. + + * parameter.cs (HasParams): Don't assume that params is the last one. + + * support.cs (ReflectionParameters.ctor): Look for params attribute + correctly. + (ReflectionParameters.ParameterType): Removed hack when we returned last + parameter for out of range parameters. + (ParameterName, ParameterModifier): Ditto. + +2006-12-14 Marek Safar + + A fix for bug #79987 + * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null + when assembly is not CLS compliant but type is. I have no idea why is this + allowed. + + * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache. + +2006-12-13 Miguel de Icaza + + * class.cs (ConstructorInitializer.Resolve): Allow for ":this()" + in struct constructors, they are basically no-ops. + +2006-12-12 Marek Safar + + * cs-tokenizer.cs (Position): Save preprocessor status too. + +2006-12-12 Marek Safar + + A fix for bug #77794 + * cs-tokenizer.cs (consume_identifier): Check for correct partial context. + +2006-12-12 Marek Safar + + * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator. + Fixes #69299. + (pp_expr): Report error for an invalid expression. + (handle_preprocessing_directive): Simplified; add more error checking. + +2006-12-11 Marek Safar + + A fix for bug #74939 + * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor + directives handling. + +2006-12-10 Marek Safar + + A fix for bugs #80093, and #75984 + * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif + logic, it seems to me as it worked before "by coincidence". + (xtoken): Simplified to use reworked handle_preprocessing_directive. + (cleanup): Enabled endif check. + +2006-12-09 Marek Safar + + A fix for bug #80162 + * statement.cs (CollectionForeach.TryType): Generics and non-generics + enumerators are never ambiguous. + +2006-12-08 Raja R Harinath + + Fix #80060 + * cs-tokenizer.cs (parse_less_than): Recognize double-colons too. + +2006-12-06 Marek Safar + + A fix for bug #80144 + * class.cs (EventProperty.Define): Explicit implementation means + that an even is used. + +2006-12-06 Marek Safar + + Fixes the operators implementation (part II) + + * cfold.cs (DoConstantNumericPromotions): Renamed to + DoBinaryNumericPromotions and simplified. + (BinaryFold): Couple of conversion fixes; simplified. + + * constant.cs, ecore.cs, literal.cs + (ToType): Renamed to ConvertImplicitly. + (Reduce): Renamed to ConvertExplicitly. + + * class.cs, convert.cs: Updated. + + * expression.cs: TryReduce doesn't throw an exception. + +2006-12-01 Marek Safar + + A fix for bug #80108 + * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not + compatible. + 2006-11-30 Marek Safar - Correct unary operators implementation (part I) + Fixes unary operators implementation (part I) Also fixes #80026 * cfold.cs (Error_CompileTimeOverflow): Made internal