Commit Graph
84 Commits
Author SHA1 Message Date
Zoltan Varga 2bb04fcdbd 2008-01-29 Zoltan Varga <[email protected]>
* ModuleBuilder.cs: Fix build.

svn path=/trunk/mcs/; revision=94307
2008-01-29 19:54:30 +00:00
Zoltan Varga 6169136e32 2008-01-29 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (GetTypes): Replace TypeBuilders with their created types to
	match MS.

svn path=/trunk/mcs/; revision=94294
2008-01-29 19:15:38 +00:00
Marek Safar dedf922bfb 2007-02-13 Marek Safar <[email protected]>
* ModuleBuilder.cs: Add GetRegisteredType to expose name_cache for internal
	usage.

	* TypeBuilder.cs: Optimized generation of unmanaged data helpers.
	An unmanaged data class helper can be re-used when its size matches to
	size of requested class.

svn path=/trunk/mcs/; revision=72791
2007-02-13 18:59:48 +00:00
Radek Doulik 745b04df11 2007-01-25 Radek Doulik <[email protected]>
* ModuleBuilder.cs: return created type from GetType in case the
       type builder type was already created. Added test-555.cs as
       regression test.


svn path=/trunk/mcs/; revision=71904
2007-01-29 19:24:11 +00:00
Paolo Molaro 7cbb1d9e45 Tue Jan 23 17:45:07 CET 2007 Paolo Molaro <[email protected]>
* ModuleBuilder.cs, AssemblyBuilder.cs: mark the GC-tracked field
	with UIntPtr.


