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

156 Коммитов

Автор SHA1 Сообщение Дата
jfrijters fceb82b65e Fixed ExceptionBlock's Compare method to handle identity comparison, as Mono's sort implementation requires this. 2010-09-21 05:42:27 +00:00
jfrijters 7a8c72f1cb Fix build to work when Mono isn't installed. 2010-08-10 15:02:03 +00:00
jfrijters 1f08d17cd3 Fix bug #3040528. 2010-08-09 12:07:55 +00:00
jfrijters 132efc54ff Fixed x64 import directory alignment. 2010-08-09 12:05:43 +00:00
jfrijters 27703d02f7 Fix for bug #3035831. 2010-07-28 12:12:47 +00:00
jfrijters 330313c596 Pass the outer context to ReadSig when the member's declaring type isn't generic, to support the usage of generic parameters in array signatures (when you call one of the runtime synthesized array methods on a generic type array e.g. T[] array; array.Set(0, default(T));) 2010-06-30 07:28:11 +00:00
jfrijters 5bc7379ddf Throw better exceptions if MemberRef can't be resolved. 2010-06-30 07:24:21 +00:00
jfrijters 9abce7789f A TypeRef with a null ResolutionScope is legal and refers to an entry in the export table of the current module. 2010-06-30 07:22:06 +00:00
jfrijters 9439e02ec7 Support fields that have an RVA, but where it is set to zero (C++/CLI does this). 2010-06-30 07:18:35 +00:00
jfrijters d8edcb3f95 It turns out that "multi dimensional" vectors have "multi dimensional" constructors. 2010-06-30 07:17:58 +00:00
jfrijters a03acfcfb9 Several fixes for C++/CLI that tends to stick custom modifiers everywhere. Also, support void& in local variable signature. 2010-06-30 07:16:55 +00:00
jfrijters 0399c35f8c Re-instroduced generic type instantation for "identity" instantations of TypeBuilder types. This is required to be able to distinguish the two types in this example:
class Foo<T>
{
   void Frob() {
     Console.WriteLine(typeof(Foo<>));
     Console.WriteLine(typeof(Foo<T>));
   }
}
2010-06-28 12:14:24 +00:00
jfrijters bac98d4479 Use GetTypeTokenForMemberRef() instead of GetTypeToken(), where appropriate. 2010-06-28 10:18:07 +00:00
jfrijters 6a3cdd3851 Avoid adding duplicate MethodSpec rows. 2010-06-28 09:38:00 +00:00
jfrijters a07e3ae942 Added separate memberref cache to avoid duplicates in the MemberRef table. 2010-06-28 09:37:08 +00:00
jfrijters b1d4ce1016 Renamed StandAloneSigTable and ModuleRefTable Add methods to FindOrAddRecord for clarity and consistency with the other FindOrAddRecord methods. 2010-06-28 09:33:27 +00:00
jfrijters 21e2415c9b Handle marshal blob peculiarities. 2010-06-28 08:25:19 +00:00
jfrijters e2ff75f477 Implemented __GetDeclaredMethods() for ArrayType and MultiArrayType. 2010-06-28 07:41:51 +00:00
jfrijters 6e313c7ae3 Fixed metadata header to account for the actual ImageRuntimeVersion string length, instead of assuming it to be "v2.0.50727". 2010-06-28 06:43:44 +00:00
jfrijters ee0e906e21 Fixed filter block handling to support having both regular handlers and a filter for the same try block. 2010-06-28 06:35:56 +00:00
jfrijters b9d7ebd06e Implemented workaround for incorrect exception table length in methods generated by VB compiler. 2010-06-28 06:33:17 +00:00
jfrijters 4522c47580 Added support for getting the filename of external resources. 2010-06-28 06:32:11 +00:00
jfrijters 68ddbc610b Declarative security attributes can use non-public constructors (if the attributes are defined in the same assembly as where they're used.) 2010-06-28 06:30:41 +00:00
jfrijters be79c54486 Made signature binding lazy for GenericMethodInstance. 2010-06-24 08:49:43 +00:00
jfrijters 8af6dc1228 It turns out that it is legal to use a generic method definition in a method body. This typically only makes sense inside the same method and is kind of strange, but for ldtoken it makes a little bit of sense. 2010-06-24 08:49:14 +00:00
jfrijters f369472784 Fixed ImportTo to use canonical form, which for methods on generic type definitions is the Generic[Method|Field]Instance, instead of the builder. This fixes a duplicate MemberRef row issue when using both the MethodBuilder and the "expanded" form (TypeBuilder.GetMethod(...)). 2010-06-24 08:46:25 +00:00
jfrijters 6f6dc0c78b Moved ImportMethodSpec to GenericMethodInstance and fixed it to make sure that methods on generic type definitions are referred to via MemberRef. 2010-06-24 08:44:33 +00:00
jfrijters b618b42d00 Copy/paste bug in ReadTypeDefOrRefEncoded(). Note that this is a low impact bug, because ironically in most places where TypeDefOrRefEncoded is used a TypeSpec isn't legal, only in custom modifiers (where it isn't specified in the spec) is it allowed to use a TypeDefOrRefEncoded token that refers to a TypeSpec. 2010-06-24 07:28:56 +00:00
jfrijters 57c65c964f DeclaringType should return null for global generic method instances. 2010-06-24 07:22:58 +00:00
jfrijters a9e46bbe59 Don't add assemblies to the name cache when we didn't explicitly resolve them by that name. This allows having an AssemblyBuilder and an Assembly with the same identity and that can be helpful for circular ref scenarios. 2010-06-18 07:00:12 +00:00
jfrijters 236e6bb12e Since referenced assembly identities can change (if they're an AssemblyBuilder), we have to postpone creating an AssemblyRef record until save time.
Note that we also take into account the possibility of having multiple assemblies with the same identity and collapse those into a single record. This is to support circular ref scenarios where you load a previous version of an assembly while generating a newer version (with the same identity). A future patch will enable this.
2010-06-18 06:57:18 +00:00
jfrijters fc0251533f Don't cache referenced assembly on name, because the name can change (for an AssemblyBuilder). 2010-06-18 06:52:08 +00:00
jfrijters 326219b2f5 Type names must be unescaped. 2010-06-18 06:47:36 +00:00
jfrijters 6a205a316d Fix. When the user string heap overflows, throw an exception instead of silently creating corrupt image. 2010-06-09 04:50:02 +00:00
jfrijters dd2f1b550d Fixed .PDB emitter to work with .NET 4.0. Thanks to Jb Evain for the heads up on this. 2010-06-08 11:30:48 +00:00
jfrijters b172d2c9f7 Order try blocks inside handlers before the entries for that handler. Workaround for CLR x86 JIT null pointer dereference bug. 2010-06-07 04:13:49 +00:00
jfrijters e921dbc01d ConstructorInfoImpl.ImportTo() should forward to MethodInfo.ImportTo() because we don't want to cache the non-canonical underlying MethodInfo in the module as this is both unneeded and breaks for ModuleBuilder which also uses the cache to reverse lookup tokens. 2010-05-27 08:23:46 +00:00
jfrijters bc23b974ef Three IsAssignableFrom fixes:
- non-vector arrays are not assignable to vector arrays
- value type arrays are not assignable to non-value type arrays (and v.v.)
- pointers can be boxed to ValueType as well as Object
2010-05-21 03:48:26 +00:00
jfrijters e901c4a753 Added ICustomAttributeProvider interface. 2010-05-20 12:17:16 +00:00
jfrijters a39f990601 Rewrote __GetCustomAttributes(MemberInfo, ...) to be more sensible (and more efficient). 2010-05-20 09:42:24 +00:00
jfrijters a6c129ea68 Change IsInheritableAttribute() to use new (filtered) model. 2010-05-20 09:39:07 +00:00
jfrijters 3a9ec6abef Change __GetCustomAttributes(ParameterInfo) to new model. 2010-05-20 09:37:07 +00:00
jfrijters 7bd6058bd9 Implemented Assembly/Module.IsDefined() in terms of __GetCustomAttributes().Count != 0 to improve efficiency and correctly handle subtyping. 2010-05-20 09:34:34 +00:00
jfrijters c08cca1a9a Added __GetCustomAttributes() overloads for Assembly and Module for ease of use and consistency. 2010-05-20 09:32:04 +00:00
jfrijters 4f4f667aa8 Copy/paste bug. 2010-05-20 09:28:44 +00:00
jfrijters 118db6d049 Implemented custom attribute filtering at the source. Added support for custom attribute sub typing. 2010-05-20 09:25:30 +00:00
jfrijters 651f73a990 Implemented Type.IsAssignableFrom() (minus co-/contravariance). 2010-05-20 09:05:09 +00:00
jfrijters be1f4af4fc Added support for importing generic type parameters. 2010-05-20 08:53:11 +00:00
jfrijters a74577ccfa Protect against accidentally importing any IKVM.Reflection type, not just Type. 2010-05-16 07:47:49 +00:00
jfrijters 5b2430d386 Made Universe.HasMscorlib internal and removed the now obsolete Universe.LoadMscorlib(). 2010-05-12 15:23:54 +00:00