Commit Graph
97 Commits
Author SHA1 Message Date
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
Martin Baulig 3b0d06bd63 Ooops.
svn path=/trunk/mcs/; revision=45699
2005-06-09 13:33:29 +00:00
Martin Baulig 87c2aba252 Ooops.
svn path=/trunk/mcs/; revision=45698
2005-06-09 13:26:06 +00:00
Martin Baulig 1db040cdc6 Committing a patch from Kamil Skalski <[email protected]>
containing some .NET 2.0 updates.

svn path=/trunk/mcs/; revision=45697
2005-06-09 13:17:47 +00:00
Zoltan Varga 2e6ccf308e 2005-06-08 Zoltan Varga <[email protected]>
* ConstructorBuilder.cs FieldBuilder.cs MethodBuilder.cs PropertyBuilder.cs:
	Add 2.0 Module property.

svn path=/trunk/mcs/; revision=45627
2005-06-08 10:41:43 +00:00
Zoltan Varga 1c9d58acd7 2005-06-08 Zoltan Varga <[email protected]>
* *.cs: Updates for net 2.0 beta 2.

svn path=/trunk/mcs/; revision=45626
2005-06-08 09:30:50 +00:00
Zoltan Varga cd7b342ad7 2005-06-07 Zoltan Varga <[email protected]>
* *.cs: Updates for net 2.0 beta 2.

svn path=/trunk/mcs/; revision=45573
2005-06-07 13:14:31 +00:00
Zoltan Varga 22ad8fada1 2005-06-07 Zoltan Varga <[email protected]>
* *.cs: Updates for net 2.0 beta 2.

svn path=/trunk/mcs/; revision=45572
2005-06-07 12:37:46 +00:00
Zoltan Varga 2eca3fdea7 2005-06-03 Zoltan Varga <[email protected]>
* MethodBuilder.cs CustomAttributeBuilder.cs: Rework DllImportAttribute
	decoding to improve compatibility with MS.NET.

svn path=/trunk/mcs/; revision=45380
2005-06-03 19:05:56 +00:00
Zoltan Varga a601c51d5f 2005-06-03 Zoltan Varga <[email protected]>
* MethodBuilder.cs (SetCustomAttribute): Set PinvokeImpl attribute if
	a DllImportAttribute is present.

svn path=/trunk/mcs/; revision=45373
2005-06-03 14:18:21 +00:00
Zoltan Varga 26ec218514 2005-06-02 Zoltan Varga <[email protected]>
* MethodBuilder.cs (SetCustomAttribute): Handle the case when the
	calling convention inside the DllImportAttribute is empty.

svn path=/trunk/mcs/; revision=45342
2005-06-02 20:37:32 +00:00
Zoltan Varga ce64968b0f 2005-06-01 Zoltan Varga <[email protected]>
* MethodBuilder.cs (SetCustomAttribute): Handle DllImportAttribute
	as well.

svn path=/trunk/mcs/; revision=45308
2005-06-01 19:37:12 +00:00
Vladimir Vukicevic 47aba199d1 b=75060, incorrect pinvoke generated for DllImport with ExactSpelling=true, r=vargaz
svn path=/trunk/mcs/; revision=45124
2005-05-27 20:06:24 +00:00
Lluis Sanchez 4a207370ec 2005-05-25 Lluis Sanchez Gual <[email protected]>
* 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
2005-05-25 09:37:07 +00:00
Raja R Harinath e0cfa4925e Set svn:eol-style=native, delete svn:executable.
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)


svn path=/trunk/mcs/; revision=44558
2005-05-16 12:23:26 +00:00
Zoltan Varga 6b62970da2 2005-05-13 Zoltan Varga <[email protected]>
* MethodBuilder.cs (fixup): Take into account CreateMethodBody as
	well.

svn path=/trunk/mcs/; revision=44494
2005-05-13 11:57:53 +00:00
Zoltan Varga 98fe9296cf 2005-05-13 Zoltan Varga <[email protected]>
* ConstructorBuilder.cs MethodBuilder.cs: Check that elements of
	parameterTypes are not null. Fixes #74928.

svn path=/trunk/mcs/; revision=44490
2005-05-13 09:31:11 +00:00
Zoltan Varga a63fe26832 2005-05-12 Zoltan Varga <[email protected]>
* ConstructorBuilder.cs MethodBuilder.cs (fixup): Fix this.

svn path=/trunk/mcs/; revision=44434
2005-05-12 12:25:34 +00:00
Zoltan Varga cce89fd60d 2005-05-12 Zoltan Varga <[email protected]>
* ConstructorBuilder.cs MethodBuilder.cs (fixup): Throw an exception if a
	method body is empty. Fixes #74906.

svn path=/trunk/mcs/; revision=44431
2005-05-12 12:07:17 +00:00
Zoltan Varga 5dbec0b3aa 2005-03-16 Zoltan Varga <[email protected]>
* MethodBuilder.cs: Add internal BestFitMapping and 
	ThrowOnUnmappableChar properties used by mcs.

svn path=/trunk/mcs/; revision=41897
2005-03-16 13:27:15 +00:00
Rafael Teixeira e3b001c009 2005-01-21 Rafael Teixeira <[email protected]>
* MethodBuilder.cs, TypeBuilder: missing 'params' in some method signature
	patch by Kamil Skalski <[email protected]>

svn path=/trunk/mcs/; revision=39315
2005-01-21 17:29:59 +00:00
Martin Baulig a1e5315178 2004-10-11 Martin Baulig <[email protected]>
* TypeBuilder.cs (TypeBuilder.generic_container): New private field.

	* MethodBuilder.cs (MethodBuilder.generic_container): New private field.

	* GenericTypeParameterBuilder.cs
	(GenericTypeParameterBuilder.GetGenericTypeParameterConstraints):
	Return `Type.EmptyTypes' instead of an array of `typeof (object)'.

svn path=/trunk/mcs/; revision=34852
2004-10-11 00:14:03 +00:00
Martin Baulig 377f721546 2004-09-02 Martin Baulig <[email protected]>
* MethodBuilder.cs (MethodBuilder.GetParameters): Throw a
	NotSupportedException() until the type has been fully created.

svn path=/trunk/mcs/; revision=33201
2004-09-02 09:39:20 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Gert Driesen 4b118ebec5 * MethodBuilder.cs: move check to see if type has already
been created up, to match MS.NET behaviour. Fix GetHashCode
(removed TODO)

svn path=/trunk/mcs/; revision=29129
2004-06-09 18:29:11 +00:00
Zoltan Varga ff39f88dbf 2004-05-14 Zoltan Varga <[email protected]>
* MethodBuilder.cs: Add Equals and GetHashCode.

svn path=/trunk/mcs/; revision=27380
2004-05-14 11:23:29 +00:00
Zoltan Varga 91c673fd99 2004-05-13 Zoltan Varga <[email protected]>
* TypeBuilder.cs MethodBuilder.cs ConstructorBuilder.cs: Implement
	ToString ().

svn path=/trunk/mcs/; revision=27260
2004-05-13 13:10:36 +00:00
Atsushi Eno 55f5240b53 2004-04-23 Atsushi Enomoto <[email protected]>
* ConstructorBuilder.cs, DynamicMethod.cs, EnumBuilder.cs,
	  GenericTypeParameterBuilder.cs, MethodBuilder.cs, ModuleBuilder.cs,
	  OpCodes.cs, TypeBuilder.cs :
	  The fix should be easier ;)

svn path=/trunk/mcs/; revision=25883
2004-04-23 04:36:13 +00:00