X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2FChangeLog;h=13911a4314231d56146f9e964b5d2029333d35ad;hb=8d510ba7f34bbe25a5c6df1046b15bf94ead6acb;hp=f9d457a00cbb57511cf3b79e1befa158082e7915;hpb=8ef4dc5111b0efaebf920ae4fcebb0e1dba740fd;p=mono.git diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index f9d457a00cb..13911a43142 100755 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,1829 @@ +2001-11-18 Ravi Pratap + + * expression.cs (ArrayCreation::ValidateInitializers): Update to perform + some type checking etc. + +2001-11-17 Ravi Pratap + + * expression.cs (ArrayCreation::ValidateInitializers): Implement + bits to provide dimension info is user skips doing that. + + Update second constructor to store the rank correctly. + +2001-11-16 Ravi Pratap + + * expression.cs (ArrayCreation::ValidateInitializers): Poke around + and try to implement. + + * ../errors/cs0150.cs : Add. + + * ../errors/cs0178.cs : Add. + +2001-11-16 Miguel de Icaza + + * statement.cs: Implement foreach on multi-dimensional arrays. + + * parameter.cs (Parameters.GetParameterByName): Also lookup the + name of the params argument. + + * expression.cs: Use EmitStoreOpcode to get the right opcode while + initializing the array. + + (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so + we can use this elsewhere. + + * statement.cs: Finish implementation of foreach for single + dimension arrays. + + * cs-parser.jay: Use an out-of-band stack to pass information + around, I wonder why I need this. + + foreach_block: Make the new foreach_block the current_block. + + * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New + function used to return a static Parameters structure. Used for + empty parameters, as those are created very frequently. + + * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters + +2001-11-15 Ravi Pratap + + * interface.cs : Default modifier is private, not public. The + make verify test passes again. + +2001-11-15 Ravi Pratap + + * support.cs (ReflectionParameters): Fix logic to determine + whether the last parameter is a params one. Test 9 passes again. + + * delegate.cs (Populate): Register the builders we define with + RegisterParameterForBuilder. Test 19 passes again. + + * cs-parser.jay (property_declaration): Reference $6 instead + of $$ to get at the location. + + (indexer_declaration): Similar stuff. + + (attribute): Ditto. + + * class.cs (Property): Register parameters for the Get and Set methods + if they exist. Test 23 passes again. + + * expression.cs (ArrayCreation::Emit): Pass null for the method in the + call to EmitArguments as we are sure there aren't any params arguments. + Test 32 passes again. + + * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing + IndexOutOfRangeException. + + * class.cs (Property::Define): Register property using TypeManager.RegisterProperty + Test 33 now passes again. + +2001-11-15 Miguel de Icaza + + * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that + broke a bunch of things. Will have to come up with a better way + of tracking locations. + + * statement.cs: Implemented foreach for single dimension arrays. + +2001-11-09 Miguel de Icaza + + * enum.cs (Enum.Emit): Delay the lookup of loc until we run into + an error. This removes the lookup from the critical path. + + * cs-parser.jay: Removed use of temporary_loc, which is completely + broken. + +2001-11-14 Miguel de Icaza + + * support.cs (ReflectionParameters.ParameterModifier): Report + whether the argument is a PARAMS argument or not. + + * class.cs: Set the attribute `ParamArrayAttribute' on the + parameter argument. + + * typemanager.cs: Define param_array_type (ParamArrayAttribute) + and cons_param_array_attribute (ConstructorInfo for + ParamArrayAttribute)., + + * codegen.cs: Emit the return using the `Return' statement, that + way we can report the error correctly for missing return values. + + * class.cs (Method.Emit): Clean up. + + * expression.cs (Argument.Resolve): Take another argument: the + location where this argument is used. Notice that this is not + part of the "Argument" class as to reduce the size of the + structure (we know the approximate location anyways). + + Test if the argument is a variable-reference, if not, then + complain with a 206. + + (Argument.Emit): Emit addresses of variables. + + (Argument.FullDesc): Simplify. + + (Invocation.DoResolve): Update for Argument.Resolve. + + (ElementAccess.DoResolve): ditto. + + * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke + method should be virtual, as this method is always virtual. + + (NewDelegate.DoResolve): Update for Argument.Resolve. + + * class.cs (ConstructorInitializer.DoResolve): ditto. + + * attribute.cs (Attribute.Resolve): ditto. + +2001-11-13 Miguel de Icaza + + * statement.cs (Foreach.Emit): Use EmitAssign instead of Store. + + * expression.cs (ParameterReference): Drop IStackStorage and implement + IAssignMethod instead. + + (LocalVariableReference): ditto. + + * ecore.cs (FieldExpr): Drop IStackStorage and implement + IAssignMethod instead. + +2001-11-13 Miguel de Icaza + + * parameter.cs, expression.cs, class.cs, ecore.cs: Made all + enumerations that are used in heavily used structures derive from + byte in a laughable and pathetic attempt to reduce memory usage. + This is the kind of pre-optimzations that you should not do at + home without adult supervision. + + * expression.cs (UnaryMutator): New class, used to handle ++ and + -- separatedly from the other unary operators. Cleans up the + code, and kills the ExpressionStatement dependency in Unary. + + (Unary): Removed `method' and `Arguments' from this class, making + it smaller, and moving it all to SimpleCall, so I can reuse this + code in other locations and avoid creating a lot of transient data + strucutres when not required. + + * cs-parser.jay: Adjust for new changes. + +2001-11-11 Miguel de Icaza + + * enum.cs (Enum.Populate): If there is a failure during + definition, return + + * cs-parser.jay (opt_enum_base): we used to catch type errors + here, but this is really incorrect. The type error should be + catched during semantic analysis. + +2001-12-11 Ravi Pratap + + * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set + current_local_parameters as expected since I, in my stupidity, had forgotten + to do this :-) + + * attribute.cs (GetValidPlaces): Fix stupid bug. + + * class.cs (Method::Emit): Perform check on applicability of attributes. + + (Constructor::Emit): Ditto. + + (Field::Emit): Ditto. + + (Field.Location): Store location information. + + (Property, Event, Indexer, Operator): Ditto. + + * cs-parser.jay (field_declaration): Pass in location for each field. + + * ../errors/cs0592.cs : Add. + +2001-11-12 Ravi Pratap + + * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage. + + (InitCoreTypes): Update accordingly. + + (RegisterAttrType, LookupAttr): Implement. + + * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold + info about the same. + + (Resolve): Update to populate the above as necessary. + + (Error592): Helper. + + (GetValidPlaces): Helper to the above. + + (CheckAttribute): Implement to perform validity of attributes on declarative elements. + + * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc. + +2001-11-12 Ravi Pratap + + * attribute.cs (Attribute::Resolve): Expand to handle named arguments too. + + * ../errors/cs0617.cs : Add. + +2001-11-11 Ravi Pratap + + * enum.cs (Emit): Rename to Populate to be more consistent with what + we expect it to do and when exactly it is called. + + * class.cs, rootcontext.cs : Update accordingly. + + * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that + FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again ! + + * enum.cs (Populate): Register fields with TypeManager.RegisterField. + + * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value + of a fieldinfo using the above, when dealing with a FieldBuilder. + +2001-11-10 Ravi Pratap + + * ../errors/cs0031.cs : Add. + + * ../errors/cs1008.cs : Add. + + * ../errrors/cs0543.cs : Add. + + * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid + enum type. + + (FindMembers): Implement. + + * typemanager.cs (FindMembers): Re-write to call the appropriate methods for + enums and delegates too. + + (enum_types): Rename to builder_to_enum. + + (delegate_types): Rename to builder_to_delegate. + + * delegate.cs (FindMembers): Implement. + +2001-11-09 Ravi Pratap + + * typemanager.cs (IsEnumType): Implement. + + * enum.cs (Emit): Re-write parts to account for the underlying type + better and perform checking etc. + + (GetNextDefaultValue): Helper to ensure we don't overshoot max value + of the underlying type. + + * literal.cs (GetValue methods everywhere): Perform bounds checking and return + value + + * enum.cs (error31): Helper to report error #31. + + * cs-parser.jay (enum_declaration): Store location of each member too. + + * enum.cs (member_to_location): New hashtable. + + (AddEnumMember): Update location hashtable. + + (Emit): Use the location of each member while reporting errors. + +2001-11-09 Miguel de Icaza + + * cs-parser.jay: A for_initializer if is a + local_variable_declaration really ammount to have an implicit + block with the variable declaration and no initializer for for. + + * statement.cs (For.Emit): Cope with null initializers. + + This fixes the infinite loop on for initializers. + +2001-11-08 Miguel de Icaza + + * enum.cs: More cleanup. + + * ecore.cs: Remove dead code. + + * class.cs (Property.Emit): More simplification. + (Event.Emit): ditto. + + Reworked to have less levels of indentation. + +2001-11-08 Ravi Pratap + + * class.cs (Property): Emit attributes. + + (Field): Ditto. + + (Event): Ditto. + + (Indexer): Ditto. + + (Operator): Ditto. + + * enum.cs (Emit): Ditto. + + * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for + Enums too. + + * class.cs (Field, Event, etc.): Move attribute generation into the + Emit method everywhere. + + * enum.cs (Enum): Revamp to use the same definition semantics as delegates so + we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right + as we had no way of defining nested enums ! + + * rootcontext.cs : Adjust code accordingly. + + * typemanager.cs (AddEnumType): To keep track of enum types separately. + +2001-11-07 Ravi Pratap + + * expression.cs (EvalConstantExpression): Move into ecore.cs + + * enum.cs (Enum): Rename some members and make them public and readonly + according to our convention. + + * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags, + nothing else. + + * enum.cs (Enum::Define): Use the above instead of TypeAttr. + + (Enum::Emit): Write a simple version for now which doesn't try to compute + expressions. I shall modify this to be more robust in just a while. + + * class.cs (TypeContainer::Emit): Make sure we include Enums too. + + (TypeContainer::CloseType): Create the Enum types too. + + * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression. + + * expression.cs (EvalConstantExpression): Get rid of completely. + + * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning + user-defined values and other cases. + + (IsValidEnumLiteral): Helper function. + + * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing + out there in the case we had a literal FieldExpr. + + (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here. + + (Literalize): Revamp a bit to take two arguments. + + (EnumLiteral): New class which derives from Literal to wrap enum literals. + +2001-11-06 Ravi Pratap + + * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now. + + * expression.cs (ArrayCreation::ValidateInitializers): Implement. + + (Resolve): Use the above to ensure we have proper initializers. + +2001-11-05 Ravi Pratap + + * expression.cs (Expression::EvalConstantExpression): New method to + evaluate constant expressions. + + * attribute.cs (Attribute::Resolve): Modify bits to use the above function. + +2001-11-07 Miguel de Icaza + + * expression.cs (ArrayCreation.Emit): Some bits to initialize data + in an array. + + (Binary.ResolveOperator): Handle operator != (object a, object b) + and operator == (object a, object b); + + (Binary.DoNumericPromotions): Indicate whether the numeric + promotion was possible. + + (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign): + Implement. + + Made the ArrayAccess implement interface IAssignMethod instead of + IStackStore as the order in which arguments are passed reflects + this. + + * assign.cs: Instead of using expr.ExprClass to select the way of + assinging, probe for the IStackStore/IAssignMethod interfaces. + + * typemanager.cs: Load InitializeArray definition. + + * rootcontext.cs (RootContext.MakeStaticData): Used to define + static data that can be used to initialize arrays. + +2001-11-05 Miguel de Icaza + + * expression.cs: Handle operator== and operator!= for booleans. + + (Conditioal.Reduce): Implement reducer for the ?: operator. + + (Conditional.Resolve): Implement dead code elimination. + + (Binary.Resolve): Catch string literals and return a new + concatenated string. + + (Unary.Reduce): Implement reduction of unary expressions. + + * ecore.cs: Split out the expression core handling here. + + (Expression.Reduce): New method used to perform constant folding + and CSE. This is needed to support constant-expressions. + + * statement.cs (Statement.EmitBoolExpression): Pass true and false + targets, and optimize for !x. + +2001-11-04 Ravi Pratap + + * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution + of an attribute gives us a CustomAttributeBuilder which we use accordingly to + set custom atttributes. + + * literal.cs (Literal::GetValue): New abstract method to return the actual + value of the literal, cast as an object. + + (*Literal): Implement GetValue method. + + * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain + expressions to the arraylist but objects of type Argument. + + * class.cs (TypeContainer::Emit): Emit our attributes too. + + (Method::Emit, Constructor::Emit): Ditto. + + * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed + to be ignoring earlier. + +2001-11-03 Ravi Pratap + + * attribute.cs (AttributeSection::Define): Implement to do the business + of constructing a CustomAttributeBuilder. + + (Attribute): New trivial class. Increases readability of code. + + * cs-parser.jay : Update accordingly. + + (positional_argument_list, named_argument_list, named_argument): New rules + + (attribute_arguments): Use the above so that we are more correct. + +2001-11-02 Ravi Pratap + + * expression.cs (Invocation::IsParamsMethodApplicable): Implement + to perform all checks for a method with a params parameter. + + (Invocation::OverloadResolve): Update to use the above method and therefore + cope correctly with params method invocations. + + * support.cs (InternalParameters::ParameterDesc): Provide a desc for + params too. + + * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public + constructors in our parent too because we can't afford to miss out on + protected ones ;-) + + * attribute.cs (AttributeSection): New name for the class Attribute + + Other trivial changes to improve readability. + + * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to + use the new class names. + +2001-11-01 Ravi Pratap + + * class.cs (Method::Define): Complete definition for params types too + + (Indexer::Define): Ditto. + + * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier): + Cope everywhere with a request for info about the array parameter. + +2001-11-01 Ravi Pratap + + * tree.cs (RecordNamespace): Fix up to check for the correct key. + + * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in + local_variable_type to extract the string corresponding to the type. + + (local_variable_type): Fixup the action to use the new helper method. + + * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to + go. + + * expression.cs : Clean out code which uses the above. + +2001-10-31 Ravi Pratap + + * typemanager.cs (RegisterMethod): Check if we already have an existing key + and bale out if necessary by returning a false. + + (RegisterProperty): Ditto. + + * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod + and print out appropriate error messages. + + * interface.cs (everywhere): Ditto. + + * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass + location to constructor. + + * class.cs (Property, Event, Indexer): Update accordingly. + + * ../errors/cs111.cs : Added. + + * expression.cs (Invocation::IsApplicable): New static method to determine applicability + of a method, as laid down by the spec. + + (Invocation::OverloadResolve): Use the above method. + +2001-10-31 Ravi Pratap + + * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We + now take a TypeContainer and a Parameters object. + + (ParameterData): Modify return type of ParameterModifier method to be + Parameter.Modifier and not a string. + + (ReflectionParameters, InternalParameters): Update accordingly. + + * expression.cs (Argument::GetParameterModifier): Same here. + + * support.cs (InternalParameters::ParameterType): Find a better way of determining + if we are a ref/out parameter. Actually, the type shouldn't be holding the '&' + symbol in it at all so maybe this is only for now. + +2001-10-30 Ravi Pratap + + * support.cs (InternalParameters): Constructor now takes an extra argument + which is the actual Parameters class. + + (ParameterDesc): Update to provide info on ref/out modifiers. + + * class.cs (everywhere): Update call to InternalParameters to pass in + the second argument too. + + * support.cs (ParameterData): Add ParameterModifier, which is a method + to return the modifier info [ref/out etc] + + (InternalParameters, ReflectionParameters): Implement the above. + + * expression.cs (Argument::ParameterModifier): Similar function to return + info about the argument's modifiers. + + (Invocation::OverloadResolve): Update to take into account matching modifiers + too. + + * class.cs (Indexer::Define): Actually define a Parameter object and put it onto + a new SetFormalParameters object which we pass to InternalParameters. + +2001-10-30 Ravi Pratap + + * expression.cs (NewArray): Merge into the ArrayCreation class. + +2001-10-29 Ravi Pratap + + * expression.cs (NewArray): Merge classes NewBuiltinArray and + NewUserdefinedArray into one as there wasn't much of a use in having + two separate ones. + + * expression.cs (Argument): Change field's name to ArgType from Type. + + (Type): New readonly property which returns the proper type, taking into + account ref/out modifiers. + + (everywhere): Adjust code accordingly for the above. + + * codegen.cs (EmitContext.RefOrOutParameter): New field to determine + whether we are emitting for a ref or out parameter. + + * expression.cs (Argument::Emit): Use the above field to set the state. + + (LocalVariableReference::Emit): Update to honour the flag and emit the + right stuff. + + * parameter.cs (Attributes): Set the correct flags for ref parameters. + + * expression.cs (Argument::FullDesc): New function to provide a full desc. + + * support.cs (ParameterData): Add method ParameterDesc to the interface. + + (ReflectionParameters, InternalParameters): Implement the above method. + + * expression.cs (Invocation::OverloadResolve): Use the new desc methods in + reporting errors. + + (Invocation::FullMethodDesc): Ditto. + +2001-10-29 Miguel de Icaza + + * cs-parser.jay: Add extra production for the second form of array + creation. + + * expression.cs (ArrayCreation): Update to reflect the above + change. + + * Small changes to prepare for Array initialization. + +2001-10-28 Miguel de Icaza + + * typemanager.cs (ImplementsInterface): interface might be null; + Deal with this problem; + + Also, we do store negative hits on the cache (null values), so use + this instead of calling t.GetInterfaces on the type everytime. + +2001-10-28 Ravi Pratap + + * typemanager.cs (IsBuiltinType): New method to help determine the same. + + * expression.cs (New::DoResolve): Get rid of array creation code and instead + split functionality out into different classes. + + (New::FormArrayType): Move into NewBuiltinArray. + + (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears + quite useless. + + (NewBuiltinArray): New class to handle creation of built-in arrays. + + (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into + account creation of one-dimensional arrays. + + (::Emit): Implement to use Newarr and Newobj opcodes accordingly. + + (NewUserdefinedArray::DoResolve): Implement. + + * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too. + + * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules + we maintain inside the TypeManager. This is necessary to perform lookups on the + module builder. + + (LookupType): Update to perform GetType on the module builders too. + + * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager. + + * exprssion.cs (NewUserdefinedArray::Emit): Implement. + +2001-10-23 Ravi Pratap + + * expression.cs (New::DoResolve): Implement guts of array creation. + + (New::FormLookupType): Rename to FormArrayType and modify ever so slightly. + +2001-10-27 Miguel de Icaza + + * expression.cs: Fix bug I introduced lsat night that broke + Delegates. + + (Expression.Resolve): Report a 246 error (can not resolve name) + if we find a SimpleName in the stream. + + (Expression.ResolveLValue): Ditto. + + (Expression.ResolveWithSimpleName): This function is a variant of + ResolveName, this one allows SimpleNames to be returned without a + warning. The only consumer of SimpleNames is MemberAccess + +2001-10-26 Miguel de Icaza + + * expression.cs (Invocation::DoResolve): Catch SimpleNames that + might arrive here. I have my doubts that this is correct. + + * statement.cs (Lock): Implement lock statement. + + * cs-parser.jay: Small fixes to support `lock' and `using' + + * cs-tokenizer.cs: Remove extra space + + * driver.cs: New flag --checked, allows to turn on integer math + checking. + + * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and + Threading.Monitor.Exit + +2001-10-23 Miguel de Icaza + + * expression.cs (IndexerAccess::DoResolveLValue): Set the + Expression Class to be IndexerAccess. + + Notice that Indexer::DoResolve sets the eclass to Value. + +2001-10-22 Miguel de Icaza + + * class.cs (TypeContainer::Emit): Emit code for indexers. + + * assign.cs (IAssignMethod): New interface implemented by Indexers + and Properties for handling assignment. + + (Assign::Emit): Simplify and reuse code. + + * expression.cs (IndexerAccess, PropertyExpr): Implement + IAssignMethod, clean up old code. + +2001-10-22 Ravi Pratap + + * typemanager.cs (ImplementsInterface): New method to determine if a type + implements a given interface. Provides a nice cache too. + + * expression.cs (ImplicitReferenceConversion): Update checks to use the above + method. + + (ConvertReferenceExplicit): Ditto. + + * delegate.cs (Delegate::Populate): Update to define the parameters on the + various methods, with correct names etc. + + * class.cs (Operator::OpType): New members Operator.UnaryPlus and + Operator.UnaryNegation. + + * cs-parser.jay (operator_declarator): Be a little clever in the case where + we have a unary plus or minus operator. + + * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and + UnaryMinus. + + * everywhere : update accordingly. + + * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement + respectively. + + * class.cs (Method::Define): For the case where we are implementing a method + inherited from an interface, we need to set the MethodAttributes.Final flag too. + Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig. + +2001-10-21 Ravi Pratap + + * interface.cs (FindMembers): Implement to work around S.R.E + lameness. + + * typemanager.cs (IsInterfaceType): Implement. + + (FindMembers): Update to handle interface types too. + + * expression.cs (ImplicitReferenceConversion): Re-write bits which + use IsAssignableFrom as that is not correct - it doesn't work. + + * delegate.cs (DelegateInvocation): Derive from ExpressionStatement + and accordingly override EmitStatement. + + * expression.cs (ConvertReferenceExplicit): Re-write similary, this time + using the correct logic :-) + +2001-10-19 Ravi Pratap + + * ../errors/cs-11.cs : Add to demonstrate error -11 + +2001-10-17 Miguel de Icaza + + * assign.cs (Assign::Resolve): Resolve right hand side first, and + then pass this as a hint to ResolveLValue. + + * expression.cs (FieldExpr): Add Location information + + (FieldExpr::LValueResolve): Report assignment to readonly + variable. + + (Expression::ExprClassFromMemberInfo): Pass location information. + + (Expression::ResolveLValue): Add new method that resolves an + LValue. + + (Expression::DoResolveLValue): Default invocation calls + DoResolve. + + (Indexers): New class used to keep track of indexers in a given + Type. + + (IStackStore): Renamed from LValue, as it did not really describe + what this did. Also ResolveLValue is gone from this interface and + now is part of Expression. + + (ElementAccess): Depending on the element access type + + * typemanager.cs: Add `indexer_name_type' as a Core type + (System.Runtime.CompilerServices.IndexerNameAttribute) + + * statement.cs (Goto): Take a location. + +2001-10-18 Ravi Pratap + + * delegate.cs (Delegate::VerifyDelegate): New method to verify + if two delegates are compatible. + + (NewDelegate::DoResolve): Update to take care of the case when + we instantiate a delegate from another delegate. + + * typemanager.cs (FindMembers): Don't even try to look up members + of Delegate types for now. + +2001-10-18 Ravi Pratap + + * delegate.cs (NewDelegate): New class to take care of delegate + instantiation. + + * expression.cs (New): Split the delegate related code out into + the NewDelegate class. + + * delegate.cs (DelegateInvocation): New class to handle delegate + invocation. + + * expression.cs (Invocation): Split out delegate related code into + the DelegateInvocation class. + +2001-10-17 Ravi Pratap + + * expression.cs (New::DoResolve): Implement delegate creation fully + and according to the spec. + + (New::DoEmit): Update to handle delegates differently. + + (Invocation::FullMethodDesc): Fix major stupid bug thanks to me + because of which we were printing out arguments in reverse order ! + + * delegate.cs (VerifyMethod): Implement to check if the given method + matches the delegate. + + (FullDelegateDesc): Implement. + + (VerifyApplicability): Implement. + + * expression.cs (Invocation::DoResolve): Update to accordingly handle + delegate invocations too. + + (Invocation::Emit): Ditto. + + * ../errors/cs1593.cs : Added. + + * ../errors/cs1594.cs : Added. + + * delegate.cs (InstanceExpression, TargetMethod): New properties. + +2001-10-16 Ravi Pratap + + * typemanager.cs (intptr_type): Core type for System.IntPtr + + (InitCoreTypes): Update for the same. + + (iasyncresult_type, asynccallback_type): Ditto. + + * delegate.cs (Populate): Fix to use System.Intptr as it is indeed + correct. + + * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class + too. + + * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold + the builders for the 4 members of a delegate type :-) + + (Populate): Define the BeginInvoke and EndInvoke methods on the delegate + type. + + * expression.cs (New::DoResolve): Implement guts for delegate creation. + + * ../errors/errors.txt : Update for an error (-11) which only we catch :-) + +2001-10-15 Miguel de Icaza + + * statement.cs (Break::Emit): Implement. + (Continue::Emit): Implement. + + (For::Emit): Track old being/end loops; Set Begin loop, ack end loop + (While::Emit): Track old being/end loops; Set Begin loop, ack end loop + (Do::Emit): Track old being/end loops; Set Begin loop, ack end loop + (Foreach::Emit): Track old being/end loops; Set Begin loop, ack + end loop + + * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New + properties that track the label for the current loop (begin of the + loop and end of the loop). + +2001-10-15 Ravi Pratap + + * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible + use of emitting anything at all. + + * class.cs, rootcontext.cs : Get rid of calls to the same. + + * delegate.cs (DefineDelegate): Make sure the class we define is also sealed. + + (Populate): Define the constructor correctly and set the implementation + attributes. + + * typemanager.cs (delegate_types): New hashtable to hold delegates that + have been defined. + + (AddDelegateType): Implement. + + (IsDelegateType): Implement helper method. + + * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType. + + * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type + and accordingly handle it. + + * delegate.cs (Populate): Take TypeContainer argument. + Implement bits to define the Invoke method. However, I still haven't figured out + how to take care of the native int bit :-( + + * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) + Qualify the name of the delegate, not its return type ! + + * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array + conversion. + + (StandardConversionExists): Checking for array types turns out to be recursive. + + (ConvertReferenceExplicit): Implement array conversion. + + (ExplicitReferenceConversionExists): New method to determine precisely that :-) + +2001-10-12 Ravi Pratap + + * cs-parser.jay (delegate_declaration): Store the fully qualified + name as it is a type declaration. + + * delegate.cs (ReturnType, Name): Rename members to these. Make them + readonly. + + (DefineDelegate): Renamed from Define. Does the same thing essentially, + as TypeContainer::DefineType. + + (Populate): Method in which all the definition of the various methods (Invoke) + etc is done. + + (Emit): Emit any code, if necessary. I am not sure about this really, but let's + see. + + (CloseDelegate): Finally creates the delegate. + + * class.cs (TypeContainer::DefineType): Update to define delegates. + (Populate, Emit and CloseType): Do the same thing here too. + + * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include + delegates in all these operations. + +2001-10-14 Miguel de Icaza + + * expression.cs: LocalTemporary: a new expression used to + reference a temporary that has been created. + + * assign.cs: Handle PropertyAccess back here, so that we can + provide the proper semantic access to properties. + + * expression.cs (Expression::ConvertReferenceExplicit): Implement + a few more explicit conversions. + + * modifiers.cs: `NEW' modifier maps to HideBySig. + + * expression.cs (PropertyExpr): Make this into an + ExpressionStatement, and support the EmitStatement code path. + + Perform get/set error checking, clean up the interface. + + * assign.cs: recognize PropertyExprs as targets, and if so, turn + them into toplevel access objects. + +2001-10-12 Miguel de Icaza + + * expression.cs: PropertyExpr::PropertyExpr: use work around the + SRE. + + * typemanager.cs: Keep track here of our PropertyBuilders again to + work around lameness in SRE. + +2001-10-11 Miguel de Icaza + + * expression.cs (LValue::LValueResolve): New method in the + interface, used to perform a second resolution pass for LValues. + + (This::DoResolve): Catch the use of this in static methods. + + (This::LValueResolve): Implement. + + (This::Store): Remove warning, assigning to `this' in structures + is + + (Invocation::Emit): Deal with invocation of + methods on value types. We need to pass the address to structure + methods rather than the object itself. (The equivalent code to + emit "this" for structures leaves the entire structure on the + stack instead of a pointer to it). + + (ParameterReference::DoResolve): Compute the real index for the + argument based on whether the method takes or not a `this' pointer + (ie, the method is static). + + * codegen.cs (EmitContext::GetTemporaryStorage): Used to store + value types returned from functions when we need to invoke a + method on the sturcture. + + +2001-10-11 Ravi Pratap + + * class.cs (TypeContainer::DefineType): Method to actually do the business of + defining the type in the Modulebuilder or Typebuilder. This is to take + care of nested types which need to be defined on the TypeBuilder using + DefineNestedMethod. + + (TypeContainer::GetClassBases): Implement. Essentially the code from the + methods in RootContext, only ported to be part of TypeContainer. + + (TypeContainer::GetInterfaceOrClass): Ditto. + + (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto. + + * interface.cs (Interface::DefineInterface): New method. Does exactly + what RootContext.CreateInterface did earlier, only it takes care of nested types + too. + + (Interface::GetInterfaces): Move from RootContext here and port. + + (Interface::GetInterfaceByName): Same here. + + * rootcontext.cs (ResolveTree): Re-write. + + (PopulateTypes): Re-write. + + * class.cs (TypeContainer::Populate): Populate nested types too. + (TypeContainer::Emit): Emit nested members too. + + * typemanager.cs (AddUserType): Do not make use of the FullName property, + instead just use the name argument passed in as it is already fully + qualified. + + (FindMembers): Check in the Builders to TypeContainer mapping instead of the name + to TypeContainer mapping to see if a type is user-defined. + + * class.cs (TypeContainer::CloseType): Implement. + + (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating + the default constructor. + + (TypeContainer::Populate): Fix minor bug which led to creating default constructors + twice. + + (Constructor::IsDefault): Fix up logic to determine if it is the default constructor + + * interface.cs (CloseType): Create the type here. + + * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through + the hierarchy. + + Remove all the methods which are now in TypeContainer. + +2001-10-10 Ravi Pratap + + * delegate.cs (Define): Re-write bits to define the delegate + correctly. + +2001-10-10 Miguel de Icaza + + * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe + + * expression.cs (ImplicitReferenceConversion): handle null as well + as a source to convert to any reference type. + + * statement.cs (Return): Perform any implicit conversions to + expected return type. + + Validate use of return statement. + + * codegen.cs (EmitContext): Pass the expected return type here. + + * class.cs (Method, Constructor, Property): Pass expected return + type to EmitContext. + +2001-10-09 Miguel de Icaza + + * expression.cs: Make DoResolve take an EmitContext instead of a + TypeContainer. + + Replaced `l' and `location' for `loc', for consistency. + + (Error, Warning): Remove unneeded Tc argument. + + * assign.cs, literal.cs, constant.cs: Update to new calling + convention. + + * codegen.cs: EmitContext now contains a flag indicating whether + code is being generated in a static method or not. + + * cs-parser.jay: DecomposeQI, new function that replaces the old + QualifiedIdentifier. Now we always decompose the assembled + strings from qualified_identifier productions into a group of + memberaccesses. + +2001-10-08 Miguel de Icaza + + * rootcontext.cs: Deal with field-less struct types correctly now + by passing the size option to Define Type. + + * class.cs: Removed hack that created one static field. + +2001-10-07 Miguel de Icaza + + * statement.cs: Moved most of the code generation here. + +2001-10-09 Ravi Pratap + + * expression.cs (New::DoResolve): Revert changes for array creation, doesn't + seem very right. + + (ElementAccess): Remove useless bits for now - keep checks as the spec + says. + +2001-10-08 Ravi Pratap + + * expression.cs (ElementAccess::DoResolve): Remove my crap code + and start performing checks according to the spec. + +2001-10-07 Ravi Pratap + + * cs-parser.jay (type_suffix*): Remove - they are redundant. Use + rank_specifiers instead. + + (rank_specifiers): Change the order in which the rank specifiers are stored + + (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes. + + * expression.cs (ElementAccess): Implement the LValue interface too. + +2001-10-06 Ravi Pratap + + * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit + except that user defined conversions are not included. + + (UserDefinedConversion): Update to use the ConvertExplicitStandard to + perform the conversion of the return type, if necessary. + + (New::DoResolve): Check whether we are creating an array or an object + and accordingly do the needful. + + (New::Emit): Same here. + + (New::DoResolve): Implement guts of array creation. + + (New::FormLookupType): Helper function. + +2001-10-07 Miguel de Icaza + + * codegen.cs: Removed most of the code generation here, and move the + corresponding code generation bits to the statement classes. + + Added support for try/catch/finalize and throw. + + * cs-parser.jay: Added support for try/catch/finalize. + + * class.cs: Catch static methods having the flags override, + virtual or abstract. + + * expression.cs (UserCast): This user cast was not really doing + what it was supposed to do. Which is to be born in fully resolved + state. Parts of the resolution were being performed at Emit time! + + Fixed this code. + +2001-10-05 Miguel de Icaza + + * expression.cs: Implicity convert the result from UserCast. + +2001-10-05 Ravi Pratap + + * expression.cs (Expression::FindMostEncompassingType): Fix bug which + prevented it from working correctly. + + (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not + merely ConvertImplicit. + +2001-10-05 Miguel de Icaza + + * typemanager.cs: Make the LookupTypeContainer function static, + and not per-instance. + + * class.cs: Make static FindMembers (the one that takes a Type + argument). + + * codegen.cs: Add EmitForeach here. + + * cs-parser.jay: Make foreach a toplevel object instead of the + inline expansion, as we need to perform semantic analysis on it. + +2001-10-05 Ravi Pratap + + * expression.cs (Expression::ImplicitUserConversion): Rename to + UserDefinedConversion. + + (Expression::UserDefinedConversion): Take an extra argument specifying + whether we look for explicit user conversions too. + + (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion. + + (UserDefinedConversion): Incorporate support for user defined explicit conversions. + + (ExplicitUserConversion): Make it a call to UserDefinedConversion + with the appropriate arguments. + + * cs-parser.jay (cast_expression): Record location too. + + * expression.cs (Cast): Record location info. + + (Expression::ConvertExplicit): Take location argument. + + (UserImplicitCast): Change name to UserCast. Take an extra constructor argument + to determine if we are doing explicit conversions. + + (UserCast::Emit): Update accordingly. + + (Expression::ConvertExplicit): Report an error if everything fails. + + * ../errors/cs0030.cs : Add. + +2001-10-04 Miguel de Icaza + + * modifiers.cs: If the ABSTRACT keyword is present, also set the + virtual and newslot bits. + + * class.cs (TypeContainer::RegisterRequiredImplementations): + Record methods we need. + + (TypeContainer::MakeKey): Helper function to make keys for + MethodBases, since the Methodbase key is useless. + + (TypeContainer::Populate): Call RegisterRequiredImplementations + before defining the methods. + + Create a mapping for method_builders_to_methods ahead of time + instead of inside a tight loop. + + (::RequireMethods): Accept an object as the data to set into the + hashtable so we can report interface vs abstract method mismatch. + +2001-10-03 Miguel de Icaza + + * report.cs: Make all of it static. + + * rootcontext.cs: Drop object_type and value_type computations, as + we have those in the TypeManager anyways. + + Drop report instance variable too, now it is a global. + + * driver.cs: Use try/catch on command line handling. + + Add --probe option to debug the error reporting system with a test + suite. + + * report.cs: Add support for exiting program when a probe + condition is reached. + +2001-10-03 Ravi Pratap + + * expression.cs (Binary::DoNumericPromotions): Fix the case when + we do a forcible conversion regardless of type, to check if + ForceConversion returns a null. + + (Binary::error19): Use location to report error. + + (Unary::error23): Use location here too. + + * ../errors/cs0019.cs : Check in. + + * ../errors/cs0023.cs : Check in. + + * expression.cs (Expression.MemberLookup): Return null for a rather esoteric + case of a non-null MethodInfo object with a length of 0 ! + + (Binary::ResolveOperator): Flag error if overload resolution fails to find + an applicable member - according to the spec :-) + Also fix logic to find members in base types. + + (Unary::ResolveOperator): Same here. + + (Unary::report23): Change name to error23 and make first argument a TypeContainer + as I was getting thoroughly confused between this and error19 :-) + + * expression.cs (Expression::ImplicitUserConversion): Re-write fully + (::FindMostEncompassedType): Implement. + (::FindMostEncompassingType): Implement. + (::StandardConversionExists): Implement. + + (UserImplicitCast): Re-vamp. We now need info about most specific + source and target types so that we can do the necessary conversions. + + (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper + mathematical union with no duplicates. + +2001-10-03 Miguel de Icaza + + * rootcontext.cs (RootContext::PopulateTypes): Populate containers + in order from base classes to child classes, so that we can in + child classes look up in our parent for method names and + attributes (required for handling abstract, virtual, new, override + constructs: we need to instrospect our base class, and if we dont + populate the classes in order, the introspection might be + incorrect. For example, a method could query its parent before + the parent has any methods and would determine that the parent has + no abstract methods (while it could have had them)). + + (RootContext::CreateType): Record the order in which we define the + classes. + +2001-10-02 Miguel de Icaza + + * class.cs (TypeContainer::Populate): Also method definitions can + fail now, keep track of this. + + (TypeContainer::FindMembers): Implement support for + DeclaredOnly/noDeclaredOnly flag. + + (Constructor::Emit) Return the ConstructorBuilder. + + (Method::Emit) Return the MethodBuilder. + Check for abstract or virtual methods to be public. + + * rootcontext.cs (RootContext::CreateType): Register all the + abstract methods required for the class to be complete and the + interface methods that must be implemented. + + * cs-parser.jay: Report error 501 (method requires body if it is + not marked abstract or extern). + + * expression.cs (TypeOf::Emit): Implement. + + * typemanager.cs: runtime_handle_type, new global type. + + * class.cs (Property::Emit): Generate code for properties. + +2001-10-02 Ravi Pratap + + * expression.cs (Unary::ResolveOperator): Find operators on base type + too - we now conform exactly to the spec. + + (Binary::ResolveOperator): Same here. + + * class.cs (Operator::Define): Fix minor quirk in the tests. + + * ../errors/cs0215.cs : Added. + + * ../errors/cs0556.cs : Added. + + * ../errors/cs0555.cs : Added. + +2001-10-01 Miguel de Icaza + + * cs-tokenizer.cs: Reimplemented Location to be a struct with a + single integer which is really efficient + +2001-10-01 Ravi Pratap + + * expression.cs (Expression::ImplicitUserConversion): Use location + even in the case when we are examining True operators. + + * class.cs (Operator::Define): Perform extensive checks to conform + with the rules for operator overloading in the spec. + + * expression.cs (Expression::ImplicitReferenceConversion): Implement + some of the other conversions mentioned in the spec. + + * typemanager.cs (array_type): New static member for the System.Array built-in + type. + + (cloneable_interface): For System.ICloneable interface. + + * driver.cs (Driver::Driver): Initialize TypeManager's core types even before + we start resolving the tree and populating types. + + * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10 + +2001-10-01 Miguel de Icaza + + * expression.cs (Expression::ExprClassFromMemberInfo, + Expression::Literalize): Create literal expressions from + FieldInfos which are literals. + + (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few + type casts, because they were wrong. The test suite in tests + caught these ones. + + (ImplicitNumericConversion): ushort to ulong requires a widening + cast. + + Int32 constant to long requires widening cast as well. + + * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants + for integers because the type on the stack is not i4. + +2001-09-30 Miguel de Icaza + + * expression.cs (report118): require location argument. + + * parameter.cs: Do not dereference potential null value. + + * class.cs: Catch methods that lack the `new' keyword when + overriding a name. Report warnings when `new' is used without + anything being there to override. + + * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot. + + * class.cs: Only add constructor to hashtable if it is non-null + (as now constructors can fail on define). + + (TypeManager, Class, Struct): Take location arguments. + + Catch field instance initialization in structs as errors. + + accepting_filter: a new filter for FindMembers that is static so + that we dont create an instance per invocation. + + (Constructor::Define): Catch errors where a struct constructor is + parameterless + + * cs-parser.jay: Pass location information for various new + constructs. + + * delegate.cs (Delegate): take a location argument. + + * driver.cs: Do not call EmitCode if there were problesm in the + Definition of the types, as many Builders wont be there. + + * decl.cs (Decl::Decl): Require a location argument. + + * cs-tokenizer.cs: Handle properly hex constants that can not fit + into integers, and find the most appropiate integer for it. + + * literal.cs: Implement ULongLiteral. + + * rootcontext.cs: Provide better information about the location of + failure when CreateType fails. + +2001-09-29 Miguel de Icaza + + * rootcontext.cs (RootContext::PopulateTypes): Populates structs + as well. + + * expression.cs (Binary::CheckShiftArguments): Add missing type + computation. + (Binary::ResolveOperator): Add type to the logical and and logical + or, Bitwise And/Or and Exclusive Or code paths, it was missing + before. + + (Binary::DoNumericPromotions): In the case where either argument + is ulong (and most signed types combined with ulong cause an + error) perform implicit integer constant conversions as well. + +2001-09-28 Miguel de Icaza + + * expression.cs (UserImplicitCast): Method should always be + non-null. + (Invocation::BetterConversion): Simplified test for IntLiteral. + + (Expression::ImplicitNumericConversion): Split this routine out. + Put the code that performs implicit constant integer conversions + here. + + (Expression::Resolve): Become a wrapper around DoResolve so we can + check eclass and type being set after resolve. + + (Invocation::Badness): Remove this dead function + + (Binary::ResolveOperator): Do not compute the expensive argumnets + unless we have a union for it. + + (Probe::Emit): Is needs to do an isinst and then + compare against null. + + (::CanConvert): Added Location argument. If the Location argument + is null (Location.Null), then we do not report errors. This is + used by the `probe' mechanism of the Explicit conversion. We do + not want to generate an error for something that the user + explicitly requested to be casted. But the pipeline for an + explicit cast first tests for potential implicit casts. + + So for now, if the Location is null, it means `Probe only' to + avoid adding another argument. Might have to revise this + strategy later. + + (ClassCast): New class used to type cast objects into arbitrary + classes (used in Explicit Reference Conversions). + + Implement `as' as well. + + Reverted all the patches from Ravi below: they were broken: + + * The use of `level' as a mechanism to stop recursive + invocations is wrong. That was there just to catch the + bug with a strack trace but not as a way of addressing + the problem. + + To fix the problem we have to *understand* what is going + on and the interactions and come up with a plan, not + just get things going. + + * The use of the type conversion cache that I proposed + last night had an open topic: How does this work across + protection domains. A user defined conversion might not + be public in the location where we are applying the + conversion, a different conversion might be selected + (ie, private A->B (better) but public B->A (worse), + inside A, A->B applies, but outside it, B->A will + apply). + + * On top of that (ie, even if the above is solved), + conversions in a cache need to be abstract. Ie, `To + convert from an Int to a Short use an OpcodeCast', not + `To convert from an Int to a Short use the OpcodeCast on + the variable 5' (which is what this patch was doing). + +2001-09-28 Ravi Pratap + + * expression.cs (Invocation::ConversionExists): Re-write to use + the conversion cache + + (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also + cache all conversions done, not just user-defined ones. + + (Invocation::BetterConversion): The real culprit. Use ConversionExists + to determine if a conversion exists instead of acutually trying to + perform the conversion. It's faster too. + + (Expression::ConvertExplicit): Modify to use ConversionExists to check + and only then attempt the implicit conversion. + +2001-09-28 Ravi Pratap + + * expression.cs (ConvertImplicit): Use a cache for conversions + already found. Check level of recursion and bail out if necessary. + +2001-09-28 Miguel de Icaza + + * typemanager.cs (string_concat_string_string, string_concat_object_object): + Export standard methods that we expect for string operations. + + * statement.cs (Block::UsageWarning): Track usage of variables and + report the errors for not used variables. + + * expression.cs (Conditional::Resolve, ::Emit): Implement ?: + operator. + +2001-09-27 Miguel de Icaza + + * codegen.cs: remove unnneded code + + * expression.cs: Removed BuiltinTypeAccess class + + Fix the order in which implicit conversions are + done. + + The previous fixed dropped support for boxed conversions (adding a + test to the test suite now) + + (UserImplicitCast::CanConvert): Remove test for source being null, + that code is broken. We should not feed a null to begin with, if + we do, then we should track the bug where the problem originates + and not try to cover it up here. + + Return a resolved expression of type UserImplicitCast on success + rather than true/false. Ravi: this is what I was talking about, + the pattern is to use a static method as a "constructor" for + objects. + + Also, do not create arguments until the very last minute, + otherwise we always create the arguments even for lookups that + will never be performed. + + (UserImplicitCast::Resolve): Eliminate, objects of type + UserImplicitCast are born in a fully resolved state. + + * typemanager.cs (InitCoreTypes): Init also value_type + (System.ValueType). + + * expression.cs (Cast::Resolve): First resolve the child expression. + + (LValue): Add new method AddressOf to be used by + the `&' operator. + + Change the argument of Store to take an EmitContext instead of an + ILGenerator, because things like FieldExpr need to be able to call + their children expression to generate the instance code. + + (Expression::Error, Expression::Warning): Sugar functions for + reporting errors. + + (Expression::MemberLookup): Accept a TypeContainer instead of a + Report as the first argument. + + (Expression::ResolvePrimary): Killed. I still want to improve + this as currently the code is just not right. + + (Expression::ResolveMemberAccess): Simplify, but it is still + wrong. + + (Unary::Resolve): Catch errors in AddressOf operators. + + (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast + index to a byte for the short-version, or the compiler will choose + the wrong Emit call, which generates the wrong data. + + (ParameterReference::Emit, ::Store): same. + + (FieldExpr::AddressOf): Implement. + + * typemanager.cs: TypeManager: made public variable instead of + property. + + * driver.cs: document --fatal. + + * report.cs (ErrorMessage, WarningMessage): new names for the old + Error and Warning classes. + + * cs-parser.jay (member_access): Turn built-in access to types + into a normal simplename + +2001-09-27 Ravi Pratap + + * 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 + + * expression.cs (UserImplicitCast::Resolve): Fix bug. + +2001-09-27 Ravi Pratap + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * driver.cs: Change the wording of message + +2001-09-25 Ravi Pratap + + * expression.cs (Binary::ResolveOperator): Had forgottten to set + the type of the expression to the return type of the method if + we have an overloaded operator match ! The regression tests pass again ! + (Unary::ResolveOperator): Ditto. + + * expression.cs (Invocation::ConversionExists): Correct the member lookup + to find "op_Implicit", not "implicit" ;-) + (UserImplicitCast): New class to take care of user-defined implicit conversions. + (ConvertImplicit, ForceConversion): Take TypeContainer argument + + * everywhere : Correct calls to the above accordingly. + + * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement. + (ConvertImplicit): Do user-defined conversion if it exists. + +2001-09-24 Miguel de Icaza + + * assign.cs: track location. + (Resolve): Use implicit conversions on assignment. + + * literal.cs: Oops. Not good, Emit of short access values should + pass (Bytes) or the wrong argument will be selected. + + * expression.cs (Unary::Emit): Emit code for -expr. + + (Unary::ResolveOperator): Handle `Substract' for non-constants + (substract from zero from the non-constants). + Deal with Doubles as well. + + (Expression::ConvertImplicitRequired): New routine that reports an + error if no implicit conversion exists. + + (Invocation::OverloadResolve): Store the converted implicit + expressions if we make them + +2001-09-24 Ravi Pratap + + * class.cs (ConstructorInitializer): Take a Location argument. + (ConstructorBaseInitializer): Same here. + (ConstructorThisInitializer): Same here. + + * cs-parser.jay : Update all calls accordingly. + + * expression.cs (Unary, Binary, New): Take location argument. + Update accordingly everywhere. + + * cs-parser.jay : Update all calls to the above to take a location + argument. + + * class.cs : Ditto. + +2001-09-24 Ravi Pratap + + * expression.cs (Invocation::BetterFunction): Take TypeContainer argument + (Invocation::BetterConversion): Same here + (Invocation::ConversionExists): Ditto. + + (Invocation::ConversionExists): Implement. + 2001-09-22 Ravi Pratap * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503