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

192 Коммитов

Автор SHA1 Сообщение Дата
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 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 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
jfrijters d3c4308bd8 Support for defining mscorlib assembly. 2010-05-06 14:50:22 +00:00
jfrijters dc56fe0f12 Removed unused parameter. 2010-05-06 14:38:42 +00:00
jfrijters 7eb3a6e788 Allow blob decoding for unbaked attribute types. 2010-05-06 14:18:35 +00:00
jfrijters bb41551896 Constructed types (Generic types, arrays and pointers) should forward CheckBaked to element type. 2010-05-06 13:50:36 +00:00
jfrijters 222b6d7040 Removed CheckBaked() from __GetDeclaredXxx methods and moved it to .NET compatible APIs only. There is really no good reason not to allow unbaked builders to be interrogated. 2010-05-06 13:40:43 +00:00
jfrijters 48d3595082 Fixed Type.GetEnumUnderlyingType(). Only for EnumBuilder should it work on unbaked types. 2010-05-06 13:24:29 +00:00
jfrijters 542d3eca35 Ignore version info custom attributes that were specified using blob. This is same behavior as .NET. 2010-05-06 12:40:07 +00:00
jfrijters 5a8ac674bd Implemented ModuleBuilder.GetArrayMethod(). Based on patch from Kornel Pal. 2010-05-06 12:35:41 +00:00
jfrijters f72c9f6cf8 Fixed AssemblyName.GetAssemblyName() to throw the proper exceptions (and by consequence Universe.LoadFile() now also throws the proper exceptions, module a race condition). 2010-05-06 06:45:30 +00:00
jfrijters 8b9c9843c6 Delete .pdb file before initializing PDB writer to make sure we get a sensible exception, instead of the random COM error that the PDB writer produces. 2010-05-06 06:09:03 +00:00
jfrijters 463498ab09 Added AssemblyBuilder.__AddTypeForwarder() to allow type forwarders to be added explictly, because the pseudo custom attribute will be removed (because .NET doesn't support that pseudo custom attribute). 2010-05-06 06:03:34 +00:00
jfrijters 7ba2398596 Made forwarded type resolution lazy. 2010-05-06 05:59:17 +00:00
jfrijters c8922e0994 Fixed Assembly.GetTypes() bug that caused it to return types in manifest module twice for multi-module assemblies. Thanks to Kornel Pal for this fix.. 2010-05-06 05:48:40 +00:00
jfrijters 321d8e5cbb SetCustomAttribute(ConstructorInfo, byte[]) overload should forward to SetCustomAttribute(CustomAttributeBuilder) overload instead of directly calling ModuleBuilder.SetCustomAttribute(), otherwise we miss the pseudo custom attribute support. 2010-05-06 05:38:52 +00:00
jfrijters 816fd75719 Marked a few fields readonly. 2010-05-06 05:23:47 +00:00
jfrijters 50b99df3bf Removed mcs specific flag that is no longer required. 2010-04-28 09:39:53 +00:00
jfrijters b366e8e9b3 Made signature resolution lazy. 2010-04-21 10:13:56 +00:00
jfrijters 5cf23ddfc5 Pass context assembly to Load() as the requestingAssembly, to make type name resolution in custom attributes pass the correct RequestingAssembly to the AssemblyResolve event. 2010-04-21 06:13:23 +00:00
jfrijters 2ce9ef352e Made MethodDefImpl's ParameterInfoImpl a little more light weight by getting the type and custom modifiers from the method's signature instead of caching it. 2010-04-20 13:39:53 +00:00
jfrijters 0d7db78121 Use Util.Copy() instead of Clone() to copy a Type arrays. 2010-04-20 13:18:31 +00:00
jfrijters e6d7e01941 Made custom modifier packing more efficient and shared between MethodSignature and MethodBuilder. 2010-04-20 13:06:09 +00:00
jfrijters 71b3df3913 required/optional modifier arguments were in incorrect order. 2010-04-20 12:52:05 +00:00
jfrijters ba8394267b Don't eagerly get or cache method name. 2010-04-20 09:48:27 +00:00
jfrijters 16ad8561dc Made method signature reading lazy. This makes building assemblies with circular dependencies easier (and probably increases perf). 2010-04-20 06:17:21 +00:00
jfrijters dc0086237d Fixed default assembly resolver to throw/not throw the right exceptions. 2010-04-20 05:25:05 +00:00
jfrijters 50e6420147 Dynamic assemblies should also be visible in the universe. 2010-04-20 05:21:58 +00:00
jfrijters 1f7e86dc1a AssemblyBuilder.GetName() should return a name with a public key when were doing delay signing. 2010-04-20 05:16:59 +00:00
jfrijters 3f5845db15 Added support for delay signing (i.e. setting the public key without having the private key). 2010-04-19 13:55:18 +00:00
jfrijters c5ccc4f4fd A Version object that only has Major.Minor set will return -1 for Build and Revision. Handle that case by setting these parts to zero, instead of casting to 65535. 2010-04-19 13:52:59 +00:00
jfrijters 24d6872c77 Made __GetDataFromRVA more generic by taking an offset and a length (to be able to reuse the byte array) and this also removes the need for the field type to have a StructLayout. 2010-04-19 05:26:28 +00:00
jfrijters 9762f5302c Having PinvokeImpl set doesn't necessarily imply having an ImplMap record (for mixed mode assemblies). 2010-04-19 05:25:02 +00:00
jfrijters a1f07f74e6 Null check was in the wrong place. 2010-04-19 05:23:09 +00:00
jfrijters 68974001b1 Added support for custom modifiers in generic type instantions (in signatures). 2010-04-18 09:25:47 +00:00
jfrijters 1b42a3946a Workaround for broken compiler(s) that add terminating NUL to type names in custom attribute data. 2010-04-18 09:23:52 +00:00
jfrijters 9ef69e669c Fixed type name parsing bug (thanks to Jb Evain for reporting this). Generic type parameter type names can be without assembly name and then need to be resolved in context. 2010-04-18 09:21:54 +00:00
jfrijters 90efa2a447 Implemented ModuleRef ResolutionScope for TypeRef. 2010-04-18 09:05:26 +00:00
jfrijters 2ec4aae085 Don't try to return a MethodBody if it isn't in IL. 2010-04-18 09:02:54 +00:00
jfrijters 5de77bb9f7 Don't loop infinitely when the RVA lies outside of the file. 2010-04-18 08:59:18 +00:00
jfrijters 0f2ade7ce0 Version parts should be treated as unsigned. 2010-04-18 08:58:19 +00:00
jfrijters 1a771a9ccd Don't crash when a DllImportAttribute doesn't have an ImportScope (which can happen for C++ code). 2010-04-18 08:55:55 +00:00
jfrijters af8e10cfad Fixed stack height updating for jmp instruction. 2010-04-18 08:54:11 +00:00
jfrijters 6a1ca8dae9 Introduced Empty<T> to cache zero length arrays. 2010-04-18 08:39:20 +00:00
jfrijters 13ec0c138e - Assembly version number parts should be treated as unsigned shorts.
- Added support for encoding/decoding custom attributes on generic parameters (this encoding is missing from the June 2006 ECMA CLI spec).
2010-04-02 03:52:22 +00:00
jfrijters 3841cc0e3f Fixed Type.FullName. Nested types can also have a namespace (not in the C# sense, but in the CLR sense). 2010-04-02 03:50:49 +00:00
jfrijters d4c8f62b7c Made property and event public/static flag handling compatible with .NET 2010-02-26 09:26:20 +00:00
jfrijters 05d9e5facb Removed unused method. 2010-02-26 09:23:21 +00:00
jfrijters e3275b3917 Added workaround for the fact that Mono doesn't set the HasThis flag on property signatures. 2010-02-25 10:46:29 +00:00
jfrijters 0d65f18b33 Check Sorted flags only for the tables we really require to be sorted (currently only GenericParam). 2010-02-25 10:37:56 +00:00
jfrijters 1b40af728d Throw exception if the member cannot be resolved. 2010-02-25 10:36:45 +00:00
jfrijters d1ec841c86 Fixed regression introduced with == operator in MemberInfo. 2010-02-09 14:34:05 +00:00
jfrijters 48f48cfa71 Added == and != operators and implemented Equals/GetHashCode. 2010-02-09 07:58:14 +00:00
jfrijters 860e0a148e Added == and != operators to MemberInfo to mask the fact that we don't implement reference identity for various members (most notably the constructor wrappers, generic wrappers and events and properties).
Changed Type.Equals() to avoid infinite recursion, now that we overload the == operator.
2010-02-09 07:57:49 +00:00
jfrijters 855cc893ee Generic property and event wrappers should also override Equals/GetHashCode. 2010-02-09 07:54:54 +00:00
jfrijters 5b23e76b83 Since we don't cache PropertyInfoImpls and EventInfoImpls, they should at least override Equals/GetHashCode to do by value equality. 2010-02-09 07:53:28 +00:00
jfrijters 5b29dc53dc Implemented GenericTypeParameterBuilder.GenericParameterAttributes. 2010-02-09 07:50:07 +00:00
jfrijters 9c79131ad4 Implemented GenericTypeParameterBuilder.BaseType. 2010-02-09 07:45:28 +00:00
jfrijters 3c281cb431 Renamed GenericTypeParameterBuilder.token to typeToken, to more clearly distinguish it from paramToken. 2010-02-09 07:30:47 +00:00
jfrijters 66678bca19 Moved common metadata table record adding code to GenericTypeParameterBuilder constructor and did some other GenericTypeParameterBuilder clean up. 2010-02-09 07:29:25 +00:00
jfrijters df193e6f4d Removed some no longer needed remnants from when we had multiple generic ParameterInfo wrapper implementations. 2010-02-09 07:22:40 +00:00
jfrijters 42f8158fe1 Implemented __GetDeclaredInterfaces() on TypeBuilder (and hence baked types). 2010-02-09 05:54:08 +00:00
jfrijters 26b049d654 TypeBuilder.Namespace shouldn't return null. 2010-02-09 05:50:05 +00:00
jfrijters 8dc763b6ec Bug fix. 2010-02-09 05:43:43 +00:00
jfrijters 5bdad92ef3 If a generic type contains generic parameters (that haven't been bound), FullName and AssemblyQualifiedName should return null. 2010-02-09 05:42:05 +00:00
jfrijters 20a15e3ac1 DllImportAttribute implies MethodAttributes.PinvokeImpl. 2010-02-09 05:27:51 +00:00
jfrijters 56843c6602 Bug fix in BindTypeParameters(). It forgot to copy subsequent args entries that weren't affected by the bind. 2010-02-09 05:20:01 +00:00
jfrijters 3043c4ac13 Override GetGenericTypeDefinition(), because it is legal to call that on a TypeDef. 2010-02-09 05:18:41 +00:00
jfrijters d4253e6a70 Fix NPE. Don't try to iterator over otherMethods if it is null. 2010-02-09 05:17:58 +00:00
jfrijters a43454be81 Support for mcs specific AssemblyBuilderAccess flag (0x800 aka COMPILER_ACCESS) to allow access to members of unbaked TypeBuilders. 2010-02-04 11:18:07 +00:00
jfrijters 9ef3188439 Generic methods and methods on generic type instance fixes. 2010-02-04 10:49:24 +00:00
jfrijters d75b3d792e Implemented __GetDeclaredFields(), __GetDeclaredEvents() and __GetDeclaredProperties() on TypeBuilder. 2010-02-04 09:59:42 +00:00
jfrijters d6ba34ecb6 Removed accidentally checked in test code. 2010-02-04 09:58:46 +00:00
jfrijters 3ea0443e5c Use Util.Copy() instead of cloning the array, because we want to return a Type[] not a GenericTypeParameterBuilder[]. 2010-02-04 09:49:04 +00:00
jfrijters 71ab42d7eb MethodBuilder should implement GetGenericMethodArgument() and GetGenericMethodArgumentCount(), to allow type parameter binding to work (even though it is a no-op). 2010-02-04 09:46:18 +00:00
jfrijters c8e3b59abb Avoid Clone(), because we want to return a Type[], not an array of some subtype of Type. 2010-02-04 09:40:05 +00:00
jfrijters 7568ab4c6a FindMembers() may be called with a null filter. 2010-02-04 09:38:52 +00:00
jfrijters d1e163408f Removed IKVM_REF_EMIT, as STATIC_COMPILER or STUB_GENERATOR now always implies IKVM.Reflection. 2010-01-28 09:18:33 +00:00
jfrijters 0050b15595 Several IKVM.Reflection fixes related to generics.
- MethodImpls in generic type definitions should be resolved with typeArgs as context.
- Cleaned up member on generic type rebinding.
- Fixed __GetDeclaredProperties and __GetDeclaredEvents to rebind properly.
2010-01-27 06:12:36 +00:00
jfrijters 0b30be9d2c Removed UTF-8 byte order marks. 2010-01-25 05:49:01 +00:00
jfrijters 198c9d70ea New IKVM.Reflection implementation. 2010-01-25 05:29:31 +00:00