Commit Graph
52 Commits
Author SHA1 Message Date
Rodrigo Kumpera 3673d051fb [corlib]Implement .net 4.0 ParameterInfo. 2013-08-22 16:00:14 -04:00
Atsushi Eno 88dadaaf10 Revert "Revert "Fix bug #7829 - do NOT reject ConstructorInfo in DynamicILInfo.GetTokenFor().""
This reverts commit 0ef5f49c1f.
2013-08-19 12:13:38 +09:00
Atsushi Eno 0ef5f49c1f Revert "Fix bug #7829 - do NOT reject ConstructorInfo in DynamicILInfo.GetTokenFor()."
This reverts commit b43211d101.
2013-08-18 15:34:37 +09:00
Atsushi Eno b43211d101 Fix bug #7829 - do NOT reject ConstructorInfo in DynamicILInfo.GetTokenFor().
It is only one of probably many reasons that prevents Jurassic JavaScript engine.
2013-08-18 15:31:40 +09:00
Marek Safar b84ad279fb Better exception for unmarked labels 2013-07-03 14:57:40 +02:00
Martin Baulig 8c2389d8d0 Put back MethodInfo.CreateDelegate() and fix DynamicMethod. 2013-03-13 14:19:05 -04:00
Marek Safar feb5080d23 Optimize parameters handling to do much less allocation 2013-02-25 14:11:04 +01:00
Rodrigo Kumpera 2c8c93b378 Remove SRE from Full AOT builds. 2012-11-06 18:18:14 -05:00
Konrad M. Kruczynski 02080f980e Fix for creating dynamic method with owner being array or iface.
It shouldn't be possible, according to MSDN documentation. Two
test cases included.
2012-06-09 19:38:04 +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 4d778cc3c7 Avoid creating an AssemblyBuilder in DynamicMethod if not needed. 2011-06-30 20:46:44 +02:00
Jb Evain 3c812d8a93 Remove warnings 2011-04-15 14:11:27 +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
Zoltan Varga 682d244754 Implement some DynamicILInfo methods. 2011-03-07 20:19:04 +01:00
Rodrigo Kumpera 89d1455a80 Don't use finalization to cleanup dynamic methods.
* reflection.c: Use a reference queue to cleanup
	dynamic methods instead of finalization.

	* runtime.c: Shutdown the dynamic method queue
	before runtime cleanup begins.

	* DynamicMethod.cs: No longer finalizable.

	* icall-def.h: Remove unused dynamic method icall.

	Fixes #660422
2011-02-01 16:52:43 +01:00
Rodrigo Kumpera ca01c95ed7 Encode all gtd as open instantiations by default.
* ILGenerator.cs (TokenGenerator): GetToken now taken an extra
	argument create_open_instance if it should encode a gtd as
	a generic instance.

	* ILGenerator.cs (ILGenerator): Ask TokenGenerator to create
	an open instance under all cases but if the opcode is ldtoken.

	* ModuleBuilder.cs: Adjust to signature change.

	* DynamicMethod.cs: Ditto.

	* Environment.cs: Since an icall signature has changed, we
	must bump corlib version.

	* appdomain.c: Ditto.

	* icall.c: Pass the new value forward to
	mono_image_create_token.

	* reflection.c (mono_image_create_token): Handle create_methodspec
	for TypeBuilder and MonoType.

	Fixes #649017
2010-10-25 19:47: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
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
Marek Safar 8c3af1301d 2009-07-28 Marek Safar <[email protected]>
* DynamicMethod.cs: Pass skipVisibility.


svn path=/trunk/mcs/; revision=138886
2009-07-28 22:07:01 +00:00
Sebastien Pouliot 46bf0c89fe 2009-03-20 Sebastien Pouliot <[email protected]>
* DynamicMethod.cs (Invoke): Wrap a MethodAccessException inside a
	TargetInvocationException (required for Moonlight 2).


svn path=/trunk/mcs/; revision=129871
2009-03-20 13:48:57 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +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
Zoltan Varga 77174b1233 2008-03-06 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Create a dynamic assembly to hold the anon hosted methods.

svn path=/trunk/mcs/; revision=97530
2008-03-06 15:31:00 +00:00
Zoltan Varga 8ddcb3a0b6 2008-03-06 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Add net 3.5 ctor overloads.

svn path=/trunk/mcs/; revision=97524
2008-03-06 15:13:17 +00:00
Atsushi Eno eabd01c6bd 2007-11-16 Atsushi Enomoto <[email protected]>
* AssemblyBuilder.cs : added missing 2.0 member.
        * DynamicMethod.cs : removed extra stuff.
        * DynamicILInfo.cs : no public .ctor().
        * ILGenerator.cs : fixed 2.0 member signatures.


svn path=/trunk/mcs/; revision=89786
2007-11-16 19:51:37 +00:00
Jb Evain cee45471f8 2007-09-11 Jb Evain <[email protected]>
* DynamicMethod.cs: store the owner of the DynamicMethod.

