Commit Graph
100 Commits
Author SHA1 Message Date
Rodrigo Kumpera 3673d051fb [corlib]Implement .net 4.0 ParameterInfo. 2013-08-22 16:00:14 -04:00
Marek Safar 5e1c9a8ffe Fix indexer member formating 2013-07-20 11:15:06 +02:00
Rodrigo Kumpera 68ddd1d28d [corlib] Fix MethodInfo::ToString () to properly format generic structs. Fixes BXC #12856 2013-06-25 14:22:48 -04:00
Rodrigo Kumpera d6c5db881b Mark MonoCMethod (runtime subclass of ConstructorInfo) as serializable. Fixes #12611 2013-06-14 19:04:55 -04:00
Marek Safar 8deca1782e Optimize Activator path used by new() constraint to run less code 2013-03-06 11:18:04 +01:00
Marek Safar 7950d8b97d Update binder primitive conversion to match .net 2013-03-05 15:03:38 +01:00
Marek Safar c36e553fa0 Add missing target checks to ConstructorInfo::Invoke 2013-03-04 11:29:24 +01:00
Marek Safar 65d96594f5 Use local invoke method instead of doing double virtual call dispatch 2013-03-03 22:23:48 +01:00
Marek Safar feb5080d23 Optimize parameters handling to do much less allocation 2013-02-25 14:11:04 +01:00
Rodrigo Kumpera bb01b02d35 Raise an exception for user types under FULL_AOT_RUNTIME instead of crashing. 2013-02-08 15:12:07 -05:00
Rodrigo Kumpera 2c8c93b378 Remove SRE from Full AOT builds. 2012-11-06 18:18:14 -05:00
Rodrigo Kumpera 301b6c6fd8 Remove SRE.UnmanagedMarshal dependency from System.Reflection.
* FieldInfo.cs:
	* MonoMethod.cs:
	* ParameterInfo.cs: Remove silly dep on UnmanagedMarshal to use
	MarshalAsAttribute which is what we need in the end.

	* icall.c:
	* reflection.c: Use the custom attribute type instead of the SRE
	one. This allows FULL_AOT_RUNTIME to work with stuff that uses
	MarshalAs.
2012-11-05 14:16:12 -05:00
Marek Safar 5bcc1e62e8 Implement optional parameters support in binder. Fixes #7912 2012-10-22 15:36:51 +01:00
Marek Safar 474544b3bb Hide internal invoke methods in debugger 2012-04-03 13:43:19 +01:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Rodrigo Kumpera 0bc59aeab2 Load less stuff when resolving MethodInfo::Attributes.
* MonoMethod.cs: Add new icall for ::Attributes.

	* icall.c: New icall to resolve ::Attributes so it can
	avoid loading the signature and work around methods with
	broken signatures.

	Fixes #649527
2010-10-27 10:39:44 -02: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 c719591139 2010-02-11 Rodrigo Kumpera <[email protected]>
* MemberInfo.cs: Add GetCustomAttributesData.

	* Assembly.cs:
	* MemberInfo.cs:
	* Module.cs:
	* MonoEvent.cs:
	* MonoField.cs:
	* MonoMethod.cs:
	* MonoProperty.cs:
	* ParameterInfo.cs: Implement GetCustomAttributesData.

2010-02-11 Rodrigo Kumpera  <[email protected]>

	* MonoType.cs: Implement GetCustomAttributesData.

svn path=/trunk/mcs/; revision=151559
2010-02-11 22:55:43 +00:00
Rodrigo Kumpera 39e06838e9 2010-02-05 Rodrigo Kumpera <[email protected]>
* MonoMethod.cs (GetParameters): Must return a copy instead of
	* the interned array.

	* MonoMethod.cs (Invoke): Skip array clone in GetParameters.

	* MonoProperty.cs (GetIndexParameters): Properly handle
	* write-only indexed properties.
	Return a ParameterInfo object bound to the properly and not to
the method.

	* ParameterInfo.cs: Add new constructor that copies all fields
	* but Member.

	* ParameterInfo.cs (MetadataToken): Properly handle tokens of
	* non-method members.

svn path=/trunk/mcs/; revision=150945
2010-02-05 20:21:42 +00:00
Rodrigo Kumpera 5274395f00 2009-12-08 Rodrigo Kumpera <[email protected]>
* 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
2009-12-08 14:07:22 +00:00
Jb Evain 446634bfd8 in System:
2009-12-02  Jb Evain  <[email protected]>

	* Environment.cs (mono_corlib_version): bump.
	* Attribute.cs: when retrieving custom attributes defined
	on parameters belonging to a virtual method, walk
	the inheritance chain to check for parameters attributes
	all the way down.

in System.Reflection:
2009-12-02  Jb Evain  <[email protected]>

	* MethodInfo.cs: add an internal virtual GetBaseMethod
	returning the immediate predecessor in the inheritance chain.
	* MonoMethod.cs: modify the get_base_definition icall to take
	a boolean indicating that we want the immediate	base method
	or the original method definition and rename it to
	get_base_method. Implement GetBaseMethod with it.

