Commit Graph
124 Commits
Author SHA1 Message Date
Rodrigo Kumpera 3673d051fb [corlib]Implement .net 4.0 ParameterInfo. 2013-08-22 16:00:14 -04:00
Marek Safar b84ad279fb Better exception for unmarked labels 2013-07-03 14:57:40 +02:00
Marek Safar feb5080d23 Optimize parameters handling to do much less allocation 2013-02-25 14:11:04 +01:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Rodrigo Kumpera 2c8c93b378 Remove SRE from Full AOT builds. 2012-11-06 18:18:14 -05:00
Zoltan Varga 72c896066b Allow TypeBuilder.DefineMethodOverride () to be called multiple times. Fixes #5665. 2012-06-24 22:44:46 +02:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Zoltan Varga ea353d283d Add checks to ParameterBuilder.SetConstant () to avoid an assert in the runtime. Fixes #684438. 2011-04-10 20:27:58 +02:00
Rolf Bjarne Kvinge f64261401d Fix many corcompare issues for moonlight 2011-03-31 16:05:03 +02:00
Marek Safar 1b0ef80b2f API compatibility work 2010-11-08 19:29:49 +00:00
Rodrigo Kumpera 1a1ccabce6 CompiledContext is no longer needed.
* MethodBuilder.cs (GetGenericArguments): No need to
	check for compiler context. It's gone.
2010-09-13 14:51:59 -03:00
Rodrigo Kumpera a0182452a3 MethodBuilder should return null for generic arguments of non generic method.
* MethodBuilder.cs (GetGenericArguments): Return null if not
	generic.

	* MethodBuilderTest.cs: Add test for #384127.

	Fixes bug #384127.
2010-09-13 14:26:30 -03:00
Rodrigo Kumpera bc35d6b8b1 2009-12-04 Rodrigo Kumpera <[email protected]>
* 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
2009-12-04 16:14:42 +00:00
Jb Evain 3b9ee3cc4d NET_1_1 removal
svn path=/trunk/mcs/; revision=146813
2009-11-24 13:22:01 +00:00
Marek Safar 2b16e5a55d 2009-11-16 Marek Safar <[email protected]>
* ILGenerator.cs, DynamicMethod.cs, MethodBuilder.cs,
	ConstructorBuilder.cs: Some 4.0 changes.


svn path=/trunk/mcs/; revision=146261
2009-11-16 14:42:40 +00:00
Miguel de Icaza 609edb4d5c System.Reflection.Emit's turn to be de-ifdefified
svn path=/trunk/mcs/; revision=145242
2009-11-03 01:30:22 +00:00
Sebastien Pouliot 0c1cacf8e0 In System.Reflection.Emit:
2009-10-30  Sebastien Pouliot  <[email protected]>

	* MethodBuilder.cs: Add missing 'names' validations in 
	DefineGenericParameters

In Test/System.Reflection.Emit:
2009-10-30  Sebastien Pouliot  <[email protected]>

	* MethodBuilderTest.cs: Add (copy from TypeBuilderTest) test 
	cases for two DefineGenericParameters


svn path=/trunk/mcs/; revision=145118
2009-10-30 20:12:20 +00:00
Sebastien Pouliot ae520cdbfc 2009-09-18 Sebastien Pouliot <[email protected]>
* AssemblyBuilder.cs, ConstructorBuilder.cs, MethodBuilder.cs, 
	TypeBuilder.cs: Don't process PermissionSet under NET_2_1


svn path=/trunk/mcs/; revision=142222
2009-09-18 19:14:29 +00:00
Rodrigo Kumpera e5d7850ed8 2009-08-06 Rodrigo Kumpera <[email protected]>
* Environment.cs: Bump corlib version.

2009-08-06 Rodrigo Kumpera  <[email protected]>

	* MonoGenericClass.cs (InflateType): Add support to inflate
	generic method arguments.

	* MonoGenericClass.cs (GetMethod): Remove restriction
	with generic methods.