svn path=/trunk/mcs/; revision=71519
2007-01-23 16:45:30 +00:00
Paolo Molaro c9d2f48650 Fri Dec 22 19:42:56 CET 2006 Paolo Molaro <[email protected]>
* ModuleBuilder.cs: associate a resource writer with its
	actual resource (bug #80339).


svn path=/trunk/mcs/; revision=69959
2006-12-22 18:43:54 +00:00
Zoltan Varga 78f16af542 2006-05-15 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs (MonoResource): Add a 'stream' field.

	* ModuleBuilder.cs (DefineManifestResource): Add new net 2.0 method.

svn path=/trunk/mcs/; revision=60712
2006-05-15 18:03:39 +00:00
Paolo Molaro 6acaeddd40 Mon Feb 27 17:12:40 CET 2006 Paolo Molaro <[email protected]>
* ModuleBuilder.cs: unlink the file before saving
	otherwise we might overwrite a file mmapped by the runtime.


svn path=/trunk/mcs/; revision=57330
2006-02-27 16:13:35 +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
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
Geoff Norton db52d7c658 2005-01-18 Geoff Norton <[email protected]>
* ModuleBuilder.cs: Interfaces should have null BaseType.
        Fixes #71301.



svn path=/trunk/mcs/; revision=39111
2005-01-18 19:25:26 +00:00
Paolo Molaro adb633728a Wed Dec 15 11:34:13 CET 2004 Paolo Molaro <[email protected]>
* ModuleBuilder.cs, EnumBuilder.cs: actually add the enumbuilder
	to the type list of the module (bug#70488).


svn path=/trunk/mcs/; revision=37775
2004-12-15 10:32:58 +00:00
Zoltan Varga 1ce2b49646 2004-11-22 Zoltan Varga <[email protected]>
* ModuleBuilder.cs: Check that all types inside the module are created.
	Fixes #69780.

svn path=/trunk/mcs/; revision=36390
2004-11-22 13:44:09 +00:00
Ben Maurer e973fdd5e6 2004-11-13 Ben Maurer <[email protected]>
* ModuleBuilder.cs (Save): Use new WriteToFile icall.


svn path=/trunk/mcs/; revision=36093
2004-11-14 03:06:33 +00:00
Zoltan Varga 9380138dab 2004-10-08 Zoltan Varga <[email protected]>
* ModuleBuilder.cs: Create global type after creation.

svn path=/trunk/mcs/; revision=34821
2004-10-08 17:32:18 +00:00
Zoltan Varga 705efbacab 2004-10-06 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (GetTypes): Fix length of returned array. Fixes
	#65931.

svn path=/trunk/mcs/; revision=34752
2004-10-06 08:19:49 +00:00
Zoltan Varga ca67deeefd 2004-10-04 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (DefineType): Check for duplicate type names. Fixes
	#65988.

svn path=/trunk/mcs/; revision=34657
2004-10-04 09:23:28 +00:00
Zoltan Varga 6cf9db9602 2004-09-09 Zoltan Varga <[email protected]>
* ModuleBuilder.cs: Save the main module of the assembly even if it is
	transient.

svn path=/trunk/mcs/; revision=33629
2004-09-09 08:34:51 +00:00
Ben Maurer 8428d4ab7e 2004-09-02 Ben Maurer <[email protected]>
* ModuleBuilder.cs: dont throw an S.IOE for debugging stuff.
	makes sre apps work

svn path=/trunk/mcs/; revision=33254
2004-09-03 01:03:10 +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
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
Sebastien Pouliot 5b9e9f8578 2004-05-25 Sebastien Pouliot <[email protected]>
* MethodBuilder.cs: Now use FastNewGuidArray to create new random
	Guids without using CryptoConfig. Speed up for MCS.

svn path=/trunk/mcs/; revision=28069
2004-05-25 18:53:12 +00:00
Lluis Sanchez 7e057fa954 * ModuleBuilder.cs: Use name const to load the debugger assembly.
svn path=/trunk/mcs/; revision=26641
2004-05-03 20:33:11 +00:00
Todd Berman 981817788f 2004-05-01 Todd Berman <[email protected]>
* ModuleBuilder.cs: Load the proper assembly for a gac-only install.

svn path=/trunk/mcs/; revision=26499
2004-05-01 08:28:54 +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
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
Zoltan Varga e9420e7f28 2004-01-15 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs (Save): If the entry point is in a module, create
	a new entry point which calls the real one, since the entry point must
	be in the module which contains the manifest.

	* ModuleBuilder.cs (Save): Create the global type automatically if not
	already done.

svn path=/trunk/mcs/; revision=22111
2004-01-15 12:47:31 +00:00
Rafael Teixeira 2fe8d3d4bb 2004-01-10 Rafael Teixeira <[email protected]>
* System.Reflection.Emit/ModuleBuilder.cs: 'types' array is normally larger than number of itens in it,
	so searchs have to stop at 'num_types' limit (as it was it was throwing exceptions inside mbas that needs the case insensitive scan)

svn path=/trunk/mcs/; revision=21906
2004-01-10 15:50:09 +00:00
Zoltan Varga 85a96e4028 2003-12-17 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs (MonoResource): New 'offset' field used by the
	runtime.

	* ModuleBuilder: Implement DefineResource.

svn path=/trunk/mcs/; revision=21279
2003-12-17 16:46:23 +00:00
Zoltan Varga af15c86638 2003-12-10 Zoltan Varga <[email protected]>
* ModuleBuilder.cs: Implement some missing methods, add stubs for others.

svn path=/trunk/mcs/; revision=21000
2003-12-10 22:26:47 +00:00
Zoltan Varga 83669a4ba4 2003-12-08 Zoltan Varga <[email protected]>
* ModuleBuilder.cs: Double the size of the types array during insertion
	do avoid excessive memory allocation and copying. Track the number of
	types in a separate variable.

	* TypeBuilder.cs: Same for the 'fields' and 'methods' arrays.

svn path=/trunk/mcs/; revision=20882
2003-12-08 16:32:50 +00:00
Zoltan Varga 28b76a9cc2 2003-12-03 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (DefinePInvokeMethod): Implement.

	* ModuleBuilder.cs (DefineGlobalMethod): Implement the Net 1.2 variants.

svn path=/trunk/mcs/; revision=20752
2003-12-03 19:32:07 +00:00
Dick Porter f204bdc417 Do string compares with the Invariant culture.
Use the char forms of IndexOf and LastIndexOf, so that the comparison is
done with the Invariant culture.

svn path=/trunk/mcs/; revision=20593
2003-11-28 18:22:08 +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
Martin Baulig 1dbe5c0173 2003-11-06 Martin Baulig <[email protected]>
* ModuleBuilder.cs (ModuleBuilder.Save): Call `build_metadata'
	before writing the symbol file.

svn path=/trunk/mcs/; revision=19682
2003-11-06 13:13:18 +00:00
Zoltan Varga da7190904e 2003-11-06 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs (get_next_table_index): Moved to ModuleBuilder,
	since table indexes are per-module.

svn path=/trunk/mcs/; revision=19672
2003-11-06 09:03:12 +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
Zoltan Varga 71412a4dbc 2003-11-03 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs ModuleBuilder.cs: First steps toward a fix for
	#48700 (proper module support in Ref.Emit). Remove is_main field from
	ModuleBuilder and add a mainModule field to AssemblyBuilder instead.
	This is neccesary, since the main module is determined during the
	Save () call: the module with the same file name as the assembly is
	the main module. Also create a default main module, if one is not
	existing.

svn path=/trunk/mcs/; revision=19574
2003-11-03 15:11:25 +00:00
Zoltan Varga a2c9a5f67e 2003-07-11 Zoltan Varga <[email protected]>
* ModuleBuilder.cs AssemblyBuilder.cs: Implemented IsTransient ().

svn path=/trunk/mcs/; revision=16125
2003-07-11 18:57:05 +00:00
Zoltan Varga 2c633c2535 2003-07-11 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: Added argument checking to all methods according
	to the MSDN docs. Also marked DefineUnmanagedResource and its friends
	as not implemented.
	* ModuleBuilder.cs: Added new property FileName used by AssemblyBuilder.

svn path=/trunk/mcs/; revision=16121
2003-07-11 17:19:29 +00:00
Zoltan Varga 723bfb79f6 2003-05-21 Zoltan Varga <[email protected]>
* ModuleBuilder.cs:
	- Implement DefineInitializedData in terms of DefineUninitializedData
	- Name the types of global fields $ArrayType$<len> to cut back on the
	number of types created
	- Add argument checking

svn path=/trunk/mcs/; revision=14752
2003-05-21 10:29:30 +00:00
Paolo Molaro cb3b921f1e Tue Apr 15 13:50:41 CEST 2003 Paolo Molaro <[email protected]>
* ModuleBuilder.cs, TypeBuilder.cs: set nesting_type before
	calling setup_internal_class ().

svn path=/trunk/mcs/; revision=13656
2003-04-15 11:58:30 +00:00
Zoltan Varga 260fcb6b93 2003-02-26 Zoltan Varga <[email protected]>
* TypeBuilder.cs (DefineInitializedData): Removed unnecessary assignments.

	* ModuleBuilder.cs (DefineInitializedData): Do not call
	TypeBuilder::DefineInitializedData since that would mean defining a
	nested type of the global type, which is wrong. Instead define a
	new public type as MS does.

	* ModuleBuilder.cs (DefineUninitializedData): Ditto.

svn path=/trunk/mcs/; revision=11999
2003-02-26 14:40:21 +00:00
Paolo Molaro 606a0ec287 Thu Feb 13 18:40:52 CET 2003 Paolo Molaro <[email protected]>
* ModuleBuilder.cs: add the basic initialization call.

svn path=/trunk/mcs/; revision=11555
2003-02-13 17:44:46 +00:00