Initial import of the Generic MCS tree.
authorMiguel de Icaza <miguel@gnome.org>
Thu, 24 Jul 2003 16:46:43 +0000 (16:46 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 24 Jul 2003 16:46:43 +0000 (16:46 -0000)
commit4bd57de01f582c42906bd3e9ad4f4df218606740
treed40b2f92b4a55b6a23ebcba415275b030b17ce30
parentc7cfb1e7236af539cb992e125d29524e60e4d7ea
Initial import of the Generic MCS tree.

2003-07-20  Miguel de Icaza  <miguel@ximian.com>

* cs-parser.jay (namespace_name): do not use
namespace_or_type_name, use qualified_identifier, because
namespace_or_type_name will soon return a composed expression
instead of a string.

(namespace_or_type_name): Instead of returning a string, now this
production returns an expression.

* codegen.cs (EmitContext): Setup IsGeneric property based on
whether our DeclSpace is generic, our the method is generic.

* modifier.cs (Modifiers.METHOD_GENERIC): New definition, use if
the method is generic.

* cs-parser.jay (type_arguments, opt_type_argument_list,
type_parameters, type_parameter_list, opt_type_parameter_list,
type_parameter,, opt_type_parameter_constraints_clauses,
type_parameter_constraints_clauses,
type_parameter_constraint_clause, type_parameter_constraint,
interface_constraints): Add new production

* decl.cs (DeclSpace): IsGeneric, flag to track whether this
DeclSpace is generic or not.

(DeclSpace.SetParameterInfo): New routine, used to set the
parameter info for a type.

(DeclSpace.LookupGeneric): Lookups a name, and if it is a generic,
returns a GenericTypeExpr

* ecore.cs (SimpleName.ResolveAsTypeStep): If our container is
generic, lookup the generic argument.

* attribute.cs: Do not allow TypeParameterExpressions in
Attributes.

* class.cs: Do not allow the Main method to be defined in a
Generic container.

* expression.cs (SizeOf): Do not allow generic types to be used as
arguments to sizeof.

* typemanager.cs (IsGeneric): Wrapper for Reflection when we have
it: whether a type is generic or not.  Only works for types we are
currently building for now.

2003-01-21  Miguel de Icaza  <miguel@ximian.com>

* generic.cs: New file, contains support code for generics.

* cs-parser.jay: Remove OP_SHIFT_LEFT, OP_SHIFT_RIGHT,
OP_SHIFT_LEFT_ASSIGN, OP_SHIFT_RIGHT_ASSIGN.

Update parser for the above removals.

* cs-tokenizer.cs: Do not handle <<= or >>= specially.  This is
now taken care of in the parser.

svn path=/trunk/mcs/; revision=16612
17 files changed:
mcs/gmcs/AssemblyInfo.cs
mcs/gmcs/ChangeLog
mcs/gmcs/Makefile
mcs/gmcs/attribute.cs
mcs/gmcs/class.cs
mcs/gmcs/codegen.cs
mcs/gmcs/cs-parser.jay
mcs/gmcs/cs-tokenizer.cs
mcs/gmcs/decl.cs
mcs/gmcs/driver.cs
mcs/gmcs/ecore.cs
mcs/gmcs/expression.cs
mcs/gmcs/generic.cs
mcs/gmcs/genericparser.cs
mcs/gmcs/modifiers.cs
mcs/gmcs/namespace.cs
mcs/gmcs/typemanager.cs