Commit Graph
157 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
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 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
Marek Safar f293d90615 Fix few warnings 2012-06-26 13:26:56 +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 929b66f583 Get rid of IsCompilerContext, mcs no longer uses SRE. 2011-11-06 19:36:36 +01:00
Rolf Bjarne Kvinge f64261401d Fix many corcompare issues for moonlight 2011-03-31 16:05:03 +02:00
Sebastien Pouliot be471b69d9 Add missing API that are to be decorated with [SecurityCritical] for compatibility
* System.Reflection.Emit/AssemblyBuilder.cs: Add missing GetName(bool)
* System.Threading/ThreadPool.cs: Add missing UnsafeQueueNativeOverlapped

This is not a big issue since the missing API are unusable from
application code (and obviously not needed inside the platform code).
However it makes validating the tuned assemblies easier :)
2011-03-23 08:52:19 -04:00
Marek Safar b6513d2047 Fixes build 2011-02-10 09:22:04 +00:00
Miguel de Icaza d352810dff Do not throw if we get a RunAndCollect 2011-02-09 18:33:05 -05:00
Geoff Norton 16d4fd790b Further .NET 4.0 ification of the mobile profile 2011-01-25 20:10:54 -05:00
Zoltan Varga 9899a5f249 Change some usages of ArrayList to List<T> to avoid calls to the slow ArrayList.ToArray(Type) method. 2011-01-06 13:11:56 +01:00
Marek Safar 71c948128d Re-enable EmbedResourceFile overload used by al.exe 2010-12-13 12:10:54 +00:00
Marek Safar ea6c9f5408 Comment out no longer used code 2010-11-22 11:36:46 +00:00
Marek Safar a5641afb29 Add comment details to DefineUnmanagedResource 2010-11-22 11:00:58 +00:00
Rodrigo Kumpera 065699bb8c Report the broken type name instead of assembly's. 2010-09-20 14:53:39 -03:00
Rodrigo Kumpera a86cccf899 Use List<Exception> instead of ArrayList to make things prettier. 2010-09-20 14:44:20 -03:00
Rodrigo Kumpera e340fb6e79 Fix AssemblyBuilder::GetTypes () with unfinished types.
* AssemblyBuilder.cs (GetTypes): Raise ReflectionTypeLoadException
	if any type was not finished.

	* AssemblyBuilderTest.cs: Add test for GetTypes () and incomplete
	TypeBuilders'.

	Fixes #640288
2010-09-20 14:32:24 -03: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
Rodrigo Kumpera 4f09dcaf9f 2010-04-08 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs (GenericInstanceKey): Precalculate
	GenericInstanceKey hash code since this can cause infinite
	recursion when inflating "Foo<T> : Bar<Foo<T>>" parent.

	* TypeBuilder.cs (IsSubclassOf): Don't delegate to base class
	since the unmanaged information can be out of sync.

	* TypeBuilder.cs (UnderlyingSystemType): Invert the test order
	since IsEnum now is potentialy more expensive.

	Fixes #594728.

svn path=/trunk/mcs/; revision=155053
2010-04-08 14:53:25 +00:00
Rodrigo Kumpera fd3b1afb67 2010-03-26 Rodrigo Kumpera <[email protected]>
* Assembly.cs: Add IsDynamic.

2010-03-26 Rodrigo Kumpera  <[email protected]>

        * AssemblyBuilder.cs: Add IsDynamic.

svn path=/trunk/mcs/; revision=154329
2010-03-26 22:35:19 +00:00
Rodrigo Kumpera c370b33899 2010-03-26 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs: Implement v4 GetSatelliteAssembly,
	ManifestModule, GlobalAssemblyCache.

svn path=/trunk/mcs/; revision=154312
2010-03-26 19:15:39 +00:00
Rodrigo Kumpera 280fce3bf7 2010-03-26 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs: Implement v4 GetReferencedAssemblies
	and GetLoadedModules.

2010-03-26 Rodrigo Kumpera  <[email protected]>

	* AssemblyBuilderTest.cs: Test GetReferencedAssemblies
	and GetLoadedModules.

svn path=/trunk/mcs/; revision=154311
2010-03-26 19:15:31 +00:00
Rodrigo Kumpera bb85d0c720 2010-03-25 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs: Implement v4 GetModule(s).

2010-03-25 Rodrigo Kumpera  <[email protected]>

	* AssemblyBuilderTest.cs: Add test for v4 GetModule(s).

