Commit Graph
63 Commits
Author SHA1 Message Date
Marek Safar 80d342ff75 Add test from Jb Evain to test biner with user method types 2013-03-06 11:18:04 +01:00
Marek Safar c0c48eb810 Make internal abstract methods virtual to fix MethodBase subclassing. 2013-03-04 21:52:22 +01:00
Rodrigo Kumpera 07a220c61c Mobile should not have the COM types set. 2013-03-01 18:58:35 -05:00
Marek Safar feb5080d23 Optimize parameters handling to do much less allocation 2013-02-25 14:11:04 +01:00
Marek Safar 1fff2451d1 Add explicit interface GetType implementation to avoid object::GetType become proxy. Fixes #10148 2013-02-08 18:33:36 +01:00
Rodrigo Kumpera 2c8c93b378 Remove SRE from Full AOT builds. 2012-11-06 18:18:14 -05:00
Marek Safar 7acb219a4d Add some missing methods 2011-10-24 12:15:31 +01: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
Marek Safar 894b26feca Warnings cleanup 2010-10-15 15:20:25 +01:00
Marek Safar 447a8b082e internal and abstract do not play together
svn path=/trunk/mcs/; revision=154730
2010-04-02 15:58:35 +00:00
Marek Safar de9fcae634 2010-04-02 Marek Safar <[email protected]>
* MethodBase.cs: Made GetParameterCount abstract and implement
	where missing to avoid redundant allocations.


svn path=/trunk/mcs/; revision=154721
2010-04-02 14:01:26 +00:00
Rodrigo Kumpera 91afbfd9d0 2010-02-11 Rodrigo Kumpera <[email protected]>
* MethodBase.cs: Add some v4 bits.

svn path=/trunk/mcs/; revision=151560
2010-02-11 22:56:02 +00:00
Miguel de Icaza ddac7401a7 System.Reflection's turn to be de-ifdefified
svn path=/trunk/mcs/; revision=145241
2009-11-03 01:22:00 +00:00
Miguel de Icaza 3400094d1a System.Reflection's turn to be de-ifdefified
svn path=/trunk/mcs/; revision=145240
2009-11-03 01:20:56 +00:00
Sebastien Pouliot a976fb2ed7 In Test/System.Reflection:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* MethodBaseTest.cs: Add new, working, test for non-generic
	GetMethodFromHandle. Add test case to show generic overload
	behave exactly the same when no second RuntimeMethodHandle is
	provided. Remove [Category("NotWorking")] on existing test case.

In System.Reflection:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* MethodBase.cs: Reduce code duplication and the number of direct
	calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)


svn path=/trunk/mcs/; revision=144335
2009-10-18 23:52:13 +00:00
Marek Safar de0a43d47d 2008-07-23 Marek Safar <[email protected]>
* MethodBase.cs (GetMethodFromHandle): Needed for bootraping.


svn path=/trunk/mcs/; revision=108577
2008-07-23 16:43:31 +00:00
Rodrigo Kumpera ca38445e1a 2008-07-04 Rodrigo Kumpera <rkumpera@n ovell.com>
* MethodBase.cs (GetMethodFromHandle): Fix a warning in
	the 1.0 build.



svn path=/trunk/mcs/; revision=107261
2008-07-04 16:02:05 +00:00
Rodrigo Kumpera 94e62afebd In .:
2008-07-04  Rodrigo Kumpera  <rkumpera@n ovell.com>

	* MethodBase.cs (GetMethodFromHandle): Extract an internal version
	of this function that doesn't perform the generic class check.
	This method is required to fix the Delegate regression that fixing
	#377324 caused.


svn path=/trunk/mcs/; revision=107258
2008-07-04 15:43:40 +00:00
Rodrigo Kumpera 77655cea2f In .:
2008-06-25  Rodrigo Kumpera  <rkumpera@n ovell.com>

	* MethodBase.cs (GetMethodFromHandle): Check if the icall returns null
	and fail. This is part of the fix for #377324.


svn path=/trunk/mcs/; revision=106609
2008-06-25 22:23:43 +00:00
Zoltan Varga 8424d00a70 2008-05-05 Zoltan Varga <[email protected]>
* FieldInfo.cs (GetFieldFromHandle): Add an argument check for an invalid handle.

	* MethodBase.cs (GetMethodFromHandle): Ditto. Fixes #386641.

svn path=/trunk/mcs/; revision=102529
2008-05-05 14:53:12 +00:00
Atsushi Eno ecf194e93e 2007-11-13 Atsushi Enomoto <[email protected]>
* MethodBase.cs : (Invoke) removed extra interface implementation.


