* ILGenerator.cs (TokenGenerator): GetToken now taken an extra
argument create_open_instance if it should encode a gtd as
a generic instance.
* ILGenerator.cs (ILGenerator): Ask TokenGenerator to create
an open instance under all cases but if the opcode is ldtoken.
* ModuleBuilder.cs: Adjust to signature change.
* DynamicMethod.cs: Ditto.
* Environment.cs: Since an icall signature has changed, we
must bump corlib version.
* appdomain.c: Ditto.
* icall.c: Pass the new value forward to
mono_image_create_token.
* reflection.c (mono_image_create_token): Handle create_methodspec
for TypeBuilder and MonoType.
Fixes#649017
* 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
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
* AssemblyBuilder.cs: Add IsRun property that returns true if
any execute mode is enabled.
* ModuleBuilder.cs: Add set_wrappers_type icall to define which type
is to be bound to wrappers. Create a new abstract type and call it
when the assembly is build this way.
Replace explicit checks for global_type with calls to CreateGlobalType.
* TypeBuilder.cs: Internal ctor now takes an extra table_idx argument.
svn path=/trunk/mcs/; revision=137322
2008-02-21 Jb Evain <[email protected]>
* Module.cs: add a new virtual GetModuleVersionId method,
and make the properties .MvId and ModuleVersionId call it.
This way, we can override it in ModuleBuilder.
Part of the fix for #471302.
in System.Reflection.Emit:
2008-02-21 Jb Evain <[email protected]>
* ModuleBuilder.cs: override GetModuleVersionId
so that we can get the module guid from Module.ModuleVersionId.
Part of the fix for #471302.
svn path=/trunk/mcs/; revision=127631
* ParameterInfo.cs: Name must default to null if no ParameterBuilder
is supplied.
* ModuleBuilder.cs (DefineType): Do not perform lookup of in cache if
name is null to allow correct exception to be thrown (in TypeBuilder
ctor).
* TypeBuilder: Moved name argument check to TypeBuilder ctor. Modified
ArgumentException parameter names to match MS. Removed duplicate check
for data length from DefineInitializedData. Modified check_name to
only throw when first character is null char.
* ConstructorBuilder.cs (GetParameters): Throw NotSupportedException
(2.0) or InvalidOperationException (1.0) when type is not yet created
and we're not in compiler context. Return empty array when no
parameters are defined.
(MethodHandle): Always throw NotSupportedException.
(DefineParameter): Prevent NRE when parameters is null.
(GetCustomAttributes): When not in compiler context, always throw
NotSupportedException.
* ConstructorOnTypeBuilderInst.cs: Delegate to ConstructorBuilder
where possible. Fixed ContainsGenericParameters and IsGenericMethod
to always return false. In MethodBase.Invoke, throw an
InvalidOperationException instead of NIE.
* MethodOnTypeBuilderInstTest.cs: Fixed exception message in comments.
* TypeBuilderTest.cs: Do not use ExpectedException to avoid false
positives. Added argument check tests for DefineEvent, DefineField,
DefineMethod, DefinePInvokeMethod and DefinePropety. Use
Type.EmptyTypes instead of constructing empty array.
* ConstructorBuilderTest.cs: Added Test attributes. Added tests
for DefineParameter and Invoke overloads. Added tests for
GetCustomAttributes overloads. Avoid use of ExpectedException.
* ModuleBuilderTest.cs: Added tests for DefineType name argument
checks.
* ConstructorOnTypeBuilderInstTest.cs: Added basic set of tests.
svn path=/trunk/mcs/; revision=102211
* ModuleBuilder.cs: Add GetRegisteredType to expose name_cache for internal
usage.
* TypeBuilder.cs: Optimized generation of unmanaged data helpers.
An unmanaged data class helper can be re-used when its size matches to
size of requested class.
svn path=/trunk/mcs/; revision=72791
* ModuleBuilder.cs: return created type from GetType in case the
type builder type was already created. Added test-555.cs as
regression test.
svn path=/trunk/mcs/; revision=71904
* Array.cs: Changed protected ctor to private. Fixes API compatibility
with MS.NET.
* RuntimeFieldHandle.cs: Equals methods and GetHashCode should only
be exposed in 2.0 profile.
* RuntimeMethodHandle.cs: Equals methods and GetHashCode should only
be exposed in 2.0 profile.
* RuntimeTypeHandle.cs: Equals methods and GetHashCode should only
be exposed in 2.0 profile.
* Type.cs: Added GetType method and implemented _Type interface.
Fixes API compatibility with MS.NET.
* corlib.dll.sources: Added System.Runtime.InteropServices/
TypeLibImportClassAttribute.cs.
* AssemblyBuilder.cs: Implement _AssemblyBuilder, CA fixes to correspond
with MS.NET
* ConstructorBuilder.cs: Implement _ConstructorBuilder, CA fixes to
correspond with MS.NET
* CustomAttributeBuilder.cs: Implement _CustomAttributeBuilder, CA
fixes to correspond with MS.NET
* EnumBuilder.cs: Implement _EnumBuilder, CA fixes to correspond with MS.NET
* EventBuilder.cs: Implement _EventBuilder, CA fixes to correspond with MS.NET
* FieldBuilder.cs: Implement _FieldBuilder, CA fixes to correspond with MS.NET
* LocalBuilder.cs: Implement _LocalBuilder, CA fixes to correspond with MS.NET
* MethodBuilder.cs: Implement _MethodBuilder, CA fixes to correspond
with MS.NET
* MethodRental.cs: CA fixes to correspond with MS.NET, implemented
_MethodRental.
* ModuleBuilder.cs: Implement _ModuleBuilder, CA fixes to correspond
with MS.NET
* ILGenerator.cs: Implement _ILGenerator, CA fixes to correspond with MS.NET
* ParameterBuilder.cs Implement _ParameterBuilder, CA fixes to correspond
with MS.NET
* PropertyBuilder.cs: Implement _PropertyBuilder, CA fixes to correspond
with MS.NET
* SignatureHelper.cs: Implement _SignatureHelper, CA fixes to correspond
with MS.NET
* TypeBuilder.cs: Implement _TypeBuilder, CA fixes to correspond with MS.NET
* DecimalConstantAttribute.cs: Only mark ctor not CLSCompliant on 2.0
profile to match MS.NET.
* Assembly.cs: Added GetType() method in 1.1 to match MS.NET.
* ConstructorInfo.cs: Added GetType() method in 1.1 to match MS.NET,
implemented _ConstructorInfo.
* EventInfo.cs: Added GetType() method in 1.1 to match MS.NET, implemented
_EventInfo.
* FieldInfo.cs: Added GetType() method in 1.1 to match MS.NET, implemented
_FieldInfo.
* MemberInfo.cs: Added GetType() method in 1.1 to match MS.NET, implemented
_MemberInfo.
* MethodBase.cs: Added GetType() method in 1.1 to match MS.NET, implemented
_MethodBase.
* MethodInfo.cs: Added GetType() method in 1.1 to match MS.NET, implemented
_MethodInfo.
* PropertyInfo.cs: Added GetType() method in 1.1 to match MS.NET, implemented
_PropertyInfo.
* TypeAttributes.cs: CustomFormatMask and CustomFormatClass should only be
exposed in 2.0 profile.
svn path=/trunk/mcs/; revision=48073
* ModuleBuilder.cs: Implemented DefineDocument(). Generate debug
info when saving the module.
* ILGenerator.cs: Keep marked sequence points in a list.
Added a GenerateDebugInfo method, which dumps the info collected
during code generation.
* TypeBuilder.cs:
* ConstructorBuilder.cs:
* MethodBuilder.cs: Added method for generating debug info.
* LocalBuilder.cs: Added StartOffset and EndOffset properties.
* CustomAttributeBuilder.cs: Use IsInstanceOfType instead of
IsAssignableFrom when possible.
svn path=/trunk/mcs/; revision=44983