Commit Graph
106 Commits
Author SHA1 Message Date
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
Marek Safar feb5080d23 Optimize parameters handling to do much less allocation 2013-02-25 14:11:04 +01:00
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Rodrigo Kumpera 2c8c93b378 Remove SRE from Full AOT builds. 2012-11-06 18:18:14 -05:00
Marek Safar 7883a2dafd Clean up some static initializers 2012-10-03 12:19:55 +01:00
Marek Safar c14d3585bd Update to the latest dlr 2012-06-08 09:40:15 +01:00
Zoltan Varga b42fb3a0fa Avoid passing a Module to the GetSigHelper methods (), which can happen if an ILBuilder is used from a dynamic method. Fixes #1900. 2012-01-20 05:56:48 +01:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Zoltan Varga 682d244754 Implement some DynamicILInfo methods. 2011-03-07 20:19:04 +01:00
Marek Safar d84d7c7eb9 Remove no longer used BOOTSTRAP conditionals 2010-12-29 12:41:12 +00: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
Zoltan Varga c751247ae7 2010-01-03 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Disallow byref types. Fixes #564411.

svn path=/trunk/mcs/; revision=148981
2010-01-03 15:06:49 +00:00
Jb Evain a29f0cf974 2009-12-09 Jb Evain <[email protected]>
* ILGenerator.cs (Emit(OpCode,LocalBuilder)): deal with
	opcodes not related to locals.


svn path=/trunk/mcs/; revision=147940
2009-12-09 19:27:58 +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 12faba85d1 Expose more stuff for 4.0 bootstrap
svn path=/trunk/mcs/; revision=141759
2009-09-11 13:10:37 +00:00
Rodrigo Kumpera 91af725545 2009-09-02 Rodrigo Kumpera <[email protected]>
* ILGenerator.cs (label_fixup): Check for unmarked labels.
	Fixes #536243.

svn path=/trunk/mcs/; revision=141176
2009-09-02 20:49:48 +00:00
Marek Safar 57e4b484ca Add some 4.0 bits
svn path=/trunk/mcs/; revision=139497
2009-08-06 14:49:56 +00:00
Miguel de Icaza 722d660422 2009-07-26 Miguel de Icaza <[email protected]>
* ILGenerator.cs: Fix the exception thrown when LocalBuilders are
	mixed between ILGenerators.

svn path=/trunk/mcs/; revision=138709
2009-07-26 23:48:12 +00:00
Rodrigo Kumpera da1346e4fd 2009-06-02 Rodrigo Kumpera <[email protected]>
* ILGenerator.cs (EmitCall): Under 2.0 profile ignore optional
	arguments if the method call conv is not vararg.

2009-06-02 Rodrigo Kumpera  <[email protected]>

	* ILGeneratorTest.cs: Tests for #509131.

svn path=/trunk/mcs/; revision=135251
2009-06-02 22:30:57 +00:00
Zoltan Varga e281a9eece 2009-02-23 Zoltan Varga <[email protected]>
* ILGenerator.cs SignatureHelper.cs: Add checks for user types.

svn path=/trunk/mcs/; revision=127681
2009-02-23 00:37:34 +00:00
Zoltan Varga 05d68ca471 2009-01-24 Zoltan Varga <[email protected]>
* ILGenerator.cs: Fix warnings.

svn path=/trunk/mcs/; revision=124420
2009-01-24 21:30:34 +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
Jb Evain 68f04fa377 2008-04-26 Jb Evain <[email protected]>
* ILGenerator.cs, AssemblyBuilder.cs, TypeBuilder.cs:
	replace usages of new Type [0] by Type.EmptyTypes.
	Found with Gendarme.


svn path=/trunk/mcs/; revision=101927
2008-04-26 15:56:41 +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
Gert Driesen 5355f97836 * ILGenerator.cs: Added missing null checks. Removed extra tabs.
* ILGeneratorTest.cs: Improve test for DeclareLocal null check.
Added tests for null checks in Emit overloads.

svn path=/trunk/mcs/; revision=87476
2007-10-15 08:13:33 +00:00
Rolf Bjarne Kvinge d77caf4c86 In System.Reflection.Emit:
2007-08-17  Rolf Bjarne Kvinge  <[email protected]>

	* ILGenerator.cs: Change BeginCatchBlock to end the current filter block if called with a null exceptionType. Added ILExceptionBlock.FILTER_START to be able to track if we're in a filter block or not. Renamed PatchLastClauseStart to PatchFilterClause to match better what it does, and make it update the handler's type to FILTER. Fixes #81431.