svn path=/trunk/mcs/; revision=85660
2007-09-11 20:51:10 +00:00
Zoltan Varga 2c21ca2b5d 2007-08-10 Zoltan Varga <[email protected]>
* DynamicILInfo.cs: New file.

	* DynamicMethod.cs (GetDynamicILInfo): New 2.0 method.

svn path=/trunk/mcs/; revision=83814
2007-08-10 12:59:21 +00:00
Atsushi Eno 63b76a58b7 oops, it is S.R.E, not S.R.
2007-07-04  Atsushi Enomoto  <[email protected]>

	* DynamicMethod.cs : 2.0 API fix.


svn path=/trunk/mcs/; revision=81312
2007-07-04 02:21:10 +00:00
Zoltan Varga 361bc61c72 2007-06-21 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Applied patch from Robert Jordan ([email protected]). Add
	a destructor which frees the runtime data for the method.

svn path=/trunk/mcs/; revision=80498
2007-06-21 17:31:47 +00:00
Zoltan Varga ac797319d9 2007-03-12 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Add a field used by unmanaged code.

svn path=/trunk/mcs/; revision=74118
2007-03-12 12:36:32 +00:00
Miguel de Icaza 44461926e5 Rationalize MonoTODO
svn path=/trunk/mcs/; revision=68714
2006-11-30 00:30:54 +00:00
Gert Driesen 1d03c94d91 * DynamicMethod.cs: Allow empty name and null return type.
Fixes bug #79367.
* DynamicMethodTest.cs: Enabled tests for bug #79367.

svn path=/trunk/mcs/; revision=65508
2006-09-16 14:13:06 +00:00
Zoltan Varga 43d28b93ef 2006-09-02 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Fix a warning.

svn path=/trunk/mcs/; revision=64759
2006-09-02 09:26:44 +00:00
Zoltan Varga 160e0da298 2006-08-18 Zoltan Varga <[email protected]>
* *.cs: Use String.Empty instead of "" in a lot of places.

svn path=/trunk/mcs/; revision=63995
2006-08-18 15:46:49 +00:00
Gert Driesen 357e6e38b0 * corlib_test.dll.sources: Added DynamicMethodTest.cs from
Test/System.Reflection.Emit.
* DynamicMethod.cs: Fix check for empty method body, avoids SIGSEV.
* DynamicMethodTest.cs: Added test for bug #78253, and added test for empty
method body.
* AssemblyBuilderTest.cs: Added test for bug #78724.

svn path=/trunk/mcs/; revision=62377
2006-07-09 11:48:58 +00:00
Zoltan Varga a1a8b1b63e 2006-07-08 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Create all other DynamicMethod's referenced by
	this method as well. Check for an empty method body.

	* ILGenerator.cs (Emit): Handle DynamicMethod's which might not have a
	declaring type.

svn path=/trunk/mcs/; revision=62369
2006-07-08 20:09:39 +00:00
Zoltan Varga 5916daddc7 2006-02-17 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Implement DefineParameter ().

	* ParameterBuilder.cs: Add support for DynamicMethod parents.

svn path=/trunk/mcs/; revision=56997
2006-02-17 18:17:56 +00:00
Zoltan Varga f4ff8d9618 2005-08-19 Zoltan Varga <[email protected]>
* DynamicMethod.cs (CreateDelegate): Don't cache the delegate since it
	needs to be different for each target.

svn path=/trunk/mcs/; revision=48571
2005-08-19 18:59:42 +00:00
Zoltan Varga 946fc6af54 2005-08-19 Zoltan Varga <[email protected]>
* DynamicMethod.cs (CreateDynMethod): Call ilgen.label_fixup ().

	* DynamicMethod.cs (AddRef): Reserve every second ref slot for use by the
	runtime.

svn path=/trunk/mcs/; revision=48569
2005-08-19 18:32:57 +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
Miguel de Icaza e174024c39 2005-03-24 Miguel de Icaza <[email protected]>
* DynamicMethod.cs (CreateDelegate): Add second overload based on
	the first one that allows for a `target' argument.

2005-03-24  Miguel de Icaza  <[email protected]>

	* Delegate.cs: Add CreateDelegate with a target option, currently
	internal as it is not exposed by the framework yet.



svn path=/trunk/mcs/; revision=42243
2005-03-25 01:27:17 +00:00
Zoltan Varga fb510c077b 2004-09-23 Zoltan Varga <[email protected]>
* DynamicMethod.cs: Add MetadataToken property and tweak Module property.

svn path=/trunk/mcs/; revision=34306
2004-09-23 19:07:26 +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
Martin Baulig 0c77e93acb Reflect latest API changes.
svn path=/trunk/mcs/; revision=29006
2004-06-08 02:58:31 +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
Atsushi Eno bd1e4b847d 2004-04-23 Atsushi Enomoto <[email protected]>
* ConstructorBuilder.cs, DynamicMethod.cs, EnumBuilder.cs,
	  GenericTypeParameterBuilder.cs, MethodBuilder.cs, ModuleBuilder.cs,
	  OpCodes.cs, TypeBuilder.cs :
	  NET_2_0 related build fix.

svn path=/trunk/mcs/; revision=25881
2004-04-23 04:19:38 +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