Commit Graph
78 Commits
Author SHA1 Message Date
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
Miguel de Icaza 62110d8297 2004-07-07 Miguel de Icaza <[email protected]>
* LocalBuilder.cs: Remove MakePinned, we are now going to use
	ILGenerator.DeclaraLocal that takes the `bool pinned' argument.

	* ILGenerator.cs (DeclareLocal): Add `pinned' version of the
	method on the 2.0 profile.

svn path=/trunk/mcs/; revision=30814
2004-07-07 03:53:54 +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 1b05fa056c 2004-06-08 Martin Baulig <[email protected]>
* ILGenerator.cs (TokenGenerator.GetToken): Added overloaded
	version which takes a MethodInfo and a Type[].
	(IlGenerator.EmitCall): When emitting a call to a varargs method,
	use the new GetToken() to pass the optional argument types to the
	runtime.

	* ModuleBuilder.cs (ModuleBuilder.getMethodToken): New interncall.

svn path=/trunk/mcs/; revision=29000
2004-06-08 02:26:17 +00:00
Ben Maurer 6c57356507 2004-04-29 Ben Maurer <[email protected]>
* ILGenerator.cs, ModuleBuilder.cs: readonlyificate.

svn path=/trunk/mcs/; revision=26346
2004-04-29 21:42:11 +00:00
Ben Maurer 0beb19d44f 2004-04-01 Ben Maurer <[email protected]>
* LocalBuilder.cs: Fix pinned support.

svn path=/trunk/mcs/; revision=24915
2004-04-01 18:01:47 +00:00
Miguel de Icaza 1c69eeeb31 Indendation
svn path=/trunk/mcs/; revision=22633
2004-01-31 03:50:14 +00:00
Ben Maurer 022fccaeac 2003-12-29 Ben Maurer <[email protected]>
* MethodBuilder.cs, ConstructorBuilder.cs: Override GetParameterCount.
	* ILGenerator.cs: Use GetParameterCount.

svn path=/trunk/mcs/; revision=21538
2003-12-29 17:08:30 +00:00
Zoltan Varga ba9f8c0b89 2003-12-18 Zoltan Varga <[email protected]>
* ILGenerator.cs: Applied patch from Ben Maurer
	([email protected]). Allocate arrays holding label data
	lazily and reduce their size.

svn path=/trunk/mcs/; revision=21321
2003-12-18 14:54:32 +00:00
Zoltan Varga 9d906d57da 2003-11-24 Zoltan Varga <[email protected]>
* ILGenerator.cs MethodBuilder.cs ConstructorBuilder.cs: Retrieve
	tokens from a token generator object instead of from the ModuleBuilder,
	to support the implementation of DynamicMethod. Also get rid of the
	unused 'mbuilder' field.

	* ModuleBuilder.cs: Create a token generator object which can be
	passed to ILGenerator.

svn path=/trunk/mcs/; revision=20383
2003-11-24 13:45:09 +00:00
Zoltan Varga 6e583cf0a8 2003-11-24 Zoltan Varga <[email protected]>
* LocalBuilder.cs ILGenerator.cs: Get rid of 'module' field, obtain
	needed objects from the ilgen object instead.

svn path=/trunk/mcs/; revision=20379
2003-11-24 11:39:46 +00:00
Zoltan Varga 995111be74 2003-11-21 Zoltan Varga <[email protected]>
* ILGenerator.cs: Remove unused abuilder member.

svn path=/trunk/mcs/; revision=20305
2003-11-21 16:20:38 +00:00
Zoltan Varga 74069838f9 2003-11-03 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs ModuleBuilder.cs ILGenerator.cs: Move getUSIndex
	and getToken methods, and the associated icalls to ModuleBuilder,
	since tokens are per-module.

	* AssemblyBuilder.cs ModuleBuilder.cs: Partially revert the previous
	patch, since having the 'is_main' field is useful in the unmanaged
	code.

	* AssemblyBuilder.cs ModuleBuilder.cs: Move the metadata creation and
	file creation logic to ModuleBuilder:Save (), since this needs to be
	done for every module. Also move the corresponding icalls to
	ModuleBuilder.

svn path=/trunk/mcs/; revision=19592
2003-11-03 20:47:00 +00:00
Paolo Molaro a79a2077b7 Sat Sep 27 16:17:08 CEST 2003 Paolo Molaro <[email protected]>
* ILGenerator.cs: instance fields are loaded from this.