svn path=/trunk/mcs/; revision=147460
2009-12-02 16:57:10 +00:00
Marek Safar 3086e99d75 Warnings cleanup
svn path=/trunk/mcs/; revision=146142
2009-11-13 14:52:59 +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 b708860dc8 2009-10-30 Sebastien Pouliot <[email protected]>
* MonoMethod.cs: Remove CAS check in MonoCMethod.Invoke (just 
	like it was done for MonoMethod.Invoke sister method)


svn path=/trunk/mcs/; revision=145101
2009-10-30 15:04:29 +00:00
Sebastien Pouliot b203adcf8d 2009-10-17 Sebastien Pouliot <[email protected]>
* MonoMethod.cs: Reduce code duplication and the number of direct
	calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)


svn path=/trunk/mcs/; revision=144306
2009-10-17 14:55:48 +00:00
Rodrigo Kumpera 04e8f61052 2009-07-29 Rodrigo Kumpera <[email protected]>
* TypeBuilder.cs (GetEvents): Throw if not created
	and not in compiler context.

	* TypeBuilder.cs (GetNestedType): Don't rely on
	MonoType implementation as it doesn't work if the
	nested type is defined after the TypeBuilder is
	created.

2009-07-29 Rodrigo Kumpera  <[email protected]>

	* TypeBuilderTest: Test for GetNestedType.

svn path=/trunk/mcs/; revision=139136
2009-07-31 00:10:04 +00:00
Zoltan Varga 542acfa591 In class/corlib/System.Reflection/
2009-03-26  Zoltan Varga  <[email protected]>

	* ParameterInfoTest.cs: Add a test for #488383.

In class/corlib/System/

2009-03-26  Zoltan Varga  <[email protected]>

	* Environment.cs: Bump corlib version.

In class/corlib/Test/System.Reflection/

2009-03-26  Zoltan Varga  <[email protected]>

	* ParameterInfoTest.cs: Add a test for #488383.

svn path=/trunk/mcs/; revision=130298
2009-03-26 14:32:42 +00:00
Gonzalo Paniagua Javier c91a6cee78 Patch from Matthew Metnestsky
svn path=/trunk/mcs/; revision=130076
2009-03-23 17:36:28 +00:00
Rodrigo Kumpera 6d65a06aea 2008-02-03 Rodrigo Kumpera <[email protected]>
* MonoMethod.cs: Fix the 1.1 build.

2008-02-03  Rodrigo Kumpera  <[email protected]>

	* MethodInfoTest.cs: Fix the 1.1 build.

svn path=/trunk/mcs/; revision=125456
2009-02-03 02:49:28 +00:00
Rodrigo Kumpera f3ac092a88 2008-02-02 Rodrigo Kumpera <[email protected]>
* MonoMethod.cs (ToString): Fix the representation of non primitive structs.

svn path=/trunk/mcs/; revision=125415
2009-02-02 21:56:37 +00:00
Rodrigo Kumpera 1f7742aa52 2008-02-02 Rodrigo Kumpera <[email protected]>
* MonoMethod.cs (ToString): Fix representation of pointer types.

	Fixes #409583.

svn path=/trunk/mcs/; revision=125409
2009-02-02 21:02:36 +00:00
Gonzalo Paniagua Javier 1504a3f8f0 2008-10-02 Gonzalo Paniagua Javier <[email protected]>
* Test/System.Reflection/ConstructorInfoTest.cs: enable abstract class
	test.

	* System.Reflection/MonoMethod.cs: throw a MemberAccessException when
	trying to invoke a constructor creating an instance of an abstract
	class. Return null when an instance of an object was passed as a
	parameter when invoking a .ctor.
	Fixes bug #324185.


svn path=/trunk/mcs/; revision=114720
2008-10-02 22:09:26 +00:00
Marek Safar 159314e044 Warnings cleanup
svn path=/trunk/mcs/; revision=111730
2008-08-27 18:28:16 +00:00
Mark Probst 2845ecb6f9 2008-03-31 Mark Probst <[email protected]>
* MonoMethod.cs: Don't do CAS security checks in Invoke for 2.1
	profile.

2008-03-31  Mark Probst  <[email protected]>

	* MonoType.cs: Don't do CAS security checks in CheckMethodSecurity
	for 2.1 profile.

svn path=/trunk/mcs/; revision=99461
2008-03-31 19:20:17 +00:00
Zoltan Varga 013375a9c1 2008-03-25 Zoltan Varga <[email protected]>
* MonoCMethod.cs (Invoke): Avoid a crash if this is called on a ctor of an open
	generic type. Fixes #373459.

svn path=/trunk/mcs/; revision=98946
2008-03-25 09:05:04 +00:00
Zoltan Varga 7bc5216923 2008-03-25 Zoltan Varga <[email protected]>
* MonoMethod.cs (InternalInvoke): Add an out 'exc' argument used to distinguish
	exceptions thrown by the icall from the exceptions thrown by the wrapped method.
	Fixes #373448.