svn path=/trunk/mcs/; revision=154232
2010-03-25 23:42:14 +00:00
Rodrigo Kumpera 6493d5e8ba 2010-03-25 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs: Implement v4 GetType.

2010-03-25 Rodrigo Kumpera  <[email protected]>

	* AssemblyBuilderTest.cs: Add test for v4 GetType and
	fix other test to not be broken.

svn path=/trunk/mcs/; revision=154231
2010-03-25 23:42:05 +00:00
Jb Evain 05a5b21fa0 use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153656
2010-03-16 12:10:19 +00:00
Jb Evain 7926de8d42 2010-03-12 Jb Evain <[email protected]>
* AssemblyBuilder.cs (AddTypeForwarder): throw if the
	type is a nested type.


svn path=/trunk/mcs/; revision=153501
2010-03-12 11:46:55 +00:00
Rodrigo Kumpera 47e43931b0 2009-12-12 Rodrigo Kumpera <[email protected]>
* MonoType.cs: Make the GetConstructorImpl machinery available
	to be used by others.

	* Type.cs (MakeGenericType): Is any of the arguments is not a system
	type create an instance of MonoGenericClass instead.

2009-12-12 Rodrigo Kumpera  <[email protected]>

	* MonoGenericClass.cs: Change it to support a non-sre generic type
	definition.

2009-12-10 Rodrigo Kumpera  <[email protected]>

	* AssemblyBuilder.cs (MakeGenericType): Accept a Type as argument.

	* ConstructorOnTypeBuilderInst.cs: Change it to support an underlying
	non-sre constructor.

	* MethodOnTypeBuilderInst.cs: Change it to support an underlying
	non-sre method.

	* FieldOnTypeBuilderInst.cs: Change it to support an underlying
	non-sre field.

	* EventOnTypeBuilderInst.cs: Change it to support an underlying
	non-sre event.

svn path=/trunk/mcs/; revision=148338
2009-12-13 01:18:27 +00:00
Rodrigo Kumpera 4f75aea804 2009-12-10 Rodrigo Kumpera <[email protected]>
* AssemblyBuilder.cs: Add MakeGenericType method while takes care of doing
	generic instance canonicalization under compiler context.

	* DerivedTypes.cs: Add ArrayType::GetEffectiveRank to make it possible to
	distinguish between [] and [*].

	* TypeBuilder.cs: Implement MakeGenericType in managed code.

2009-12-10 Rodrigo Kumpera  <[email protected]>

	* MonoGenericClass.cs: Add new register_with_runtime icall to make
	sure that a managed code instantiated MGC will be returned when
	the generic instantiation happens in unmanaged code.

	This is a temporary workaround while Type::MakeGenericType doesn't
	handle user types properly.

svn path=/trunk/mcs/; revision=148083
2009-12-11 02:32:59 +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 dfad48f344 In System.Reflection.Emit:
2009-10-24  Sebastien Pouliot  <[email protected]>

	* AssemblyBuilder.cs: For Silverlight only AssemblyBuilderAccess.Run
	is supported (browser-side) but we still allow other values when
	compiling (e.g. smcs) outside the browser (wo coreclr)
	* TypeBuilder.cs (GetConstructor): Fix validations

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

	* TypeBuilderTest.cs: Validation test cases for GetConstructor


svn path=/trunk/mcs/; revision=144791
2009-10-24 15:45:09 +00:00
Marek Safar 0f31173c59 2009-10-02 Marek Safar <[email protected]>
* Array.cs, Decimal.cs, String.cs, Console.cs, _AppDomain.cs,
	AppDomain.cs: Removed prehistoric mcs workarounds.


svn path=/trunk/mcs/; revision=143250
2009-10-02 07:56:45 +00:00
Sebastien Pouliot ae520cdbfc 2009-09-18 Sebastien Pouliot <[email protected]>
* AssemblyBuilder.cs, ConstructorBuilder.cs, MethodBuilder.cs, 
	TypeBuilder.cs: Don't process PermissionSet under NET_2_1


svn path=/trunk/mcs/; revision=142222
2009-09-18 19:14:29 +00:00
Zoltan Varga 7e9947b0c9 2009-07-14 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: Applied patch from <[email protected]>. Save
	the public key token to a field where the runtime can access it.

svn path=/trunk/mcs/; revision=137844
2009-07-14 10:39:44 +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 2dc6ad8ed3 2009-06-12 Jb Evain <[email protected]>
* AssemblyBuilder.cs (Save): throw a NotImplementedException
	when asked to emit a pe32+ binary for a AMD64 or IA64
	specific assembly.


