2001-08-08 Miguel de Icaza * class.cs (TypeContainer::TypeAttr): Virtualize. (Class::TypeAttr): Return attributes suitable for this bad boy. (Struct::TypeAttr): ditto. Handle nested classes. (TypeContainer::) Remove all the type visiting code, it is now replaced with the rootcontext.cs code * rootcontext.cs (GetClassBases): Added support for structs. 2001-08-06 Miguel de Icaza * interface.cs, statement.cs, class.cs, parameter.cs, rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay: Drop use of TypeRefs, and use strings instead. 2001-08-04 Miguel de Icaza * rootcontext.cs: * class.cs (Struct::Struct): set the SEALED flags after checking the modifiers. (TypeContainer::TypeAttr): new property, returns the TypeAttributes for a class. * cs-parser.jay (type_list): Oops, list production was creating a new list of base types. * rootcontext.cs (StdLib): New property. (GetInterfaceTypeByName): returns an interface by type name, and encapsulates error handling here. (GetInterfaces): simplified. (ResolveTree): Encapsulated all the tree resolution here. (CreateClass, GetClassBases, GetInterfaceOrClass): Create class types. * driver.cs: Add support for --nostdlib, to avoid loading the default assemblies. (Main): Do not put tree resolution here. * rootcontext.cs: Beginning of the class resolution. 2001-08-03 Miguel de Icaza * rootcontext.cs: Provide better error reporting. * cs-parser.jay (interface_base): set our $$ to be interfaces. * rootcontext.cs (CreateInterface): Handle the case where there are no parent interfaces. (CloseTypes): Routine to flush types at the end. (CreateInterface): Track types. (GetInterfaces): Returns an array of Types from the list of defined interfaces. * typemanager.c (AddUserType): Mechanism to track user types (puts the type on the global type hash, and allows us to close it at the end). 2001-08-02 Miguel de Icaza * tree.cs: Removed RecordType, added RecordClass, RecordStruct and RecordInterface instead. * cs-parser.jay: Updated to reflect changes above. * decl.cs (Definition): Keep track of the TypeBuilder type that represents this type here. Not sure we will use it in the long run, but wont hurt for now. * driver.cs: Smaller changes to accomodate the new code. Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly when done. * rootcontext.cs (CreateInterface): New method, used to create the System.TypeBuilder type for interfaces. (ResolveInterfaces): new entry point to resolve the interface hierarchy. (CodeGen): Property, used to keep track of the code generator. 2001-07-26 Miguel de Icaza * cs-parser.jay: Add a second production for delegate_declaration with `VOID'. (enum_body): Put an opt_comma here instead of putting it on enum_body or enum_member_declarations so we can handle trailing commas on enumeration members. Gets rid of a shift/reduce. (type_list): Need a COMMA in the middle. (indexer_declaration): Tell tokenizer to recognize get/set * Remove old targets. * Re-add the parser target. 2001-07-13 Simon Cozens * cs-parser.jay: Add precendence rules for a number of operators ot reduce the number of shift/reduce conflicts in the grammar. 2001-07-17 Miguel de Icaza * tree.cs: moved IGenerator interface and renamed it to ITreeDump and put it here. Get rid of old crufty code. * rootcontext.cs: Use this to keep track of the parsed representation and the defined types available to the program. * gen-treedump.cs: adjust for new convention. * type.cs: Split out the type manager, and the assembly builder from here. * typemanager.cs: the type manager will live here now. * cil-codegen.cs: And the code generator here. 2001-07-14 Sean MacIsaac * makefile: Fixed up for easy making. 2001-07-13 Simon Cozens * cs-parser.jay (rank_specifier): Remove a conflict by reordering the (unary_expression): Expand pre_increment_expression and post_decrement_expression to reduce a shift/reduce. 2001-07-11 Simon Cozens * cs-tokenizer.cs: Hex numbers should begin with a 0. Improve allow_keyword_as_indent name. 2001-06-19 Miguel de Icaza * Adjustments for Beta2. 2001-06-13 Miguel de Icaza * decl.cs: Added `Define' abstract method. (InTransit): new property, used to catch recursive definitions. * interface.cs: Implement `Define'. * modifiers.cs: Map Modifiers.constants to System.Reflection.TypeAttribute flags. * class.cs: Keep track of types and user-defined types. (BuilderInit): New method for creating an assembly (ResolveType): New function to launch the resolution process, only used by interfaces for now. * cs-parser.jay: Keep track of Classes, Structs and Interfaces that are inserted into the name space. 2001-06-08 Miguel de Icaza * ARGH. I have screwed up my tree so many times due to the use of rsync rather than using CVS. Going to fix this at once. * driver.cs: Objetify driver. Load assemblies, use assemblies to load types. 2001-06-07 Miguel de Icaza * Experiment successful: Use System.Type rather that our own version of Type. 2001-05-25 Miguel de Icaza * cs-parser.jay: Removed nsAliases from here. Use new namespaces, handle `using XXX;' * namespace.cs: Reimplemented namespace handling, use a recursive definition of the class. Now we can keep track of using clauses and catch invalid using clauses. 2001-05-24 Miguel de Icaza * gen-treedump.cs: Adapted for all the renaming. * expression.cs (Expression): this class now has a Type property which returns an expression Type. (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from `Type', as this has a different meaning now in the base 2001-05-22 Miguel de Icaza * interface.cs, class.cs: Removed from all the sources the references to signature computation, as we can not do method signature computation during the parsing time, as we are not trying to solve at that point distinguishing: class X { void a (Blah x) {} void a (NS.Blah x) {} } Which depending on the context might be valid or not, as we do not know if Blah is the same thing as NS.Blah at that point. * Redid everything so the code uses TypeRefs now instead of Types. TypeRefs are just temporary type placeholders, that need to be resolved. They initially have a pointer to a string and the current scope in which they are used. This is used later by the compiler to resolve the reference to an actual Type. * DeclSpace is no longer a CIR.Type, and neither are TypeContainers (Class and Struct) nor Interfaces nor Enums. They are all DeclSpaces, but no Types. * type.cs (TypeRefManager): This implements the TypeRef manager, which keeps track of all the types that need to be resolved after the parsing has finished. 2001-05-13 Miguel de Icaza * ARGH. We are going to have to store `foreach' as a class rather than resolving it, as we need to verify error 1579 after name resolution. *OR* we could keep a flag that says `This request to IEnumerator comes from a foreach statement' which we can then use to generate the error. 2001-05-10 Miguel de Icaza * class.cs (TypeContainer.AddMethod): we now add methods to the MethodGroup instead of the method hashtable. * expression.cs: Add MethodGroup abstraction, which gets us one step closer to the specification in the way we handle method declarations. * cs-parser.jay (primary_expression): qualified_identifier now tried to match up an identifier to a local variable reference or to a parameter reference. current_local_parameters is now a parser global variable that points to the current parameters for the block, used during name lookup. (property_declaration): Now creates an implicit `value' argument to the set accessor. 2001-05-09 Miguel de Icaza * parameter.cs: Do not use `param' arguments as part of the signature, per the spec. 2001-05-08 Miguel de Icaza * decl.cs: Base class for classes, structs and interfaces. This is the "Declaration Space" * cs-parser.jay: Use CheckDef for checking declaration errors instead of having one on each function. * class.cs: Factor out some code for handling error handling in accordance to the "Declarations" section in the "Basic Concepts" chapter in the ECMA C# spec. * interface.cs: Make all interface member classes derive from InterfaceMemberBase. 2001-05-07 Miguel de Icaza * Many things: all interfaces are parsed and generated in gen-treedump. Support for member variables, constructors, destructors, properties, constants is there. Beginning of the IL backend, but very little done, just there for testing purposes. 2001-04-29 Miguel de Icaza * cs-parser.jay: Fix labeled statement. * cs-tokenizer.cs (escape): Escape " and ' always. ref_line, ref_name: keep track of the line/filename as instructed by #line by the compiler. Parse #line. 2001-04-27 Miguel de Icaza * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum to match the values in System.CodeDOM. Divid renamed to Divide. * System.CodeDOM/CodeForLoopStatement.cs: Always have valid statements. (Statements.set): remove. * System.CodeDOM/CodeCatchClause.cs: always have a valid statements. * System.CodeDOM/CodeIfStatement.cs: trueStatements and falseStatements always have valid values. * cs-parser.jay: Use System.CodeDOM now.