2009-08-06 Rodrigo Kumpera  <[email protected]>

	* MethodOnTypeBuilderInstTest.cs: Add tests for
	generic method instances over generic type instances.

2009-08-06 Rodrigo Kumpera  <[email protected]>

	* MethodBuilder.cs: Mark generic_params internal.

	* MethodOnTypeBuilderInst.cs: Add fields to support
	inflated generic methods. Implement generics related
	methods.

svn path=/trunk/mcs/; revision=139534
2009-08-07 01:56:45 +00:00
Marek Safar c9643d9e1f Print full name.
svn path=/trunk/mcs/; revision=122659
2009-01-07 13:50:08 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Rodrigo Kumpera 3f8c88fbf7 In System.Reflection.Emit:
2008-07-16  Rodrigo Kumpera  <[email protected]>

	* MethodOnTypeBuilderInst.cs: Special case all methods
	under compiler context as needed by mcs. 

	* MethodBuilder.cs: Change the visibility of some fields
	to internal so MethodOnTypeBuilderInst can use it.

In System.Reflection:
2008-07-16  Rodrigo Kumpera  <[email protected]>

	* MonoGenericClass.cs (GetMethod): Use the new codepath for compiler
	context.

	* MonoGenericClass.cs: New InflateType method, used to inflate
	managed types.


svn path=/trunk/mcs/; revision=108064
2008-07-16 17:22:30 +00:00
Andreas N 46e1d0346b 2008-07-02 Andreas Nahr <[email protected]>
* TypeBuilder.cs: Fix parameter names
	* SignatureHelper.cs: Fix parameter names, Small formatting
	* ModuleBuilder.cs: Fix parameter names
	* MethodBuilder.cs: Fix parameter names
	* LocalBuilder.cs:
	* ILGenerator.cs:
	* GenericTypeParameterBuilder.cs:
	* EnumBuilder.cs:
	* DynamicMethod.cs:
	* ConstructorBuilder.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107084
2008-07-02 18:33:37 +00:00
Marek Safar b2344e956b 2008-06-12 Marek Safar <[email protected]>
* MethodBuilder.cs: Removed SetGenericMethodSignature.


svn path=/trunk/mcs/; revision=105708
2008-06-12 16:43:18 +00:00
Marek Safar 08008147e1 2008-03-11 Marek Safar <[email protected]>
* MethodBuilder.cs (GetGenericArguments): Returns Type.EmptyType.


svn path=/trunk/mcs/; revision=97989
2008-03-11 18:56:05 +00:00
Zoltan Varga d50d4ff413 2008-03-06 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (RegisterToken): New icall.

	* MethodBuilder.cs (ctor): Call ModuleBuilder.RegisterToken (), so the token gets
	added to the internal hash table. Fixes #367668.

	* ConstructorBuilder.cs: Ditto.

svn path=/trunk/mcs/; revision=97519
2008-03-06 14:28:55 +00:00
Rodrigo Kumpera 9a39a454f3 2008-03-03 Rodrigo Kumpera <[email protected]>
* MethodBuilder.cs (check_override): Added, verify if this method has explicit
	override set and doesn't follow virtual settings of overriden method.

	* TypeBuilder.cs (CreateType): Call MethodBuilder::check_override before
	creating the type.

	Fixes #361689.


svn path=/trunk/mcs/; revision=97259
2008-03-03 23:58:56 +00:00
Atsushi Eno 7db700987c 2007-11-20 Atsushi Enomoto <[email protected]>
* MethodBuilder.cs : implemented ContainsGenericParameters().
        * GenericTypeParameterBuilder.cs : removed most of extra members
          and added missing members for 2.0 API.


svn path=/trunk/mcs/; revision=89964
2007-11-20 06:53:21 +00:00
Gert Driesen d7ff8098f7 * MethodBuilder.cs: Code formatting. Spaces to tabs.
* TypeBuilder.cs: Same.