svn path=/trunk/mcs/; revision=98942
2008-03-25 08:51:11 +00:00
Marek Safar c1d007c9a1 2008-03-17 Marek Safar <[email protected]>
* MonoMethod.cs (ToString): Print VarArgs argument.


svn path=/trunk/mcs/; revision=98462
2008-03-17 16:21:26 +00:00
Gert Driesen 9da08cb6dc * MethodInfoTest.cs: Numbered tests. Improved existing tests.
* ParameterInfoTest.cs: Added test for bug #342536.
* MonoMethod.cs (MakeGenericMethod): Modified argument name to match
MS. When one of the types is null, throw ArgumentNullException instead
of ArgumentException.      
* MethodInfo.cs (MakeGenericMethod): Modified argument name to match
MS.

svn path=/trunk/mcs/; revision=94641
2008-02-02 18:31:00 +00:00
Jb Evain 2d80e1d6e7 2008-01-15 Jb Evain <[email protected]>
* MonoMethod.cs (MakeGenericMethod): check for null values
	in the types arguments. Fixes #353849.


svn path=/trunk/mcs/; revision=92929
2008-01-15 10:05:30 +00:00
Mark Probst 1a94285f85 2007-09-11 Mark Probst <[email protected]>
* MonoMethod.cs: Catch and re-throw MethodAccessException from
	InternalInvoke for CoreCLR security.

svn path=/trunk/mcs/; revision=85651
2007-09-11 18:17:29 +00:00
Paolo Molaro f788987fc5 Thu Sep 6 19:49:34 CEST 2007 Paolo Molaro <[email protected]>
* MonoMethod.cs: name is used as a cache: provide an icall to get the
	name from the runtime.


svn path=/trunk/mcs/; revision=85431
2007-09-06 17:23:22 +00:00
Robert Jordan c76ea13748 In .:
2007-08-23  Robert Jordan  <[email protected]>

	* corlib.dll.sources: Added MemberInfoSerializationHolder.cs.

In System.Runtime.Serialization.Formatters.Binary:
2007-08-23  Robert Jordan  <[email protected]>

	* ObjectReader.cs, ObjectReader.cs: Map between System.MonoType[] and
	MS.NET's System.RuntimeType[].
	
	* ObjectReader.cs (ReadType): When a type couldn't be found, emit
	a more useful exception.

In System.Reflection:
2007-08-23  Robert Jordan  <[email protected]>

	* MemberInfoSerializationHolder.cs: created from
	ReflectionSerializationHolder to match MS (fixes bug #80761).
	Add support for	fields, events, properties and generic methods.

	* MonoMethod.cs (GetObjectData): handle generic arguments.

	* MonoGenericMethod.cs: mark as [Serializable].

	* MonoProperty.cs (GetObjectData): implemented.

	* MonoField.cs: ditto.

	* MonoEvent.cs: ditto.


svn path=/trunk/mcs/; revision=84732
2007-08-23 18:40:17 +00:00
Atsushi Eno 80a0ce7133 2007-07-19 Atsushi Enomoto <[email protected]>
* MonoMethod.cs : parameter types should be fixed as well.

	* MethodInfoTest.cs : fix incorrect parameter type output.


svn path=/trunk/mcs/; revision=82271
2007-07-19 11:23:20 +00:00
Atsushi Eno b1879f67db 2007-07-19 Atsushi Enomoto <[email protected]>
* MonoMethod.cs : ToString() did not show correct return type when
	  it is generic.

	* MethodInfoTest.cs : added ToString() test for generic return type.


svn path=/trunk/mcs/; revision=82268
2007-07-19 09:33:53 +00:00
Zoltan Varga 4d03852f26 2007-05-07 Zoltan Varga <[email protected]>
* MonoMethod.cs (Invoke): Fix a warning.

svn path=/trunk/mcs/; revision=76840
2007-05-07 15:40:35 +00:00
Zoltan Varga 43861d2253 2007-05-07 Zoltan Varga <[email protected]>
* MonoMethod.cs (Invoke): Don't wrap ThreadAbortException inside a 
	TargetInvocationException on the 2.0 profile. Fixes #81538.

svn path=/trunk/mcs/; revision=76833
2007-05-07 15:13:32 +00:00
Alp Toker 7e2393d03d 2007-04-09 Alp Toker <[email protected]>
* MonoMethod.cs: Use StringBuilder for the entire ToString() methods
	to reduce allocations and increase performance.

svn path=/trunk/mcs/; revision=75532
2007-04-09 02:47:00 +00:00
Alp Toker 102e1b9db1 2007-04-09 Alp Toker <[email protected]>
* MonoMethod.cs: Use StringBuilder for parms in ToString() methods.


svn path=/trunk/mcs/; revision=75530
2007-04-09 01:35:29 +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
Zoltan Varga a01e55c26d 2006-09-02 Zoltan Varga <[email protected]>
* ParameterInfo.cs MethodInfo.cs MonoMethod.cs: Applied patch from 
	Peter Dettman ([email protected]). Implement ReturnParameter
	property.

svn path=/trunk/mcs/; revision=64762
2006-09-02 10:22:28 +00:00