In Test/System.Reflection.Emit:
2007-08-17  Rolf Bjarne Kvinge  <[email protected]>

	* ILGeneratorTest.cs: Added FilterAndCatchBlock (bug #81431), InvalidFilterBlock1, ValidFilterBlock1, ValidFilterBlock2.


svn path=/trunk/mcs/; revision=84262
2007-08-17 09:12:13 +00:00
Zoltan Varga 5ea36fc82c 2007-03-17 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Disallow ldtoken on a DynamicMethod as well.

svn path=/trunk/mcs/; revision=74517
2007-03-17 10:27:36 +00:00
Zoltan Varga b86a32c0e5 2007-03-17 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Do not allow ldftn on a DynamicMethod to be
	compatible with MS.NET. Fixes #81157.

svn path=/trunk/mcs/; revision=74516
2007-03-17 10:23:22 +00:00
Miguel de Icaza 54b57a3e74 Improve message
svn path=/trunk/mcs/; revision=69522
2006-12-15 05:23:57 +00:00
Miguel de Icaza 44461926e5 Rationalize MonoTODO
svn path=/trunk/mcs/; revision=68714
2006-11-30 00:30:54 +00:00
Miguel de Icaza 8a1af5fd38 2006-11-16 Miguel de Icaza <[email protected]>
* DirectoryInfo.cs (GetFiles): Implement option with SearchOptions
	== AllDirectories

And a lot of MonoTODOs updated as well


svn path=/trunk/mcs/; revision=67998
2006-11-16 14:14:01 +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
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
Marek Safar d45c9f7d00 2006-03-28 Marek Safar <[email protected]>
* ILGenerator.cs: Delayed the exception stack creation. It saves ~1.5 MB
	for corlib compilation.

svn path=/trunk/mcs/; revision=58661
2006-03-28 17:27:51 +00:00
Marek Safar 04757c1927 2006-03-27 Marek Safar <[email protected]>
* ILGenerator.cs: Tune up label defaults, switched to double resizing.

svn path=/trunk/mcs/; revision=58612
2006-03-27 19:05:58 +00:00
Paolo Molaro d8cef0b742 Mon Dec 5 15:13:26 CET 2005 Paolo Molaro <[email protected]>
* ILGenerator.cs: fixed emitting doubles on ARM.


svn path=/trunk/mcs/; revision=53924
2005-12-05 14:14:16 +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
Jb Evain e0a320052c 2005-07-21 Jb Evain <[email protected]>
* ILGenerator.cs: Implement filter blocks support.
	Fixes bug #75010.

svn path=/trunk/mcs/; revision=47538
2005-07-21 22:08:08 +00:00
Zoltan Varga 33e24e8018 2005-07-21 Zoltan Varga <[email protected]>
* ILGenerator.cs (BeginFaultBlock): Call InternalEndClause () here
	too. Reported by Jeroen Frijters.

svn path=/trunk/mcs/; revision=47516
2005-07-21 14:00:42 +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
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
Marek Safar db4e70e8fc 2005-03-09 Marek Safar <[email protected]>
* ILGenerator.cs (DeclareLocal): Throw an exception for null argument.

svn path=/trunk/mcs/; revision=41587
2005-03-09 08:28:31 +00:00
Martin Baulig ed1f238a73 2004-09-01 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs: Removed.

	* ModuleBuilder.cs, LocalBuilder.cs, ILGenerator.cs: Removed the
	old debugging code.

svn path=/trunk/mcs/; revision=33166
2004-09-01 17:22:23 +00:00
Martin Baulig 25030496b0 2004-07-29 Martin Baulig <[email protected]>
* ILGenerator.cs (ILGenerator.Mono_GetCurrentOffset): New static
	internal method.

	* ModuleBuilder.cs (ModuleBuilder.Mono_GetGuid): New static
	internal method.

svn path=/trunk/mcs/; revision=31612
2004-07-29 16:06:37 +00:00
Martin Baulig 13f40a38f3 2004-07-22 Martin Baulig <[email protected]>
* ILGenerator.cs (ILGenerator.BeginFaultBlock): Implemented.

svn path=/trunk/mcs/; revision=31385
2004-07-22 18:39:43 +00:00