svn path=/trunk/mcs/; revision=81553
2007-07-07 14:31:09 +00:00
Jb Evain a461af89d0 oops, fix the build
svn path=/trunk/mcs/; revision=77765
2007-05-21 14:40:09 +00:00
Jb Evain 7a9f4ed6b9 2007-05-21 Jb Evain <[email protected]>
* TypeBuilder.cs
	  MethodBuilder.cs:
		Tag methods and types as HasSecurity when adding a
		SuppressUnmanagedCodeSecurityAttribute on them.
		Makes peverify happy.

svn path=/trunk/mcs/; revision=77762
2007-05-21 14:21:23 +00:00
Alp Toker ac82eefacd 2007-04-03 Alp Toker <[email protected]>
* GenericTypeParameterBuilder.cs: SetInterfaceConstraints(Type[]) is
	params.
	* MethodBuilder.cs: MakeGenericMethod(Type[]) is params.


svn path=/trunk/mcs/; revision=75337
2007-04-03 10:10:07 +00:00
Marek Safar 97f5e91d71 2007-03-19 Marek Safar <[email protected]>
* MethodBuilder.cs: MethodImplAttribute cannot be destructive and overwrite
	existing flags.

svn path=/trunk/mcs/; revision=74649
2007-03-19 23:59:04 +00:00
Marek Safar 33547a7583 2007-03-17 Marek Safar <[email protected]>
* MethodBuilder.cs: Implemented conversion of PreserveSigAttribute pseudo
	attribute.

svn path=/trunk/mcs/; revision=74535
2007-03-17 18:12:19 +00:00
Marek Safar 12bfc18661 2007-02-25 Marek Safar <[email protected]>
* MethodBuilder.cs: Empty string is not allowed for DllImport name.

svn path=/trunk/mcs/; revision=73413
2007-02-25 19:41:15 +00:00
Miguel de Icaza 44461926e5 Rationalize MonoTODO
svn path=/trunk/mcs/; revision=68714
2006-11-30 00:30:54 +00:00
Marek Safar 66d65f603d Warnings.
svn path=/trunk/mcs/; revision=65994
2006-09-27 19:39:53 +00:00
Zoltan Varga 8da5040b96 2006-07-11 Zoltan Varga <[email protected]>
* MethodBuilder.cs (SetCustomAttribute): Fix handling of SpecialNameAttribute.

svn path=/trunk/mcs/; revision=62452
2006-07-11 17:09:04 +00:00
Miguel de Icaza 2b3a7db7cb 2006-04-26 Miguel de Icaza <[email protected]>
* FileStream.cs: Implement the FileOptions usage by passing all
	the information to the C layer.  Remove the "isAsync" argument for
	MonoIO.Open, and instead pass it on the FileOptions.

	* FileOptions.cs: Make it build when including WriteThrough

	* MonoIO.cs: Update MonoIO.Open signature to drop the async
	argument and take FileOptions instead. 

2006-04-26  Miguel de Icaza  <[email protected]>

	* MethodBuilder.cs: better error messages when we close the
	method. 