svn path=/trunk/mcs/; revision=18330
2003-09-27 14:28:17 +00:00
Malte Hildingson bf83c59a7e * Double.cs, ILGenerator.cs: changed unsafe reference
parameter to `out' parameter.

svn path=/trunk/mcs/; revision=17013
2003-08-03 10:55:41 +00:00
Malte Hildingson 029b744bcc * Double.cs: added icall AssertEndianity.
* ILGenerator.cs: modified the double emission to use above icall.

svn path=/trunk/mcs/; revision=17003
2003-08-02 12:41:16 +00:00
Paolo Molaro f57a1d467a Tue Jun 3 11:14:51 CEST 2003 Paolo Molaro <[email protected]>
* ILGenerator.cs, OpCode.cs: optimize opcode space usage.

svn path=/trunk/mcs/; revision=15083
2003-06-03 09:23:48 +00:00
Miguel de Icaza 6b4897725b 2003-04-20 Miguel de Icaza <[email protected]>
* ILGenerator.cs (EmitCall): Implement.

	Flag a few unimplemented methods with MonoTODO, make coding style
	for method definitions Mono consistent.

svn path=/trunk/mcs/; revision=13832
2003-04-20 20:57:47 +00:00
Zoltan Varga fa79becab9 2003-04-17 Zoltan Varga <[email protected]>
* ILGenerator.cs: Implement EmitWriteLine methods.

svn path=/trunk/mcs/; revision=13721
2003-04-17 14:55:25 +00:00
Zoltan Varga 9c91014757 2003-03-26 Zoltan Varga <[email protected]>
* ILGenerator.cs: Implemented ThrowException.

svn path=/trunk/mcs/; revision=12855
2003-03-26 18:20:26 +00:00
Zoltan Varga 1fa0fb7c1e 2003-03-10 Zoltan Varga <[email protected]>
* ILGenerator.cs: Propagate maxstack info along branches.

svn path=/trunk/mcs/; revision=12404
2003-03-10 15:10:46 +00:00
Zoltan Varga c91733841b 2003-03-06 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Do not pop the arguments off the stack for
	ldftn etc. Fixes #39196.

svn path=/trunk/mcs/; revision=12258
2003-03-06 17:12:25 +00:00
Zoltan Varga 53f7fd7b57 2003-02-28 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Add fixup for already created methods and
	fields. Do not add fixup for types since their table index do not
	change any more.

svn path=/trunk/mcs/; revision=12067
2003-02-28 18:41:17 +00:00
Martin Baulig b40f0a5f2a 2003-02-09 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs (MarkSequencePoint): New method which takes
	just the required arguments as scalars, not arrays.

	* ILGenerator.cs (ILGenerator.MarkSequencePoint): Use that new
	interface method; unnecessarily creating such a large number of
	arrays is both slow and too memory consuming.

svn path=/trunk/mcs/; revision=11406
2003-02-09 20:09:05 +00:00
Zoltan Varga 28c52a2734 2003-02-04 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: added GetToken (SignatureHelper).

	* ILGenerator.cs: implemented EmitCalli() methods

	* SignatureHelper.cs: implemented GetMethoSigHelper() methods.

svn path=/trunk/mcs/; revision=11191
2003-02-04 10:33:54 +00:00
Zoltan Varga 7769949627 2003-01-10 Zoltan Varga <[email protected]>
* ILGenerator.cs: Implemented EmitWriteLine(string).

svn path=/trunk/mcs/; revision=10359
2003-01-10 19:33:12 +00:00
Paolo Molaro b2b4e687a2 Fri Jan 10 16:03:30 CET 2003 Paolo Molaro <[email protected]>
* ILGenerator.cs, MethodBuilder.cs, TypeBuilder.cs,
	ConstructorBuilder.cs: some tweaks to reduce memory usage.

svn path=/trunk/mcs/; revision=10334
2003-01-10 15:06:28 +00:00
Paolo Molaro c06db227c4 Fri Nov 8 14:53:03 CET 2002 Paolo Molaro <[email protected]>
* ILGenerator.cs: account for the exception object being passed to the
	catch handler to calc max_stack.

svn path=/trunk/mcs/; revision=8884
2002-11-08 13:57:06 +00:00
Martin Baulig fa8a352b57 2002-07-19 Martin Baulig <[email protected]>
* ILGenerator.cs (Emit (OpCode, LocalBuilder)): Throw an exception
	when trying to emit a local that was defined in a different ILGenerator.

	* LocalBuilder.cs (LocalBuilder): Added `ILGenetator' argument to
	the constructor.

svn path=/trunk/mcs/; revision=5914
2002-07-19 12:52:28 +00:00