* Type.cs (IsUserType) Replace the current hacky way with
a virtual call. This removes a direct dependency on a type
and a bunch of stuff that would otherwise be loaded for
no good reason.
* mcs/class/corlib/System.Reflection/MonoGenericClass.cs:
* mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs:
Use Type.EmptyTypes instead of new Type[0]
* MonoGenericClass.cs (.ctor): Only register with the runtime
when the underlying TB is not finished.
* MonoGenericClassTest.cs: Add regression test.
* TypeTest.cs: Fix a test that had a broken assumption.
Fix#642130
* Type.cs: Add ResolveInternal virtual call that
resolves a given type to it's concrete type.
2010-04-08 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Implement ResolveInternal.
2010-04-08 Rodrigo Kumpera <[email protected]>
* EnumBuilder.cs:
* GenericTypeParameterBuilder.cs:
* DerivedTypes.cs:
* TypeBuilder.cs: Add ResolveInternal virtual call that
resolves a given type to it's concrete type.
* TypeBuilder.cs (DefineDefaultConstructor): Use
ResolveInternal on parent to do the lookup on a
finished type.
Fixes#591225.
svn path=/trunk/mcs/; revision=155115
* MonoGenericClass.cs (GetMethods): When the GTD is not a typebuilder,
calling GetMethods on it will return everything we need so no need to
do the crazy loop.
The returned methods might contains some that are not from a generic type
so we need to guard against this as well.
* MonoGenericClass.cs (GetMethodsInternal): Guard against methods that don't
belong to a GTD as well.
svn path=/trunk/mcs/; revision=148735
Type.cs (IsCompilerContext): The default implementation now checks if the
type's assembly is under compiler context or not.
2009-12-14 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Remove IsByRef hack.
2009-12-14 Rodrigo Kumpera <[email protected]>
* TypeBuilder.cs (GetConstructor/GetMethod): Fail with a NRE if method/ctor
is null.
2009-12-14 Rodrigo Kumpera <[email protected]>
* TypeTest.cs: Fix test that checked for old and wrong behavior of mono.
svn path=/trunk/mcs/; revision=148433
* MonoType.cs: Make the GetConstructorImpl machinery available
to be used by others.
* Type.cs (MakeGenericType): Is any of the arguments is not a system
type create an instance of MonoGenericClass instead.
2009-12-12 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Change it to support a non-sre generic type
definition.
2009-12-10 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs (MakeGenericType): Accept a Type as argument.
* ConstructorOnTypeBuilderInst.cs: Change it to support an underlying
non-sre constructor.
* MethodOnTypeBuilderInst.cs: Change it to support an underlying
non-sre method.
* FieldOnTypeBuilderInst.cs: Change it to support an underlying
non-sre field.
* EventOnTypeBuilderInst.cs: Change it to support an underlying
non-sre event.
svn path=/trunk/mcs/; revision=148338
* AssemblyBuilder.cs: Add MakeGenericType method while takes care of doing
generic instance canonicalization under compiler context.
* DerivedTypes.cs: Add ArrayType::GetEffectiveRank to make it possible to
distinguish between [] and [*].
* TypeBuilder.cs: Implement MakeGenericType in managed code.
2009-12-10 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Add new register_with_runtime icall to make
sure that a managed code instantiated MGC will be returned when
the generic instantiation happens in unmanaged code.
This is a temporary workaround while Type::MakeGenericType doesn't
handle user types properly.
svn path=/trunk/mcs/; revision=148083
* MonoGenericClass.cs: Make this class inherit from Type instead of
MonoType. Implement some missing methods and make sure we can still
be used as a byref type.
svn path=/trunk/mcs/; revision=148082
* MonoGenericClass.cs (InflateType): Add a type argument parameter and
make this function static. Now it can inflate types using the context
of any type.
svn path=/trunk/mcs/; revision=147665
* MonoGenericClass.cs: Implement almost all methods required
to move to inherit from System.Type. The only missing methods
are Is(Array|Pointer|ByRef)Impl and GetElementType since the
runtime still generates weird instances for generics instances
of non-SRE types with SRE types as generic arguments.
2009-08-07 Rodrigo Kumpera <[email protected]>
* MonoGenericClassTest.cs: Test for methods that must
throw.
svn path=/trunk/mcs/; revision=139596
* MonoGenericClass.cs (FullName): mcs depends that FullName
doesn't return null for instantiations over generic params
of type builders. We special case this under compiler context.
svn path=/trunk/mcs/; revision=139403
* MonoGenericClass.cs: Remove Is(Array|Pointer|ByRef)Impl
and GetElementType since the runtime still produces instances
of MonoGenericClass for those types.
svn path=/trunk/mcs/; revision=139400
* MonoGenericClass.cs (initialize): Remember the number
of events available at initialization time. This is required as
mcs expect this behavior under compiler context that new events
are not returned for an instance that was inflated before.
* MonoGenericClass.cs: Kill GetEvents_internal and implement it
in terms of managed code.
2009-08-03 Rodrigo Kumpera <[email protected]>
* EventBuilder.cs: Make some fields internal.
* TypeBuilder.cs: Make events field internal.
Remove some MonoTODOs that are already done.
* EventOnTypeBuilderInst.cs: New file which implements
the required functionality by compiler context.
svn path=/trunk/mcs/; revision=139307
* TypeBuilder.cs (GetConstructors): Throw if
TypeBuilder is incomplete.
2009-07-29 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs (initialize): Call TypeBuilder::GetConstructorsInternal
since the public version throws.
2009-07-29 Rodrigo Kumpera <[email protected]>
* TypeBuilderTest: Test for GetConstructors.
svn path=/trunk/mcs/; revision=139009
* EventBuilder.cs: Make some fields internal.
* TypeBuilder.cs: Make events field internal.
Remove some MonoTODOs that are already done.
2009-07-24 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs (initialize): Remember the number
of events available at initialization time. This is required as
mcs expect this behavior under compiler context that new events
are not returned for an instance that was inflated before.
* MonoGenericClass.cs: Kill GetEvents_internal and implement it
in terms of managed code.
svn path=/trunk/mcs/; revision=138669
* MonoGenericClass.cs: Make all icalls private. Kill GetInterfaces_internal.
Add a workaround for a GetField under compiler context.
2009-07-24 Rodrigo Kumpera <[email protected]>
* TypeBuilder.cs: Make the interfaces field internal.
svn path=/trunk/mcs/; revision=138667
* FieldOnTypeBuilderInst.cs: Add a ToString() to help debugging.
Make fields internal.
* MethodOnTypeBuilderInst.cs: Build it under BOOTSTRAP_NET_2_0.
2009-07-24 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs (GetMethod): Use the new code always. Don't
accept MethodOnTypeBuilderInst under compiler context.
* MonoGenericClass.cs (GetField): Use the new code always.
* MonoGenericClass.cs: Make a bunch of methods raise NotSupportedException
when not under compiler context. Remove some dead code.
svn path=/trunk/mcs/; revision=138640
* ConstructorBuilder.cs: Make parameters and pinfo fields internal.
* ConstructorOnTypeBuilderInst.cs: Build it under BOOTSTRAP_NET_2_0.
Properly implement GetParameters under compiler context.
* TypeBuilder.cs: Make ctors field internal.
2009-07-23 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Kill GetConstructors_internal and implement it
all in terms of managed code.
* MonoGenericClass.cs: Return instances of ConstructorOnTypeBuilderInst
under bootstrap profile.
svn path=/trunk/mcs/; revision=138591
* FieldOnTypeBuilderInst.cs: Implement MetadataToken and FieldToken
for compiler context.
* TypeBuilder.cs: Make FieldBuilder related fields internal.
2009-07-23 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Kill GetFields_internal and implement it
all in terms of managed code.
svn path=/trunk/mcs/; revision=138590
* PropertyOnTypeBuilderInst.cs: Use TypeBuilder::GetMethod instead of
MonoGenericClass::GetCorrespondingInflatedMethod. This is possible
since the returned methods of MonoGenericClass::GetMethods have been
unified with TypeBuilder::GetMethod.
* TypeBuilder.cs: Make property related fields internal.
2009-07-23 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Kill GetMethods_internal and implement it
all in terms of managed code.
svn path=/trunk/mcs/; revision=138589
* MethodOnTypeBuilderInst.cs: Implement ToString to help debugging.
* TypeBuilder.cs: Make the properties field internal.
* PropertyOnTypeBuilderInst.cs: New type implementing a property of an
inflated TypeBuilder.
2009-07-22 Rodrigo Kumpera <[email protected]>
* MonoGenericClass.cs: Kill GetProperties_internal and implement it
all in terms of managed code.
svn path=/trunk/mcs/; revision=138482