* TypeBuilder.cs (CreateType): Move default constructor
and createTypeCalled assignment to before the parent checks.
* TypeBuilder.cs (is_created): Return true even if creation
fails.
Fixes#331126
svn path=/trunk/mcs/; revision=155832
* 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
* AssemblyBuilder.cs (GenericInstanceKey): Precalculate
GenericInstanceKey hash code since this can cause infinite
recursion when inflating "Foo<T> : Bar<Foo<T>>" parent.
* TypeBuilder.cs (IsSubclassOf): Don't delegate to base class
since the unmanaged information can be out of sync.
* TypeBuilder.cs (UnderlyingSystemType): Invert the test order
since IsEnum now is potentialy more expensive.
Fixes#594728.
svn path=/trunk/mcs/; revision=155053
* ModuleBuilder.cs (DefinedType): Lookup inside the name_cache before creating
the TypeBuilder since the runtime code can't handle a duplicate type name.
svn path=/trunk/mcs/; revision=154486
* CustomAttributeBuilder.cs: Fix the calls to IsValidType, some were passing
in DeclaringType instead of PropertyType/FieldType.
* CustomAttributeType.cs (IsValidType): Implement proper checking for reference
types. Fixes#591788.
svn path=/trunk/mcs/; revision=154423
* CustomAttributeBuilder.cs (IsValidType): Call Enum.GetUnderlyingType () for
dynamic enums to avoid crashes in the unmanaged code. Fixes#591800.
svn path=/trunk/mcs/; revision=154419
* AssemblyBuilder.cs: Implement v4 GetType.
2010-03-25 Rodrigo Kumpera <[email protected]>
* AssemblyBuilderTest.cs: Add test for v4 GetType and
fix other test to not be broken.
svn path=/trunk/mcs/; revision=154231
* TypeBuilder.cs (GetMethod): Allow type to be the typebuilder
* itself.
Add better error checking to GetConstructor and GetField.
Fixes#587106.
svn path=/trunk/mcs/; revision=153468
2010-02-09 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Mono.CompilerServices.SymbolWriter does not
need to access mscorlib.dll internals anymore (ArrayList and
Hashtable)
In .:
2010-02-09 Sebastien Pouliot <[email protected]>
* net_2_1_raw_corlib.dll.sources: Add Mono.CompilerServices.
SymbolWriter source files directly into mscorlib 2.1
In System.Reflection.Emit:
2010-02-09 Sebastien Pouliot <[email protected]>
* ModuleBuilder.cs: Do not use reflection to create SymbolWriterImpl
for Moonlight since the code is bundled inside mscorlib.dll to avoid
having a non-platform assembly poking the internals of mscorlib.dll
svn path=/trunk/mcs/; revision=151176
* CustomAttributeBuilder.cs (Initialize): Add more argument checking to avoid
assertions in the runtime. Fixes#574353.
svn path=/trunk/mcs/; revision=150597
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
* MonoMethod.cs (MakeGenericMethod): If any of the arguments is
a non system type, inflate to a MethodOnTypeBuilderInst.
2009-12-08 Rodrigo Kumpera <[email protected]>
* MethodOnTypeBuilderInst.cs: Add new constructor that takes a MethodInfo
as base method. Change how compiler context is calculated to take the
instantiation vector into account.
svn path=/trunk/mcs/; revision=147852
* ParameterInfo.cs: Add constructor that takes an array of ParameterInfo
objects.
2009-12-08 Rodrigo Kumpera <[email protected]>
* MethodOnTypeBuilderInst.cs: Change base_method type from MethodBuilder to
MethodInfo.
svn path=/trunk/mcs/; revision=147850
* MethodBuilder.cs (MakeGenericMethod): Don't rely on the runtime to
inflate a MethodBuilder. Create directly an instance of MethodOnTypeBuilderInst.
* MethodOnTypeBuilderInst.cs (MakeGenericMethod): Cleanup this method and support
inflating already inflated methods under compiler context.
svn path=/trunk/mcs/; revision=147668
* MethodOnTypeBuilderInst.cs: Change instantiation field type to System.Type.
* MethodOnTypeBuilderInst.cs (MetadataToken): Explicitly throw if not under
compiler context.
svn path=/trunk/mcs/; revision=147667