Commit Graph
123 Commits
Author SHA1 Message Date
Andrés G. Aragoneses 0eb40ad2da Fix very sticky typo in numerous places 2014-01-19 17:51:24 +01: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
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 b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Rodrigo Kumpera 2c8c93b378 Remove SRE from Full AOT builds. 2012-11-06 18:18:14 -05:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Rolf Bjarne Kvinge f64261401d Fix many corcompare issues for moonlight 2011-03-31 16:05:03 +02:00
Geoff Norton 16d4fd790b Further .NET 4.0 ification of the mobile profile 2011-01-25 20:10:54 -05:00
Marek Safar 578e0521a6 Don't throw an obsolete exception 2010-12-03 10:13:03 +00:00
Sebastien Pouliot 7b3f524735 Add missing 'same-module' check for GetConstructorToken
* ModuleBuilder.cs: Add missing 'same-module' check for GetConstructorToken
just like methods and fields already have
2010-10-26 16:26:25 -04: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
Jb Evain 5af7b13766 2010-06-22 Jb Evain <[email protected]>
* ModuleBuilder.cs
	* AssemblyBuilder.cs:
		properly override the new net_4_0 methods in moonlight.


svn path=/trunk/mcs/; revision=159312
2010-06-22 08:18:42 +00:00
Marek Safar 6b119e8b04 2010-04-06 Marek Safar <[email protected]>
* ModuleBuilder.cs: Use Dictionary.


svn path=/trunk/mcs/; revision=154833
2010-04-06 09:47:13 +00:00
Rodrigo Kumpera e880014952 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement Resolve*.

svn path=/trunk/mcs/; revision=154676
2010-04-01 22:57:44 +00:00
Rodrigo Kumpera 0beef243b4 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement ModuleVersionId.

svn path=/trunk/mcs/; revision=154675
2010-04-01 22:57:36 +00:00
Rodrigo Kumpera 6d55e2c917 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement ResolveType.

svn path=/trunk/mcs/; revision=154663
2010-04-01 17:37:52 +00:00
Rodrigo Kumpera d5876b9b03 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement GetMethodImpl.

svn path=/trunk/mcs/; revision=154661
2010-04-01 17:37:35 +00:00
Rodrigo Kumpera 273cd925d4 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs (DefineType): Raise the correct exception
	when name is null.

svn path=/trunk/mcs/; revision=154659
2010-04-01 17:37:18 +00:00
Rodrigo Kumpera 814e0d27d2 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement IsResource.

svn path=/trunk/mcs/; revision=154658
2010-04-01 17:37:09 +00:00
Rodrigo Kumpera 37939abe92 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement ScopedName property.

svn path=/trunk/mcs/; revision=154656
2010-04-01 17:36:52 +00:00
Rodrigo Kumpera ddd89e3700 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement Name property.

svn path=/trunk/mcs/; revision=154655
2010-04-01 17:36:43 +00:00
Rodrigo Kumpera 104964981d 2010-03-31 Rodrigo Kumpera <[email protected]>
* ModuleBuilder.cs: Implement Assembly property.

svn path=/trunk/mcs/; revision=154596
2010-04-01 00:16:12 +00:00
Zoltan Varga f9ae95c854 2010-03-30 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (DefinedType): Lookup inside the name_cache before creating
	the TypeBuilder since the runtime code can't handle a duplicate type name.

svn path=/trunk/mcs/; revision=154486
2010-03-30 20:11:02 +00:00
Jb Evain 05a5b21fa0 use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153656
2010-03-16 12:10:19 +00:00
Sebastien Pouliot 88c66d5a4c In Assembly:
2010-02-09  Sebastien Pouliot  <[email protected]>

	* AssemblyInfo.cs: Mono.CompilerServices.SymbolWriter does not
	need to access mscorlib.dll internals anymore (ArrayList and
	Hashtable)

In .:
2010-02-09  Sebastien Pouliot  <[email protected]>

	* net_2_1_raw_corlib.dll.sources: Add Mono.CompilerServices.
	SymbolWriter source files directly into mscorlib 2.1

In System.Reflection.Emit:
2010-02-09  Sebastien Pouliot  <[email protected]>

	* ModuleBuilder.cs: Do not use reflection to create SymbolWriterImpl
	for Moonlight since the code is bundled inside mscorlib.dll to avoid
	having a non-platform assembly poking the internals of mscorlib.dll


svn path=/trunk/mcs/; revision=151176
2010-02-10 02:41:23 +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
Sebastien Pouliot 1bcf41ee8e In System.Reflection.Emit:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* ModuleBuilder.cs: Add missing 'className' validations in GetType
	* TypeBuilder.cs: Add missing 'names' validations in 
	DefineGenericParameters

In Test/System.Reflection.Emit:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* ModuleBuilderTest.cs: Add test cases for GetType overloads
	* TypeBuilderTest.cs: Remove NotWorking from two DefineGenericParameters test case.


