jfrijters
3f109fb9b9
Added MethodBuilder.__ReleaseILGenerator() API to eagerly bake the method body and release the ILGenerator.
2011-02-14 05:50:46 +00:00
jfrijters
579e3361a0
Allocate method name token during Bake() instead of constructor to prepare for allowing missing methods in type builders to be resolved to method builders (possible future enhancement).
2011-01-26 12:08:31 +00:00
jfrijters
d4b02c9bcf
Performance tweaks by Marek.
2011-01-26 05:59:24 +00:00
jfrijters
2eb4346e4d
Fixed TypeBuilder.SetParent(null) handling. Moved base type defaulting to CreateType() to avoid problems when compiing mscorlib.
2011-01-21 12:58:56 +00:00
jfrijters
175af3395c
Move missing type support into universe and optionally allow missing types to be resolved inside all Assemblies.
2011-01-20 14:31:10 +00:00
jfrijters
4eb105478e
The type attributes are mutable, so there is no reason to require them in __Define[Nested]Type().
2011-01-20 05:49:49 +00:00
jfrijters
d7848c305e
More type name fixes. This time to support the fact that the CLR and Mono both treat TypeNamespace and TypeName as separate names and do not consider fullName to be relevant.
2011-01-20 05:38:11 +00:00
jfrijters
ff28c44961
Added support for resolving MissingTypes in AssemblyBuilder.
2011-01-18 16:44:39 +00:00
jfrijters
6abc738d3c
Added support for saving to a stream instead of a file.
2011-01-18 07:11:23 +00:00
jfrijters
6d9125b9c8
Prevent external subclassing. It's not part of the design to suppor that, now it is also enforced.
2011-01-13 05:58:54 +00:00
jfrijters
04806eda67
Refactored Define[Nested]Type methods to allow __DefineType() and __DefineNestedType() APIs to be added that allow namespace and name to be passed in separately.
2011-01-12 14:22:04 +00:00
jfrijters
5e9f22860f
Remove parent from TypeBuilder constructor.
2011-01-12 14:09:54 +00:00
jfrijters
30a627c39a
Final set of Name/Namespace/FullName fixes to make everything more compatible (including bugs) with .NET reflection.
2011-01-12 13:57:05 +00:00
jfrijters
5a100a5305
Re-arrange Name/__Name usage to avoid redundant escaping/unescaping.
...
Improve support for nested types that use a namespace.
2011-01-12 13:45:20 +00:00
jfrijters
b6fa3c6c3d
Added virtual __Name and __Namespace properties to Type to allow the real (from the ECMA CLI point of view) namespace and names of types to be queried (for TypeDef and TypeBuilder only).
2011-01-12 13:31:27 +00:00
jfrijters
4d4e2b91f7
Don't create duplicate ClassLayout table records when using the DefineType overload that specifies the size and also applying a StructLayoutAttribute.
2010-12-20 18:11:09 +00:00
jfrijters
6be0ac8b26
Set stack height to zero at the entry of an exception block (instead of -1), otherwise an empty try block will not get an automatic leave in "clever" mode.
2010-12-20 14:07:55 +00:00
jfrijters
426fc0ea15
Fixed stupid copy/paste bug in AssemblyBuilder.GetTypeImpl(). The modules list was iterated twice instead of looking through both modules and addedModules.
2010-12-09 13:31:58 +00:00
jfrijters
af092c964f
According to Marek, Mono requires the PropertyMap table to be sorted.
2010-12-09 06:12:19 +00:00
jfrijters
a6147467fe
Don't emit unnecessary leave instructions in "clever" mode.
2010-12-08 08:07:07 +00:00
jfrijters
474f06cdc7
The end label of an exception block should always be marked, because you can also backward branch to it.
2010-12-08 07:15:23 +00:00
jfrijters
83f9eaa729
Added Module.__GetReferencedAssemblies() API.
2010-12-08 06:33:03 +00:00
jfrijters
7f82abb787
Added ModuleBuilder.__AddAssemblyReference() API to explicitly add assembly references. This can be used in conjunction with AssemblyBuilder.__AddModule() to add the assemblies referenced by the module to the assembly manifest module. It's not clear to me whether this is required, but Microsoft does it and Assembly.GetReferencedAssemblies() only returns the assemblies referenced from the manifest module.
2010-12-08 06:02:53 +00:00
jfrijters
ee501a23ce
Exception block end label should be marked regardless of exception assistance mode.
2010-12-07 14:30:36 +00:00
jfrijters
3a12bed1ac
At the start of a finally block, the stack height should always be zero (i.e. reachable).
2010-12-07 13:27:50 +00:00
jfrijters
1a1ec4679e
Added support for emitting assemblies with non-existing cultures.
2010-12-06 13:59:52 +00:00
jfrijters
04cfee6dd0
Custom attributes applied to GenericTypeParameterBuilder were attached to the type token, instead of the type parameter token.
2010-12-06 10:31:53 +00:00
jfrijters
743c912af9
HashAlgId in assembly manifest record turns out to be useless (SHA1 is always used).
2010-12-06 05:56:51 +00:00
jfrijters
e7d123ff53
Keep Param table records is correct order.
2010-12-06 05:35:24 +00:00
jfrijters
d0c0fb0ea9
TypeBuilder created by DefineInitializedData should be created.
2010-12-05 04:56:39 +00:00
jfrijters
a3edb5fdd1
- Delay creation of tokens for base type and interfaces until CreateType, to avoid problems when a non yet completely defined type is used as a base type or interface.
...
- Don't clear properties and events fields during CreateType.
2010-12-03 17:01:20 +00:00
jfrijters
2db5fe38be
Add support for assembly custom attributes on modules (they are applied to a placeholder TypeRef record and compiler consuming the module is supposed to merge them into the assembly manifest).
2010-11-29 11:20:47 +00:00
jfrijters
e0a6956435
Added AssemblyBuilder.__AddModule() to allow pre-existing modules to be linked in.
2010-11-29 09:28:48 +00:00
jfrijters
1410ece953
- Added ModuleBuilder.__Save() to support -target:module option better.
...
- Changed ikvmc to use new ModuleBuilder.__Save() instead of workaround of deleting the manifest module after saving the assembly.
2010-11-29 08:16:54 +00:00
jfrijters
dfbe7738cc
Added AssemblyBuilder.__DefineIconResource() API.
2010-11-29 06:59:20 +00:00
jfrijters
febc651508
Use ResourceSection directly to collect unmanaged resources. To prepare for adding win32 icon resource support.
2010-11-29 06:36:17 +00:00
jfrijters
6ce457dffc
- Added IKVM.Reflection.Missing type.
...
- Fixed ParameterInfo.RawDefaultValue to return Missing.Value if the parameter is optional, but doesn't have a default and to return null, if the parameter isn't optional (and doesn't have a default).
2010-11-26 13:44:06 +00:00
jfrijters
4d3a3079a5
Added exception message for backward branch constraints violations.
2010-10-05 04:50:04 +00:00
jfrijters
dc35f2e455
Throw a NotSupportException if a branch offset doesn't fit (i.e. when a short form branch is used inappropriately).
2010-09-30 07:30:53 +00:00
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
bac98d4479
Use GetTypeTokenForMemberRef() instead of GetTypeToken(), where appropriate.
2010-06-28 10:18:07 +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
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
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
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