svn path=/trunk/mcs/; revision=89522
2007-11-13 05:33:28 +00:00
Atsushi Eno 5fe6a5b42d 2007-07-04 Atsushi Enomoto <[email protected]>
* Type.cs : 2.0 TypeHandle and ContainsGenericParameters are virtual
	  (required fix for 2.0 reflection API fixes).

	* CustomAttributeNamedArgument.cs CustomAttributeTypedArgument.cs
	  CustomAttributeData.cs : implemented Equals() and GetHashCode().
	* Missing.cs : ISerializable.
	* AssemblyName.cs : ReferenceMatchesDefinition() stub.
	* Module.cs : missing method stubs with generic type/method args.
	* ExceptionHandlingClause.cs : ToString() stub.
	* MethodBase.cs TypeDelegator.cs ModuleResolveEventHandler.cs
	  TypeFilter.cs MemberFilter.cs
	  FieldInfo.cs ParameterInfo.cs MethodInfo.cs DynamicMethod.cs :
	  miscellaneous cosmetic API fixes.


svn path=/trunk/mcs/; revision=81311
2007-07-04 02:19:18 +00:00
Paolo Molaro 758612aea9 Tue May 8 13:04:35 CEST 2007 Paolo Molaro <[email protected]>
* FieldInfo.cs, MethodBase.cs: implemented new GetFieldFromHandle and
	GetMethodFromHandle overloads (bug #78637).


svn path=/trunk/mcs/; revision=76915
2007-05-08 10:58:12 +00:00
Alp Toker f9d61aea34 2007-04-09 Alp Toker <[email protected]>
* MethodBase.cs: IsGenericMethodDefinition() and IsGenericMethod()
	should return false, not throw NotSupportedException. This matches MS
	behaviour and introduces simplifications in subclasses.
	* MonoMethod.cs: MonoCMethod: Remove redundant overrides.


svn path=/trunk/mcs/; revision=75528
2007-04-09 00:45:14 +00:00
Alp Toker cff66adc25 2007-03-01 Alp Toker <[email protected]>
* MethodBase.cs: Add missing ComVisible attr.
	Add GetMethodFromHandle() 2.0 overload stub (NotImplemented).


svn path=/trunk/mcs/; revision=73588
2007-03-01 14:13:50 +00:00
Paolo Molaro 80db88f005 Tue Dec 12 20:35:10 CET 2006 Paolo Molaro <[email protected]>
* MethodBase.cs: added missing ComVisible attr.
	* MethodInfo.cs: added a few missing methods that we implement
	in derived classes.


svn path=/trunk/mcs/; revision=69429
2006-12-12 19:36:13 +00:00
Gert Driesen 7c12d12f16 * MethodInfoTest.cs: GetMethodBody no longer throws ArgumentException for
methods that have no IL body. Part of fix for bug #78522.
* MethodBase.bs: GetMethodBody should not throw ArgumentException for a method
with no IL body. Fixes bug #78522.

svn path=/trunk/mcs/; revision=61216
2006-05-28 19:56:35 +00:00
Martin Baulig dea11e73b6 2006-02-15 Martin Baulig <[email protected]>
* MethodBase.cs (MethodBase.GetGenericMethodDefinition): Removed.
	(MethodBase.Mono_IsInflatedMethod): Removed.
	(MethodBase.HasGenericParameters): Removed.

	* MethodInfo.cs (MethodInfo.GetGenericMethodDefinition): Moved
	here from MethodBase.

	* MonoMethod.cs
	(MonoMethod.IsGenericMethodDefinition): This is now an icall.
	(MonoMethod.IsGenericMethod): Likewise.


svn path=/trunk/mcs/; revision=56897
2006-02-15 19:51:04 +00:00
Zoltan Varga 57c0d7f27c 2006-02-03 Zoltan Varga <[email protected]>
* MethodBase.cs MonoMethod.cs: Implement IsGenericMethod property.
	Fixes #77460.

svn path=/trunk/mcs/; revision=56548
2006-02-03 22:28:25 +00:00
Marek Safar e7891c7fea 2005-11-11 Marek Safar <[email protected]>
* Type.cs: IsNested implemented, signature fixes.

svn path=/trunk/mcs/; revision=52904
2005-11-11 12:55:55 +00:00
Martin Baulig 0cc1ca3985 2005-09-09 Martin Baulig <[email protected]>
Reflect latest API changes in the August CTP.

	* MethodBase.cs (MethodBase.MakeGenericMethod): Removed.

	* MethodInfo.cs (MethodInfo.MakeGenericMethod): Added here.


svn path=/trunk/mcs/; revision=49776
2005-09-09 06:13:36 +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
Sebastien Pouliot 571bd38886 2005-06-15 Sebastien Pouliot <[email protected]>
* Assembly.cs, AssemblyName.cs, ConstructorInfo.cs, EventInfo.cs,
	FieldInfo.cs, MemberInfo.cs, MethodBase.cs, MethodInfo.cs, Module.cs,
	ParameterInfo.cs, PropertyInfo.cs: Added some missing interfaces and
	attributes that were added in 1.1 SP1 or 2.0 beta2.


svn path=/trunk/mcs/; revision=46031
2005-06-15 10:45:00 +00:00
Zoltan Varga fae5147e4c 2005-06-09 Zoltan Varga <[email protected]>
* *.cs: Updates for net 2.0 beta 2.

svn path=/trunk/mcs/; revision=45685
2005-06-09 10:38:09 +00:00
Zoltan Varga 601f4125e5 2005-06-06 Zoltan Varga <[email protected]>
* *.cs: Add net 2.0 ComVisibleAttribute.

svn path=/trunk/mcs/; revision=45510
2005-06-06 18:03:29 +00:00
Marek Safar 49dcbb2f20 2005-02-10 Marek Safar <[email protected]>
* Assembly.cs,
	* ConstructorInfo.cs,
	* EventInfo.cs,
	* FieldInfo.cs,
	* MemberInfo.cs,
	* MethodBase.cs,
	* MethodInfo.cs,
	* PropertyInfo.cs: ClassInterfaceType is None.

svn path=/trunk/mcs/; revision=40373
2005-02-10 08:19:26 +00:00
Zoltan Varga f598eece9d 2005-01-18 Zoltan Varga <[email protected]>
* MethodBase.cs MonoMethod.cs: Hopefully fix the build.

svn path=/trunk/mcs/; revision=39114
2005-01-18 19:51:10 +00:00
Zoltan Varga 90a4f0719d 2005-01-18 Zoltan Varga <[email protected]>
* MethodBase.cs MonoMethod.cs: Implement 2.0 GetMethodBody ().

svn path=/trunk/mcs/; revision=39110
2005-01-18 19:20:03 +00:00
Zoltan Varga 6d3eb65e2b 2004-08-30 Zoltan Varga <[email protected]>
* MethodBase.cs (GetMethodFromHandle): Avoid passing a valuetype to
	icalls.

svn path=/trunk/mcs/; revision=33042
2004-08-30 15:14:47 +00:00
Zoltan Varga 84ba14832e 2004-08-29 Zoltan Varga <[email protected]>
* MethodBase.cs (GetMethodFromHandle): Implement.

svn path=/trunk/mcs/; revision=32986
2004-08-29 09:09:29 +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 6f4501e510 * Assembly.cs: added missing ComVisible attribute on
ImageRuntimeVersion property
* ConstructorInfo.cs: added missing attributes on Invoke
* EventInfo.cs: added missing attributes
* FieldInfo.cs: added missing attributes
* MethodBase.cs: added missing attributes
* PropertyInfo.cs: added missing attributes

svn path=/trunk/mcs/; revision=28642
2004-06-01 17:48:31 +00:00
Atsushi Eno 5fad7c3594 2004-04-23 Atsushi Enomoto <[email protected]>
* MethodBase.cs, MonoMethod.cs, TypeDelegator.cs :
	  The fix should be easier ;)