svn path=/trunk/mcs/; revision=145013
2009-10-29 12:51:36 +00:00
Rodrigo Kumpera 735f33a230 2009-07-02 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs: Add IsRun property that returns true if
	any execute mode is enabled.

	* ModuleBuilder.cs: Add set_wrappers_type icall to define which type
	is to be bound to wrappers. Create a new abstract type and call it
	when the assembly is build this way.

	Replace explicit checks for global_type with calls to CreateGlobalType.

	* TypeBuilder.cs: Internal ctor now takes an extra table_idx argument.

svn path=/trunk/mcs/; revision=137322
2009-07-02 20:09:39 +00:00
Jb Evain 52b6089b22 2009-06-05 Jb Evain <[email protected]>
* ModuleBuilder.cs (DefineManifestResource): expose during
	BOOTSTRAP_NET_2_0 as well.


svn path=/trunk/mcs/; revision=135519
2009-06-05 12:59:31 +00:00
Jb Evain 8a37d27e93 in System.Reflection:
2008-02-21  Jb Evain  <[email protected]>

	* Module.cs: add a new virtual GetModuleVersionId method,
	and make the properties .MvId and ModuleVersionId call it.
	This way, we can override it in ModuleBuilder.
	Part of the fix for #471302.

in System.Reflection.Emit:
2008-02-21  Jb Evain  <[email protected]>

	* ModuleBuilder.cs: override GetModuleVersionId
	so that we can get the module guid from Module.ModuleVersionId.
	Part of the fix for #471302.

svn path=/trunk/mcs/; revision=127631
2009-02-21 16:17:01 +00:00
Marek Safar 4f020c7f91 2008-09-23 Marek Safar <[email protected]>
* ModuleBuilder.cs: Fixed NRE when default symbol writer cannot be
	loaded. 


svn path=/trunk/mcs/; revision=113824
2008-09-23 14:05:29 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Marek Safar 2e9aec1aac 2008-07-11 Marek Safar <[email protected]>
* ModuleBuilder.cs: Couple of micro optimizations.


svn path=/trunk/mcs/; revision=107709
2008-07-11 11:10:03 +00:00
Andreas N 7847e43699 2008-07-03 Andreas Nahr <[email protected]>
* SignatureHelper.cs: Fix parameter names
	* ModuleBuilder.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107172
2008-07-03 18:27:53 +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
Gert Driesen 3fcce25f53 * corlib_test.dll.sources: Added ConstructorOnTypeBuilderInstTest.cs.
* ParameterInfo.cs: Name must default to null if no ParameterBuilder
is supplied.
* ModuleBuilder.cs (DefineType): Do not perform lookup of in cache if
name is null to allow correct exception to be thrown (in TypeBuilder
ctor).
* TypeBuilder: Moved name argument check to TypeBuilder ctor. Modified
ArgumentException parameter names to match MS. Removed duplicate check
for data length from DefineInitializedData. Modified check_name to
only throw when first character is null char.
* ConstructorBuilder.cs (GetParameters): Throw NotSupportedException
(2.0) or InvalidOperationException (1.0) when type is not yet created
and we're not in compiler context. Return empty array when no
parameters are defined.
(MethodHandle): Always throw NotSupportedException.
(DefineParameter): Prevent NRE when parameters is null.
(GetCustomAttributes): When not in compiler context, always throw
NotSupportedException.
* ConstructorOnTypeBuilderInst.cs: Delegate to ConstructorBuilder
where possible. Fixed ContainsGenericParameters and IsGenericMethod
to always return false. In MethodBase.Invoke, throw an
InvalidOperationException instead of NIE.
* MethodOnTypeBuilderInstTest.cs: Fixed exception message in comments.
* TypeBuilderTest.cs: Do not use ExpectedException to avoid false
positives. Added argument check tests for DefineEvent, DefineField,
DefineMethod, DefinePInvokeMethod and DefinePropety. Use
Type.EmptyTypes instead of constructing empty array.
* ConstructorBuilderTest.cs: Added Test attributes. Added tests
for DefineParameter and Invoke overloads. Added tests for
GetCustomAttributes overloads. Avoid use of ExpectedException.
* ModuleBuilderTest.cs: Added tests for DefineType name argument
checks.
* ConstructorOnTypeBuilderInstTest.cs: Added basic set of tests.

svn path=/trunk/mcs/; revision=102211
2008-04-30 15:06:14 +00:00
Zoltan Varga d50d4ff413 2008-03-06 Zoltan Varga <[email protected]>
* ModuleBuilder.cs (RegisterToken): New icall.

	* MethodBuilder.cs (ctor): Call ModuleBuilder.RegisterToken (), so the token gets
	added to the internal hash table. Fixes #367668.

	* ConstructorBuilder.cs: Ditto.

svn path=/trunk/mcs/; revision=97519
2008-03-06 14:28:55 +00:00
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