svn path=/trunk/mcs/; revision=59960
2006-04-26 23:18:28 +00:00
Gert Driesen f79b8c7afe * ConstructorBuilder.cs: In AddDeclarativeSecurity, throw an
ArgumentOutOfRangeException instead of an ArgumentException if action
is a Request* action. Fixes bug #77640.
* MethodBuilder.cs: Same.
* TypeBuilder.cs: Same.
* ConstructorBuilderTest.cs: Expect ArgumentOutOfRangeException
instead of ArgumentException when passing Request action to
AddDeclarativeSecurity (bug #77640).
* MethodBuilderTest.cs: Same.
* TypeBuilderTest.cs: Same.

svn path=/trunk/mcs/; revision=57340
2006-02-27 18:03:01 +00:00
Martin Baulig 6393a3e33c 2006-02-15 Martin Baulig <[email protected]>
* TypeBuilder.cs (TypeBuilder.DefineMethod): Also enable the
	2-argument version in the `BOOTSTRAP_NET_2_0' profile.
	(TypeBuilder.DefineGenericMethod): Removed.


svn path=/trunk/mcs/; revision=56898
2006-02-15 19:51:19 +00:00
Martin Baulig 3b2f9ae2b8 2006-02-14 Martin Baulig <[email protected]>
* ConstructorBuilder.cs
	(ConstructorBuilder.IsGenericMethod): Override this and return
	false; the MS runtime doesn't throw an exception here.
	(ConstructorBuilder.IsGenericMethodDefinition): Likewise.

	* MethodBuilder.cs
	(MethodBuilder.IsGenericMethod): Implement this.
	(MethodBuilder.IsGenericMethodDefinition): Likewise.


svn path=/trunk/mcs/; revision=56856
2006-02-14 15:41:13 +00:00
Zoltan Varga 4bb99dfae0 2005-10-27 Zoltan Varga <[email protected]>
* FieldBuilder.cs MethodBuilder.cs ConstructorBuilder.cs: Add support for
	returing custom attributes in created types. MS.NET supports this by
	returning non-builder objects from GetMethod/GetField etc., but we return
	builder objects in this case. Fixes #76521.

svn path=/trunk/mcs/; revision=52285
2005-10-27 14:03:46 +00:00
Paolo Molaro 3ed77b4798 Mon Sep 5 18:08:09 CEST 2005 Paolo Molaro <[email protected]>
* EventBuilder.cs, FieldBuilder.cs, MethodBuilder.cs, TypeBuilder.cs,
	PropertyBuilder.cs: take care of the SpecialName attribute (bug #75768).


svn path=/trunk/mcs/; revision=49481
2005-09-05 16:11:12 +00:00
Martin Baulig f5908bb299 Reflect latest generics API changes in the August CTP.
svn path=/trunk/mcs/; revision=49476
2005-09-05 15:03:33 +00:00
Gert Driesen 25a877e9fd * AssemblyInfo.cs: Fixed AssemblyDescription to match MS.NET.
* 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
2005-08-07 08:48:11 +00:00
Gert Driesen d04686431b * MethodBuilder.cs: In CreateMethodBody, throw ArgumentOutOfRangeException
instead of ArgumentException when count is not within range of array. Do not
allow zero-length method body to be emitted when using 2.0 profile. Fixes
bug #75236.
* MethodBuilderTest.cs: Updated existing tests to no longer define zero-length
method body. Added tests for bug #75236.

svn path=/trunk/mcs/; revision=46376
2005-06-22 18:04:04 +00:00
Gert Driesen 9373c633db * FieldBuilder.cs: FieldBuilder.FieldHandle should throw NotSupportException
to match MS.NET (1.x and 2.x). Fixes regression introduce in r45750.
* MethodBuilder.cs: MethodBuilder.MethodHandle should throw 
NotSupportedException to match MS.NET (1.x and 2.x). Fixes regression
introduced in r45750.
* MethodBuilderTest.cs: Enabled test for MethodHandle again after fixing
regression, and added additional test. Added Test attributes to tests.
* FieldBuilderTest.cs: Enabled tests for FieldHandle again after fixing
regression.
* ConstructorBuilderTest.cs: MethodHandle should not throw 
NotSupportedException.

svn path=/trunk/mcs/; revision=45816
2005-06-12 06:57:49 +00:00
Martin Baulig 761f5b0a3e Committing a patch from Kamil Skalski <[email protected]>
containing some .NET 2.0 updates.

svn path=/trunk/mcs/; revision=45750
2005-06-10 12:24:59 +00:00
Martin Baulig 44fe6375d7 Reverted the patch.
Next time please send me a patch which actually compiles.

svn path=/trunk/mcs/; revision=45700
2005-06-09 13:42:34 +00:00