svn path=/trunk/mcs/; revision=25882
2004-04-23 04:35:37 +00:00
Atsushi Eno 26b01be2d4 2004-04-23 Atsushi Enomoto <[email protected]>
* MethodBase.cs, MonoMethod.cs, TypeDelegator.cs :
	  NET_2_0 related build fix.

svn path=/trunk/mcs/; revision=25880
2004-04-23 04:18:45 +00:00
Martin Baulig 84a08e67be 2004-04-22 Martin Baulig <[email protected]>
Use `#if NET_2_0 || BOOTSTRAP_2_0' for the generic reflection stuff.

svn path=/trunk/mcs/; revision=25878
2004-04-23 02:40:05 +00:00
Martin Baulig dfedf08d98 2004-04-22 Martin Baulig <[email protected]>
Renamed the `NET_1_2' conditional to `NET_2_0' in all files.

svn path=/trunk/mcs/; revision=25877
2004-04-23 02:24:02 +00:00
Martin Baulig e4b9d98583 2004-04-07 Martin Baulig <[email protected]>
* MethodBase.cs
	(MethodBase.GetGenericParameters): Renamed to GetGenericArguments().

	* MonoGenericInst.cs (MonoGenericInst.DeclaringType): Removed.
	(MonoGenericInst.GetNestedTypes): Just call
	`generic_type.GetNestedTypes (bf)' here.

	* MonoMethod.cs (MonoMethod.ToString): If we're a generic method,
	include the type arguments.

svn path=/trunk/mcs/; revision=25131
2004-04-07 03:57:02 +00:00
Martin Baulig 95c7c99b76 2004-03-29 Martin Baulig <[email protected]>
* MethodBase.cs (MethodBase.Mono_IsInflatedMethod): New public
	virtual property.
	(MethodBase.HasGenericParameters): Use the "official" behavior
	here, ie. return false if we're not a generic method.

svn path=/trunk/mcs/; revision=24740
2004-03-30 00:27:57 +00:00
Martin Baulig 0f0cba4028 2004-03-29 Martin Baulig <[email protected]>
* MethodBase.cs: Moved the generics stuff here, made it virtual
	where neccessary and use the correct API.

svn path=/trunk/mcs/; revision=24736
2004-03-30 00:12:32 +00:00