svn path=/trunk/mcs/; revision=135989
2009-06-12 12:39:17 +00:00
Zoltan Varga 32ae6cc661 2009-05-22 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs (.ctor): Error out if the not yet supported
	RunAndCollect flag was given.

	* AssemblyBuilderAccess.cs: Add RunAndCollect flag for net 4.0.

svn path=/trunk/mcs/; revision=134601
2009-05-22 15:48:22 +00:00
Gert Driesen 24b2e4b4e9 * test-695.cs:
* test-695-2-lib.cs:
* test-695-3.lib.cs: Added test for bug #432423.
* AssemblyBuilder.cs: When assembly is strongnamed, then explicitly
set PublicKey flag. Do not allow AssemblyFlagsAttribute to overwrite
flags value, and ignore PublicKey flag if assembly is not strongnamed.
Fixes bug #432423.

svn path=/trunk/mcs/; revision=119742
2008-11-23 13:24:39 +00:00
Jb Evain 8b25b7693f 2008-09-16 Jb Evain <[email protected]>
* AssemblyBuilder.cs (AddTypeForwarder): correctly grow the
	type_forwarders array, to make that work for more than one
	type forwarder. Managed part of the fix for #422929.


svn path=/trunk/mcs/; revision=113102
2008-09-15 22:50:49 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Miguel de Icaza 27359f0da2 indent
svn path=/trunk/mcs/; revision=109538
2008-08-04 06:09:17 +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
Gert Driesen f96ea1be6b * Win32Resources.cs: On 2.0 profile, initialize fixed info to empty
string when emitting versioninfo in compiler context. Default to
neutral language in compiler context. On 1.0 profile, use 0xffff as
default value for version parts. In Version, abort on first invalid
version part and also set FileVersion string. In ProductVersion and
FileVersion, parse version string and abort on first invalid version 
part.               
* AssemblyBuilder.cs: Added enum that determines the type of the
native (version) resource. Added fields for holding the native
resource type and the version culture. The versioninfo_culture was
introduced to hold the original culture of the assembly, since
the AssemblyCultureAttribute should only affect the language of the
versioninfo block when not used in compiler context. Move constructin 
of native version info to DefineVersionInfoResourceImpl to allow 
attributes to affect the versioninfo after DefineVersionInfoResource 
has been invoked. Allow ArgumentException for invalid culture string 
to bubble up. In compiler context, use FileVersion as default value
for ProductionVersion.
* AssemblyBuilderTest.cs: Enabled DefineUnmanagedResource and
DefineVersionInfoResource tests for ArgumentException when native
resource is already defined. Added tests for not supported culture
in AssemblyCultureAttribute when definining versioninfo resource.

svn path=/trunk/mcs/; revision=99280
2008-03-29 12:35:53 +00:00
Zoltan Varga a0c0df47c3 Fix the previous change.
svn path=/trunk/mcs/; revision=97534
2008-03-06 16:10:17 +00:00
Zoltan Varga cf69e4437f 2008-03-06 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: Define GetManifestModule () for net 2.0 bootstrap too.

svn path=/trunk/mcs/; revision=97533
2008-03-06 16:02:52 +00:00
Zoltan Varga 538b19b760 2008-01-29 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs (GetTypes): Implement this entirely in managed code.

svn path=/trunk/mcs/; revision=94302
2008-01-29 19:37:53 +00:00
Zoltan Varga 31efbb6316 2008-01-29 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: Override GetModulesInternal () so we can return
	ModuleBuilders.

svn path=/trunk/mcs/; revision=94285
2008-01-29 18:44:28 +00:00
Gert Driesen 39737ac369 * AssemblyBuilder.cs: Introduce magic value for AssemblyBuilferAccess
to signal usage from a compiler. On 2.0 profile, perform argument
check for access. Use AssemblyFlags passed in through AssemblyName
arguments. Modified SetCustomAttribute to only use the Assembly*
attribute for constructing the assembly name when used in compiler
context. Fixes corlib part of bug #354970.
* AppDomainTest.cs: Added DefineDynamicAssembly tests for invalid
AssemblyBuilderAccess argument. Enabled test for DefineDynamicAssembly
overload taking IEnumerable<CustomAttributeBuilder>. Fixed typo in
comments.
* AssemblyBuilderTest.cs: Enabled test for bug #354970.

svn path=/trunk/mcs/; revision=93490
2008-01-22 09:26:29 +00:00