Commit Graph
44 Commits
Author SHA1 Message Date
Rodrigo Kumpera 0cf6982962 [fullaot] Don't use the complicated generics-heavy cache under full-aot. 2013-11-01 17:51:16 -04:00
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
Marek Safar feb5080d23 Optimize parameters handling to do much less allocation 2013-02-25 14:11:04 +01:00
Zoltan Varga 44e3b45603 Don't try to create fast property getters of properties of open types. Fixes #6034. 2012-08-14 04:56:41 +02:00
Zoltan Varga 51bafcc886 Wrap exceptions thrown by property getters into TargetInvocationExceptions even when using the optimized getter delegates in PropertyInfo.GetValue (). Fixes #3690. 2012-02-29 23:52:29 +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 3c7184af64 Fix value returned by PropertyInfo::DeclaringType
in mcs/class/corlib/System.Reflection:

	* MonoProperty.cs: Don't share the same field with
	DeclaringType and ReflectedType.

in mcs/class/corlib/System:

	* Environment.cs: Dump corlib version.

in mono/metadata:

	* appdomain.c: Bump corlib version.

	* object-internals.h: Add new field to MonoPropertyInfo.

	* icall.c (ves_icall_get_property_info): Store the
	declaring type into the new field.

	Fixes #633671
2010-08-25 14:21:59 -03: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 7693062766 2010-02-10 Rodrigo Kumpera <[email protected]>
* PropertyInfo.cs: Remove a pair of MonoTODO.

	* MonoProperty.cs: Implement GetConstantValue and GetRawConstantValue.

svn path=/trunk/mcs/; revision=151241
2010-02-10 16:45:46 +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
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 ff11419ca7 2009-10-20 Sebastien Pouliot <[email protected]>
* MonoProperty.cs: Reduce code duplication and the number of direct
	calls to icalls (affecting the number of SecuritySafeCritical in
	Moonlight)


svn path=/trunk/mcs/; revision=144448
2009-10-20 12:04:13 +00:00
Geoff Norton dd5c475d20 disable this optimization on monotouch
svn path=/trunk/mcs/; revision=141479
2009-09-08 01:30:59 +00:00
Sebastien Pouliot 6f2cceca57 2009-03-20 Sebastien Pouliot <[email protected]>
* EventInfo.cs, MonoProperty.cs: Ensure the delegate optimization 
	works correctly, i.e. throw the right exception, with Moonlight.


svn path=/trunk/mcs/; revision=129872
2009-03-20 14:02:16 +00:00
Rodrigo Kumpera 0ab891a1fb 2008-02-28 Rodrigo Kumpera <[email protected]>
* MonoProperty.cs (GetValue): Don't use the delegate optimization for valuetypes.

svn path=/trunk/mcs/; revision=128262
2009-02-28 06:21:53 +00:00
Rodrigo Kumpera 2295554090 2008-02-26 Rodrigo Kumpera <[email protected]>
* MonoProperty.cs (GetValue): Optimize getters for properties without arguments.

svn path=/trunk/mcs/; revision=128173
2009-02-27 01:50:58 +00:00
Rodrigo Kumpera 64824031a2 2008-02-26 Rodrigo Kumpera <[email protected]>
* MonoProperty.cs (GetValue): Optimize getters for properties without arguments.
	The optimization is to create a pair of chained delegates that duplicate the workings
	on MethodBase::Invoke without all the aditional overhead and without doing two
	managed/native transitions.

	Simple Getter performance is up to 17x faster.

	This patch reduces contention on domain and domain jit code hash locks, which
	can be very hot on asp.net applications.

