Граф коммитов

2296 Коммитов

Автор SHA1 Сообщение Дата
jfrijters 6bab77a5df - Removed use of Universe.LoadMscorlib().
- Removed unncessary return value from Init().
2010-05-12 15:23:17 +00:00
jfrijters 8541f8b5ab Moved resolver to StaticCompiler, because for ikvmstub we do want the more strict behavior (of warning/error generating) that AssemblyResolver.LoadFile() provides.
Also don't add specified assembly as a reference unless -nostdlib is specified, otherwise we end up with duplicate warnings if the assembly was loaded from elsewhere.
2010-05-12 15:22:06 +00:00
jfrijters 8f073bf6c2 It turns out that name and culture should be compared case insensitive. 2010-05-12 15:17:24 +00:00
jfrijters 6a2f0245c2 Moved resolver back to compiler from StaticCompiler, because messing with StaticCompiler.LoadFile isn't a good idea. 2010-05-12 15:15:25 +00:00
jfrijters 54763e3a6f - Consolidated and improved error handling in LoadFile.
- Added warning when LoadFile returns previously loaded assembly, instead of the one specified.
2010-05-12 08:43:13 +00:00
jfrijters 34874d8355 Added Location property and GetReferencedAssemblies() to RawModule. 2010-05-12 08:41:27 +00:00
jfrijters b7c7d0139c Exit if AssemblyResolver.Init() returns an error and load ikvmstub.exe assembly via AssemblyResolver to get error checking (and mscorlib version checking). 2010-05-12 08:39:57 +00:00
jfrijters 5649a786d8 Added "PublicKey=" support. 2010-05-12 06:55:49 +00:00
jfrijters ea1d8c95c5 Cache assemblyRefs, instead of constructing the refnames and going thru Load every time. 2010-05-12 06:14:19 +00:00
jfrijters 823021faf3 Added RawModule to allow user code to load and inspect a module without it becoming part of the universe and also import it efficiently into the universe. 2010-05-12 05:56:19 +00:00
jfrijters 032ac1f4b5 Removed more (broken) assembly loading policy and instead rely on CompareAssemblyIdentity(). 2010-05-12 05:06:14 +00:00
jfrijters 9b58ae25ca Base assembly ref/def matching on Universe.CompareAssemblyIdentity(). 2010-05-11 15:22:15 +00:00
jfrijters af9f23c34f Added implementation of Fusion's CompareAssemblyIdentity API. 2010-05-11 15:19:27 +00:00
jfrijters dcb2a61ca8 Added check to avoid loading assemblies that require a newer version of mscorlib than the one were using (to avoid weird exceptions and potential other problems). 2010-05-11 09:34:58 +00:00
jfrijters 369efbfb93 Support Retargettable assembly name flag. 2010-05-11 09:05:41 +00:00
jfrijters ca507b6415 Set flags in AssemblyName returned by GetName(). 2010-05-11 09:05:15 +00:00
jfrijters 74c6d65c5a Added ToString(). 2010-05-11 09:03:59 +00:00
jfrijters aacb0b80af It turns out that mscorlib is special cased by the runtime. Any name with a simple name of "mscorlib" is considered mscorlib. 2010-05-11 08:02:29 +00:00
jfrijters 0557143861 Don't ignore return code of AssemblyResolver.Init() 2010-05-11 07:53:37 +00:00
jfrijters e358b6835e Hookup AssemblyResolver's assembly version warning in ikvmc. 2010-05-11 06:12:12 +00:00
jfrijters 495e209de8 Added strong named assembly version "policy" support. Reject lower versions, accept higher versions with optional warning and prefer exact matches. 2010-05-11 06:11:03 +00:00
jfrijters 1ddae8be4e Fixed GetReferencedAssemblies() to set AssemblyName.CultureInfo when it's the invariant culture and to set AssemblyName.Flags. 2010-05-11 06:09:50 +00:00
jfrijters 4a3e8e95cb Added Assembly.CodeBase property and fixes Assembly.GetName() and AssemblyName.GetAssemblyName() to set the CodeBase of the AssemblyName. 2010-05-11 06:07:20 +00:00
jfrijters ac852b5dcc We shouldn't use StaticCompiler, but our own universe reference. 2010-05-11 04:15:29 +00:00
jfrijters a56fb0a1d3 Made mscorlib handling more explicit (and simpler) and fixed Import() to not load assemblies directly, but go through the resolve event. 2010-05-10 08:24:35 +00:00
jfrijters 87e5eff41c ikvmstub assembly must be loaded explicitly, that fact that it worked without doing that was a bug in IKVM.Reflection's Universe.Import(). 2010-05-10 08:22:42 +00:00
jfrijters c4a4ae3c12 Resolver should also resolve assemblies that have already been loaded. 2010-05-10 08:22:03 +00:00
jfrijters eb0b3e3e20 Allow ikvmstub to work with -nostdlib and an explicit path to mscorlib. 2010-05-10 07:18:52 +00:00
jfrijters 69d207170f Recognize mscorlib by its name, not by having a System.Object type. 2010-05-10 07:18:05 +00:00
jfrijters 9b4dee05c7 New snapshot version. 2010-05-10 07:16:32 +00:00
jfrijters c5641ac723 Added a couple of checks to avoid problems when user code tries to convert .NET types that aren't supported into a Class. 2010-05-10 04:47:34 +00:00
jfrijters 183c9e66d8 Fixed EnumHelper.GetPrimitiveValue() to handle the case where the underlying type of an enum difference from the constants values attached to the fields. 2010-05-10 04:46:45 +00:00
jfrijters 3a314584f8 A generic type instance is loaded by the assembly class loader of the generic type definition, but it should not be registered there (as this causes name clashes and that class loader isn't reported as it's loader anyway), it should be registered by the generic class loader that it is associated with. 2010-05-10 04:45:49 +00:00
jfrijters 07406738df Moved AssemblyHashAlgorithm.None -> SHA1 to constructor for .NET compat. 2010-05-07 16:38:13 +00:00
jfrijters 149a55d4dd Introduced Type.GetEnumUnderlyingTypeImpl() to avoid CheckBaked for our own usage. 2010-05-07 16:37:28 +00:00
jfrijters 10a9a48727 Removed attributes that aren't pseudo custom attributes from pseudo custom attribute list. 2010-05-07 16:35:47 +00:00
jfrijters 8e478a9f06 Added null check. 2010-05-07 14:03:40 +00:00
jfrijters 188f4deac7 Previous change to identity generic type instantiations caused GetTypeTokenForMemberRef() to break. 2010-05-07 13:56:17 +00:00
jfrijters f95d73aab5 It turns out that the "identity" generic type instantation should return the type definition. 2010-05-07 13:30:04 +00:00
jfrijters d2cdf13180 Fixed __GetGenericArgumentsOptionalCustomModifiers() and __GetGenericArgumentsRequiredCustomModifiers() as they should return an array with the same number of elements as the number of generic arguments, even if there aren't any modifiers. 2010-05-07 13:29:05 +00:00
jfrijters 9340756ca4 Oops. Lame bug in previous commit caused error when not strong naming. 2010-05-07 12:16:15 +00:00
jfrijters bcd5fe602a Added ikvmc -delaysign option. 2010-05-07 12:05:52 +00:00
jfrijters fad2c41c87 Delay signing fix. 2010-05-07 12:04:48 +00:00
jfrijters ae03b8de03 Added TypeBuilder.__SetAttributes() and MethodBuilder.__SetAttributes() to allow modying the attributes after the builder has been created. 2010-05-07 07:21:29 +00:00
jfrijters f6717df18f Added warning to ikvmc when StructLayoutAttribute is ignored. 2010-05-07 05:53:33 +00:00
jfrijters 96d9ab24db Added support for AssemblyVersionAttribute and AssemblyCultureAttribute to ikvmc.
Added warnings for AssemblyDelaySignAttribute, AssemblyKeyFileAttribute and AssemblyKeyNameAttribute.
Throw NotImplementedException for AssemblyAlgorithmIdAttribute and AssemblyFlagsAttribute (that exception isn't reachable because these two attributes are not exposed as annotations.)
2010-05-07 05:48:22 +00:00
jfrijters d4c5334936 Added __SetAssemblyVersion(), __SetAssemblyCulture(), __SetAssemblyKeyPair(), __SetAssemblyPublicKey(), __SetAssemblyAlgorithmId() and __SetAssemblyFlags() methods to AssemblyBuilder. 2010-05-07 05:45:29 +00:00
jfrijters 41bfeca16a Removed support for pseudo custom attributes TypeForwardedToAttribute and DefaultParameterValueAttribute that aren't supported by .NET reflection either. 2010-05-07 04:44:11 +00:00
jfrijters f18b669110 Don't store AssemblyName, because it is mutable. 2010-05-07 04:29:01 +00:00
jfrijters 710606f893 Don't cache type import failures. 2010-05-06 14:51:55 +00:00