svn path=/trunk/mcs/; revision=128172
2009-02-27 01:46:32 +00:00
Marek Safar 159314e044 Warnings cleanup
svn path=/trunk/mcs/; revision=111730
2008-08-27 18:28:16 +00:00
Ivan Zlatev 8dc53971d0 2008-02-26 Ivan N. Zlatev <[email protected]>
* Attribute.cs, MonoCustomAttrs: MS ignores the inherit param in 
	PropertyInfo's ICustomAttributeProvider implementation, but not 
	in the Attributes, so directly get the attributes from 
	MonoCustomAttrs instead of going throught the PropertyInfo's 
	ICustomAttributeProvider.
	* AttributeTest.cs: Remove NotWorking as we pass those tests now.
	* MonoProperty.cs: MS ignores the inherit parameter and defaults to false
	for GetCustomAttributes.
	[Fixes bugs #324472 and #322464]


svn path=/trunk/mcs/; revision=96632
2008-02-26 13:05:58 +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
Marek Safar ff86a1046b 2006-12-30 Marek Safar <[email protected]>
* MonoProperty.cs: Cache frequently used properties.

svn path=/trunk/mcs/; revision=70262
2006-12-30 17:51:57 +00:00
Paolo Molaro ce39fd6eb6 Thu Dec 14 12:52:27 CET 2006 Paolo Molaro <[email protected]>
* MonoProperty.cs, ParameterInfo.cs, PropertyInfo.cs:
	GetRequiredCustomModifiers()/GetOptionalCustomModifiers()
	implementations.


svn path=/trunk/mcs/; revision=69474
2006-12-14 11:53:12 +00:00
Sebastien Pouliot 3b6ef30ed0 2005-09-25 Sebastien Pouliot <[email protected]>
* MonoProperty.cs: Invoke throws a SecurityException but GetValue must
	throw TargetInvocationException with the SecurityException as an inner
	exception. See CAS unit tests for System.Web.dll.


svn path=/trunk/mcs/; revision=50728
2005-09-25 15:54:34 +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
Raja R Harinath e809a07446 remove svn:executable
svn path=/trunk/mcs/; revision=41039
2005-02-22 13:59:31 +00:00
Zoltan Varga 782160d69f 2004-09-23 Zoltan Varga <[email protected]>
* AssemblyFlagsAttribute.cs: Add 2.0 stuff.

	* Assembly.cs: Add stubs for ReflectionOnlyLoad methods. Add [Obsolete]
	to LoadWithPartialName on 2.0.

	* AssemblyNameFlags.cs: Add new 2.0 members.

	* FieldInfo.cs MonoField.cs PropertyInfo.cs ParameterInfo.cs MonoProperty.cs: Add stubs for Optinal/RequiredCustomModifiers.

svn path=/trunk/mcs/; revision=34304
2004-09-23 19:04:13 +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 05ed4022f3 * MonoProperty.cs: return correct MethodInfo for
property with only a get or set method. Fixes
bug #58661.

svn path=/trunk/mcs/; revision=27601
2004-05-18 17:17:52 +00:00
Lluis Sanchez 1214b3ed3a * MonoProperty.cs: Property.GetGetMethod() does not return the method if it
is private (it did until now because of a bug). Make sure it works as it
	worked before the fix.

svn path=/trunk/mcs/; revision=26215
2004-04-28 22:14:53 +00:00
Lluis Sanchez 4e06ac2b42 * ICustomAttributeProvider.cs, IReflect.cs, MemberInfo.cs, AssemblyName.cs:
Removed completed	TODOs.
	* MonoProperty.cs: In GetAccessors(), GetGetMethod() and GetSetMethod(),
	  do not return private methods if nonPublic == false.
	* ReflectionTypeLoadException.cs: Implemented serialization support.

svn path=/trunk/mcs/; revision=26051
2004-04-27 11:02:44 +00:00
Gonzalo Paniagua Javier 612543850b 2004-01-16 Gonzalo Paniagua Javier <[email protected]>
* System/Environment.cs: increased corlib version.
	* System.Reflection/MonoProperty.cs: changed get_property_info so that
	it only gets the values needed. Reduces the allocations needed.

svn path=/trunk/mcs/; revision=22141
2004-01-16 03:50:54 +00:00
Miguel de Icaza dea00dfac9 Style
svn path=/trunk/mcs/; revision=8529
2002-10-24 22:03:24 +00:00
Gonzalo Paniagua Javier b927f644a1 2002-10-01 Gonzalo Paniagua Javier <[email protected]>
* MonoProperty.cs:
	* PropertyInfo.cs: fixed bug #31535.

svn path=/trunk/mcs/; revision=7906
2002-10-01 16:15:12 +00:00
Tim Coleman 6869e30046 2002-08-12 Tim Coleman <[email protected]>
* MonoProperty.cs:
	                Allow multiple parameters for GetValue ()

svn path=/trunk/mcs/; revision=6605
2002-08-13 01:20:39 +00:00
Paolo Molaro bc7e3329e1 Mon Jul 1 18:01:49 CEST 2002 Paolo Molaro <[email protected]>
* MonoProperty.cs: handle properties with only a set method.

svn path=/trunk/mcs/; revision=5521
2002-07-01 16:02:45 +00:00
Patrik Torstensson cade7da1b9 2002-04-24 Patrik Torstensson <[email protected]>
* MonoProperty.cs (GetValue) : basic implementation to support nunit
	* PropertyInfo.cs (GetValue) : call MonoProperty::GetValue instead of returning null

svn path=/trunk/mcs/; revision=4001
2002-04-23 19:37:33 +00:00
Paolo Molaro f2e9910894 Fri Apr 5 15:40:24 CEST 2002 Paolo Molaro <[email protected]>
* MonoEvent.cs: remove unused code.
	* MonoProperty: implement ToString().

svn path=/trunk/mcs/; revision=3635
2002-04-05 09:55:19 +00:00
Paolo Molaro d10f5cc8b5 Tue Feb 19 20:36:04 CET 2002 Paolo Molaro <[email protected]>
* Assembly.cs, Module.cs, MonoField.cs, MonoMethod.cs,
	MonoProperty.cs, ParameterInfo.cs: Implemented custom attributes
	related methods.

svn path=/trunk/mcs/; revision=2516
2002-02-19 15:46:58 +00:00
Miguel de Icaza 233b4847ec Revert patch
svn path=/trunk/mcs/; revision=1916
2002-01-08 15:48:29 +00:00
Miguel de Icaza bd38f645f0 Compilation Patch from Matt Kimball
svn path=/trunk/mcs/; revision=1906
2002-01-08 01:49:35 +00:00
Ravi Pratap M e8d42158da 2002-01-04 Ravi Pratap <[email protected]>
* Assembly.cs : Decorate missing bits with the MonoTODO
	attribute.

	* ConstructorInfo.cs, MonoMethod.cs, MonoProperty.cs, ParameterInfo.cs,
	ReflectionTypeLoadException.cs : Ditto.

	* FieldInfo.cs : Ditto.

svn path=/trunk/mcs/; revision=1833
2002-01-04 16:06:55 +00:00
Paolo Molaro 371eeef7c0 Tue Dec 18 18:46:22 CET 2001 Paolo Molaro <[email protected]>
* MonoMethod.cs: implemented GetParameters().
	* MonoProperty.cs: PropertyInfo implementation.
	* ParameterInfo.cs: implemented.
	* PropertyInfo.cs: fixes.


Tue Dec 18 18:39:54 CET 2001 Paolo Molaro <[email protected]>

	* Enum.cs: implemented GetValues(), GetNames(), GetName(),
	IsDefined(), GetUnderlyingType().
	* String.cs: fix one instance of Compare().
	* Type.cs: implemented GetProperties(), GetProperty().

svn path=/trunk/mcs/; revision=1625
2001-12-18 14:05:35 +00:00