# Wednesday, February 20, 2013
New Development Snapshot

A quick update because the previous snapshot had a bug that caused ikvmc to be completely broken on the CLR x86 JIT.


  • Changed build to explicitly exclude the classes that are already defined in map.xml.
  • Changed ikvmc to add uncompilable classes loaded from the file system to classes.jar.
  • Changed ikvmc to copy zip file comment.
  • Changed ikvmc to emit a warning if a remapped type duplicates a loaded class.
  • Removed CallerID optimization special casing since we can now call internal members from dynamic assemblies.
  • Added some version information to the Internal Compiler Error message.
  • Added some version information to runtime critical failure.
  • Fixed AttributeHelper to have a deterministic class constructor.
  • Bug fix. Disallow invalid class names in AssemblyClassLoader.loadClass().
  • Removed the special casing of generic type definition loading as we've since exposed the generic type definitions to Java.
  • Some beginnings of class loading refactoring.

Binaries available here: ikvmbin-7.3.4799.zip

Wednesday, February 20, 2013 8:24:44 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Monday, February 18, 2013
New Development Snapshot

Lot's of changes in just a week. The most interesting one being that ikvmc and the runtime now work together to project all the classes that were in the original jars compiled by ikvmc are now visible in the same (virtual) jars at runtime.

To avoid making the generated assemblies much bigger, this is implemented by having ikvmc generate a compressed file called --ikvm-classes--/ in the resources jar that contains the names of the classes compiled from this jar. This typically adds about 0.5% size overhead. At runtime when that jar is read in by java.util.zip.ZipFile it expands the list of class names to create virtual ZipEntries. Only when a virtual class resource is accessed is the class stub generated.


  • Fixed ikvmc to give a proper error message if it fails to write to the output file.
  • If a class can't be statically compiled due to a missing base class/interface, include it as a resource.
  • Modified the assembly class loader to try to load classes from resources.
  • Made dynamic binding to unloadable types the default (for ikvmc).
  • Added -static option to ikvmc to disable dynamic binding.
  • Unified all ikvmc filename validation.
  • Implemented StandardGlyphVector.getGlyphOutline().
  • Bug fix. When looking for a method to override we should handle internal access methods.
  • Fixed some runtime memory model issues (for non-x86 architectures).
  • Bug fix. Custom attribute annotation should skip indexer properties.
  • Bug fix. The available() method of the InputStream returned by ZipFile.getInputStream() was based on ZipEntry passed in, instead of the actual one.
  • Fixed ikvmc to suppress "class not found" warning for a classes that fails to compile for any reason (because we've already given a warning about it).
  • Bug fix. Don't look for main method in excluded classes.
  • Unified the handling of resources and classes in ikvmc.
  • Include all uncompilable .class files (from jars) into the resource jars.
  • Project stub classes into the jar the classes originated from.
  • Fixed ikvmc to prefer the last jar entry if there are duplicate entries. This mirrors the behavior of Java and dynamic mode.
  • Fixed ikvmc to compare extensions case sensitive to find .class files.
  • Fixed ikvmc to use the jar entry name, instead of the class name to load classes.
  • Removed exclude.lst left over from ancient times.
  • Removed META-INF/mailcap.default and META-INF/mimetypes.default resources that are no longer in resources.jar.
  • Changed ikvmc -recurse: option to give a fatal error if it matches no files.

Binaries available here: ikvmbin-7.3.4796.zip

Monday, February 18, 2013 9:05:07 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Monday, February 11, 2013
New Development Snapshot

The recent architectural change makes it possible for the static compiler to use dynamic binding when it encounters a missing type. This in turn makes the dynamic binding support more important, so I've been fixing a lot of bugs in this area.

Currently, ikvmc will still emit code that statically throws a NoClassDefFoundError when accessing missing types, but in the future the default will change to generate dynamic binding code in this case.


  • Fixed a bug with Graphics.setComposite(x). This fixes most paint artefacts of Nimbus L&F.
  • Fixed a NPE in constructor of BufferedImage.
  • Fixed TexturePaint bugs.
  • Enable ldc to work for unloadable types in dynamic mode.
  • Changed dynamic bytecode helper methods to be CallerID based instead of trusting the caller to provide the right context type handle.
  • Use sun.launcher.LauncherHelper to make the launcher more consistent with Java.
  • Implemented package access checks in dynamic mode.
  • Fixed reflection handling of unloadable types.
  • Added CodeGenOptions.DisableDynamicBinding to disable dynamic binding, instead of conditional compilation.
  • Bug fix. Dynamic method invocations should unwrap InvocationTargetException.
  • Bug fix. Dynamic instantiation should throw InstantiationError when trying to instantiate an abstract class.
  • Bug fix. Dynamic invokespecial (that isn't a new) should fail verification.
  • Bug fix. Dynamic method lookup should also look in base classes (for non-constructor methods).
  • Bug fix. When dynamically calling a non-constructor instance method, the receiver object should be of the correct type.
  • Added support for setPaint with custom Paint implementation.
  • Added support for dynamic (non-loadable type) annotations in statically compiled code.
  • Have ikvmc record inner classes even if they can't be loaded.
  • Have ikvmc record the outer class even if it is not loadable.
  • Bug fix. If the runtime tries to load a class from an assembly with a custom assembly class loader, the custom assembly class loader should be called. Previously it would only be called if the Java class loader had been instantiated.
  • Bug fix. We should emit miranda methods for non-abstract classes too.
  • Bug fix. Mark "missing" interface methods so that subclasses (that are compiled separately) know that the base class is incomplete.
  • Allow dynamic assemblies injected into assembly class loaders to be (debug dump) saved.
  • Changed the build system to automatically scan all sources files for copyright statements and validate that all GPL licensed files include the Classpath exception.
  • Removed resource compiler dependency from JVM.DLL build.
  • Bug fix. Custom assembly class loader was made visible to other threads while it was still being constructed.
  • Stop considering ACC_SUPER when linking invokespecial (unless compatibility switch is set). This change matches the security change in Java 7u13.
  • Improved ldc MethodType: Use nested type with class constructor to create values with statically know signatures (like ldc MethodHandle).
  • Improved ldc MethodType: Use caching for dynamicallly constructed MethodType values but retry on failure.
  • Fixed dynamic dispatch class loading exception handling to wrap non-java.lang.Error exceptions in NoClassDefFoundError.
  • Added support for dynamic ldc MethodHandle.
  • Added support for dynamically linking the boostrap method of an invokedynamic.
  • IKVM.Reflection: Expose the Name and __ModuleHash for missing external Modules.
  • IKVM.Reflection: Regression fix. The AssemblyNames returned by Module.__GetReferencedAssemblies() didn't have the ContentType set for windowruntime assembly references.
  • IKVM.Reflection: Added new public API Module.__ResolveTypeSpecCustomModifiers() to resolve the (useless) custom modifiers that can be put on TypeSpecs.
  • IKVM.Reflection: Added another overload of the public API Module.__GetSectionInfo() that returns more information about the section.
  • IKVM.Reflection: Bug fix. The OriginalFilename in the version info resource should only include the filename, not the path.

Binaries available here: ikvmbin-7.3.4790.zip

Monday, February 11, 2013 1:02:04 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Friday, January 25, 2013
Fixing a Long Standing Limitation

I finally fixed the limitation that classes dynamically loaded by an assembly class loader can't access the internals of the assembly.

Here's a simple demonstration of the problem. Suppose you have these two classes:

class Other {
  static {

class Test {
  public static void main(String[] args) throws Exception {
  static void m() {

Now if you compile Test.class (without Other) into an assembly with a ClassPathAssemblyClassLoader and run this with IKVM.NET 7.2 you'll see something like this:

C:\j>ikvmc Test.class -classloader:ikvm.runtime.ClassPathAssemblyClassLoader
IKVM.NET Compiler version 7.2.4630.6
Copyright (C) 2002-2013 Jeroen Frijters

note IKVMC0001: Found main method in class "Test"
note IKVMC0002: Output file is "Test.exe"

Exception in thread "main" java.lang.ExceptionInInitializerError
        at cli.System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(Unknown Source)
        at IKVM.Internal.TypeWrapper.RunClassInit(Unknown Source)
        at IKVM.NativeCode.java.lang.Class.forName0(Unknown Source)
        at java.lang.Class.forName(Class.java:287)
        at Test.main(Test.java:9)
Caused by: cli.System.MethodAccessException: Test.m()
        at Other.<clinit>(Test.java)

The call from Other to Test fails with a MethodAccessException, because the dynamic assembly does not have access to the internal members of the Test.exe assembly.

Long ago I considered fixing this by adding an InternalsVisibleToAttribute to all statically compiled assemblies that allows the runtime generated dynamic assembly access to its internals, but I dismissed this because it would mean that untrusted code could abuse this same assembly identity to access the internals of any ikvmc compiled assemblies.

Forging a StrongNameKeyPair

Yesterday I realized that I could use InternalsVisibleToAttribute without opening a security hole. When the IKVM runtime is running as fully trusted code, it can forge a StrongNameKeyPair to attach to the dynamic assemblies it generates and thereby gain access to the statically compiled assemblies, without giving untrusted code the same access.

The only downside to this approach is that it relies on an implementation detail of the CLR (and Mono). I try to stay away from depending on implementation details, but in this case the gain far outways any risk.

Using It From C#

It also works for your C# assemblies. By adding a custom attribute, you can now enable dynamically loaded Java classes access to your assembly internals.

Here's a C# example:

using System;
using System.Runtime.CompilerServices;
using java.lang;
using java.lang.reflect;

[assembly: InternalsVisibleTo("DemoApp-ikvm-runtime-injected, PublicKey=00240000048000009400000006020000002400005253413100040000010001009D674F3D63B8D7A4C428BD7388341B025C71AA61C6224CD53A12C21330A3159D300051FE2EED154FE30D70673A079E4529D0FD78113DCA771DA8B0C1EF2F77B73651D55645B0A4294F0AF9BF7078432E13D0F46F951D712C2FCF02EB15552C0FE7817FC0AED58E0984F86661BF64D882F29B619899DD264041E7D4992548EB9E")]

interface IFoo {
  Program Instance { get; }

class Program : InvocationHandler {
  static void Main() {
    Class c = typeof(Program);
    var cl = c.getClassLoader();
    var interfaces = new Class[] { typeof(IFoo) };
    var handler = new Program();
    var proxy = (IFoo)Proxy.newProxyInstance(cl, interfaces, handler);
  public object invoke(object obj, Method m, object[] objarr) {
    return this;

Here we create a Proxy for the non-public interface IFoo. This is allowed because of the InternalsVisibleToAttribute that gives access to an assembly named DemoApp-ikvm-runtime-injected with the specified public key. The name of the assembly must be the name of the current assembly (in this example "DemoApp") with "-ikvm-runtime-injected" appended. The public key is always the same. The corresponding private key does not exist.

Development Snapshot

Please note that this is a development snapshot, not a release or release candidate. So consider it untested.


  • Use InternalsVisibleToAttribute to allow the runtime to dynamically inject classes into statically compiled assemblies.
  • Stop generating proxy helpers for non-public interfaces.
  • Added support for RadialGradientPaint in Graphics.setPaint().

Binaries available here: ikvmbin-7.3.4772.zip

Friday, January 25, 2013 7:51:20 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Wednesday, January 16, 2013
New Development Snapshot

The recent Windows RT jailbreak enabled me to run IKVM on my Surface RT. Out of curiousity I decided to run a part of the test suite. Only three tests failed, one because it relies on specific GC behavior and two because they use JVM.DLL. Previously, IKVM's JVM.DLL assemblies were created with ilasm, because that was the easiest way to create unmanaged exports at the time. However, ilasm doesn't seem to support ARM, so I added this support to IKVM.Reflection and wrote a simple tool to generate unmanaged export assemblies. Of course, supporting unmanaged exports on Windows RT in IKVM.Reflection is not very useful, but it was an interesting exercise to learn a little bit about the ARM instruction set.

I also did some more useful work. I finally got around to changing how ikvmc handles assembly references. It now works like the C# compiler and uses the IKVM.Reflection support for missing assemblies that I added for mcs. This means that it no longer automatically loads assemblies (apart from the IKVM runtime and class library assemblies) and you need to add explicit references for indirectly used assemblies as well. The downside is that this has the potential to break some builds, but the upside is that the compilation process is now more predictable and only loads the actually required assemblies, like a "real" compiler, instead of the System.Reflection heritage that required loading even unused dependencies.

Another change is that ikvmstub jars are now officially deprecated from being used with ikvmc (it will still work for a while, but a warning message is issued).

Finally, it is now illegal to explicitly reference a secondary assembly in a shared class loader group. Previously this caused a warning message, but now this is an error. You need to reference the primary assembly.


  • Deduplicate ikvmc messages based on all parameter values, not just the first one.
  • Allow ikvmc messages to be suppressed based on any number of parameter values.
  • Fixed ikvmc to write fully specific -nowarn options to suppress file.
  • Fixed ikvmc to handle missing types.
  • Added ikvmc support for missing assemblies.
  • Officially deprecated using stubs with ikvmc.
  • Bug fix. Don't add duplicate methods to attribute annotation interfaces. The primary cause of this was attributes with virtual properties where we would add the base class property as well as the derived class overridden property.
  • Changed build process to replace ilasm usage to generate JVM.DLL with a custom tool.
  • Bug fix. Local variable analysis for finally blocks was incorrect. Fixes bug #3600788.
  • Changed ikvmc to give an error message (instead of a warning) when referencing a secondary assembly from a shared class loader group).
  • Made ikvmc EditorBrowsableAttribute construction fully symbolic, to avoid having to load System.dll.
  • Disabled automatic assembly loading for ikvmc.
  • Suppress ikvmc warnings after an error has occurred (to avoid obscuring the fact that compilation failed).
  • IKVM.Reflection: Added UniverseOptions.ResolveMissingMembers and deprecated EnableMissingMemberResolution().
  • IKVM.Reflection: Added Universe.ResolvedMissingMember event.
  • IKVM.Reflection: Fixed importing of CLR types with funny names (where we'd previously run into bugs in CLR's Type.Name and Type.Namespace).
  • IKVM.Reflection: Restructured relocation writing to pack all relocation in a page in the same block, as WoA apparently requires this.
  • IKVM.Reflection: Implemented ARM startup stub.
  • IKVM.Reflection: Implemented ARM unmanaged exports.

Binaries available here: ikvmbin-7.3.4764.zip

Wednesday, January 16, 2013 12:24:57 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
# Tuesday, January 15, 2013
IKVM.NET 7.2 Update 1 Release Candidate 0

An updated release with a couple of bug fixes.

Changes (relative to 7.2):

  • Bug fix. Don't deadlock AppDomain.ProcessExit event handler when the event gets called from another thread than the one initiating exit.
  • Bug fix. Static compiler should not use proxy stubs to implement non-public interfaces in another assembly.
  • Bug fix. Don't add duplicate methods to attribute annotation interfaces.
  • Bug fix. Local variable analysis for finally blocks was incorrect. Fixes bug #3600788.

Binaries available here: ikvmbin-7.2.4630.6.zip

Sources: ikvmsrc-7.2.4630.6.zip, openjdk-7u6-b24-stripped.zip 

Tuesday, January 15, 2013 11:47:09 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Sunday, January 6, 2013
New Development Snapshot

I've been busy with other stuff, but I did manage to fix a couple of bugs and add a new feature. So a new development snapshot.


  • .NET resources in non-Java assemblies are now exposed as Java resources.
  • Added IKVM.Attributes.JavaResourceAttribute to publish .NET resource to Java under a different name.
  • Bug fix. Don't deadlock AppDomain.ProcessExit event handler when the event gets called from another thread than the one initiating exit.
  • Minor optimization. Only register the AppDomain.ProcessExit event handler when necessary.
  • Bug fix. Private methods declared in map.xml should not be made virtual.
  • Support "attributes" attribute on method tag in map.xml for methods declared in remapped types.
  • Recognize methods in remapped types with the "__<" name prefix as HideFromJava.
  • Bug fix. Static compiler should not use proxy stubs to implement non-public interfaces in another assembly.
  • IKVM.Reflection: Implemented __ContainsMissingType for function pointer types.
  • IKVM.Reflection: Changed __ContainsMissingType to take custom modifiers into account.
  • IKVM.Reflection: Added caching for __ContainsMissingType property to simplify the prevention of infinite recursion while evaluating generic parameter constraints.

Binaries available here: ikvmbin-7.3.4754.zip

Sunday, January 6, 2013 9:51:23 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Friday, December 28, 2012
Raspberry Pi

I got a Raspberry Pi for my birthday.

pi@raspberrypi ~ $ sudo apt-get install ikvm
pi@raspberrypi ~ $ ikvmc -out:javac.exe -r:/usr/lib/ikvm/IKVM.OpenJDK.Tools.dll -main:com.sun.tools.javac.Main
pi@raspberrypi ~ $ vi Hello.java
pi@raspberrypi ~ $ mono javac.exe Hello.java
pi@raspberrypi ~ $ ikvm Hello
Hello World


Friday, December 28, 2012 9:19:04 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
# Sunday, December 16, 2012
A Hack To Make CLR's DEVPATH Suck Less

The CLR's DEVPATH feature has always been broken and its brokeness varied over the years, but for my purposes it was a very useful feature. However with .NET .4.5 Microsoft decided to up the ante. If you have configured your .NET 4.5 runtime as a "developer installation", ngen will fail to generate native images for framework assemblies. This means that after Windows Update services mscorlib.dll, no native images will be used anymore.

Obviously you can work around this by editing the machine.config and re-running ngen, but that is a bit of a pain so decided to hack together a workaround.

The basic idea is to have a DLL that gets injected into (nearly) every process and patches mscoree.dll to make CreateConfigStream read developer-machine.config instead of machine.config if the DEVPATH environment variable is set.

The source and binaries are available here. Like the Microsoft DEVPATH code, this is untested so there is no warranty and use at your own risk. Bug reports are welcome of course.

There is no installer and there are no installation instructions, because frankly, if you don't know how to install it you probably shouldn't be doing so anyway..

The overhead is fairly low. If you don't have DEVPATH set the DLL will immediately unload again. The file size is only 3KB and in memory it will only use a single 4KB page.

Sunday, December 16, 2012 11:47:50 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [3]
# Wednesday, December 12, 2012
New Development Snapshot

Time for another development snapshot.


  • Do the "no serialization" check before calling Serialization.AddAutomagicSerialization() to avoid triggering the class initializer (which will try to load SerializableAttribute, which is not available everywhere).
  • Removed more ConstructorBuilder usage to fix regression (constructor custom attributes specified map.xml were not applied).
  • Construct the System assembly name from the mscorlib name to support other runtimes.
  • Removed dummy constructor from __Helper class.
  • Removed remaining ConstructorBuilder usages.
  • Removed unnecessary MethodBuilder casts.
  • Removed permanent app.config files and changed build process to only generate them when doing a .NET 2.0 build.
  • Bug fix. Transient field modifier should also be retained on literal fields.
  • Bug fix. Field.getModifiers() should only return the relevant modifiers.
  • Removed some O(n^2) operations to improve handling of class files with a large number of fields.
  • Bug fix. Set AddressOfRawData in IMAGE_DEBUG_DIRECTORY.
  • Bug fix. Class.forName("") should not throw System.ArgumentException.
  • Bug fix. Off-by-one error in local ref index reusing. Fix for bug #3575555.
  • Bug fix. Don't try to inject DynamicMethod in array types (applies to array.clone() method for MethodHandles).
  • Bug fix. Abstract generic methods are not supported. Fix for #3579785.
  • Bug fix. Interface mappings can be "incomplete". Fix for bug #3581564.
  • Added (optional) support for building without System.Core.dll dependency.
  • Bug fix. The local variable state at the end of an exception block (if the last instruction is a local variable store) needs to be merged into the exception handler state.
  • Changed FileNotFoundException message in the case of an access denied to match the JDK message. JRuby depends on this.
  • Renamed Adler32 "checksum" field to "adler", because JRuby depends on this.
  • Bug fix. The static compiler cannot use a different way to encode erased array types than the runtime compiler (because otherwise the runtime can't override statically compiled methods).
  • Fixed native library build to explicitly pass /MACHINE option to linker to avoid warning.
  • Implemented StandardGlyphVector.performDefaultLayout() and setGlyphPosition(int, Point2D).
  • Added missing SecuritySafeCritical attribute.
  • Changed build infrastructure to support targetting .NET 4.0 on systems where 4.5 is installed.
  • IKVM.Reflection: Bug fix. Ignore unknown metadata streams instead of throwing a BadImageFormatException. The CLR ignores these streams as well and some obfuscators add them.
  • IKVM.Reflection: Added TypeInfo (from .NET 4.5).
  • IKVM.Reflection: Implemented caching for TypeDefImpl.IsGenericTypeDefinition property.
  • IKVM.Reflection: Added new .NET 4.5 TypeBuilder.DefineNestedType() overload.
  • IKVM.Reflection: Added new .NET 4.5 API TypeBuilder.CreateTypeInfo().
  • IKVM.Reflection: Added new .NET 4.0 overload of TypeBuilder.DefineProperty().
  • IKVM.Reflection: Added new .NET 4.5 property AssemblyName.CultureName.
  • IKVM.Reflection: When an assembly name has a duplicate key, throw FileLoadException like .NET 4.x does instead of COMException like .NET 2.0 does.
  • IKVM.Reflection: Added new .NET 4.5 property MethodBase.MethodImplementationFlags.
  • IKVM.Reflection: Added new .NET 4.5 properties CustomAttributeNamedArgument.IsField and CustomAttributeNamedArgument.MemberName.
  • IKVM.Reflection: Added new .NET 4.5 properties EventInfo.AddMethod, EventInfo.RaiseMethod and EventInfo.RemoveMethod.
  • IKVM.Reflection: Added new .NET 4.5 property ParameterInfo.HasDefaultValue.
  • IKVM.Reflection: Added new .NET 4.5 properties PropertyInfo.GetMethod and PropertyInfo.SetMethod.
  • IKVM.Reflection: Added Universe.DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, IEnumerable) that corresponds to new .NET 4.5 API AssemblyBuilder.DefineDynamicAssembly(...).
  • IKVM.Reflection: Added new .NET 4.5 method EnumBuilder.CreateTypeInfo().
  • IKVM.Reflection: Added new .NET 4.0 method GetCustomAttributesData() to Assembly, MemberInfo, Module and ParameterInfo.
  • IKVM.Reflection: Added new .NET 4.5 property CustomAttributes to Assembly, MemberInfo, Module and ParameterInfo.
  • IKVM.Reflection: Added new .NET 4.5 property Type.GenericTypeArguments.
  • IKVM.Reflection: Added new .NET 4.0 methods Type.GetEnumNames(), Type.GetEnumName() and Type.IsEnumDefined().
  • IKVM.Reflection: Added new .NET 4.5 properties Assembly.ExportedTypes and Assembly.DefinedTypes.
  • IKVM.Reflection: Added new .NET 4.5 property Assembly.Modules.
  • IKVM.Reflection: Moved local var signature token creation to a more logical location.
  • IKVM.Reflection: Added new .NET 4.5 methods ConstructorBuilder.SetMethodBody() and MethodBuilder.SetMethodBody(). Note that the implementation is currently completely untested.
  • IKVM.Reflection: Added (old) method MethodBuilder.CreateMethodBody() that is now trivial to implement.
  • IKVM.Reflection: Added new .NET 4.0 property Assembly.IsDynamic.
  • IKVM.Reflection: Added (old) API Module.GetSignerCertificate().
  • IKVM.Reflection: Bug fix. While reading the Cecil source I realized that array bounds are signed.
  • IKVM.Reflection: Stop relying on System.Reflection.AssemblyName to compute public key token from public key.
  • IKVM.Reflection: Small optimization to table record allocation. Thanks to Marek for the pointer.
  • IKVM.Reflection: Implemented LocalVariableInfo.ToString().
  • IKVM.Reflection: Bug fix. ModuleReader.ResolveMember() should support types. Thanks to Jb Evain for finding this.
  • IKVM.Reflection: Bug fix. LocalBuilder should extend LocalVariableInfo.
  • IKVM.Reflection: Made AssemblyBuilder.__AssemblyFlags a read/write property and marked __SetAssemblyFlags() obsolete.
  • IKVM.Reflection: Bug fix. Changed AssemblyName.ProcessorArchitecture to match (weird) .NET behavior. When reading the property it returns the architecture of the PE file, not the field from the AssemblyDef record.
  • IKVM.Reflection: Throw InvalidOperationException when MethodBuilder.DefineGenericParameters() is called a second time.
  • IKVM.Reflection: Added UniverseOptions.DontProvideAutomaticDefaultConstructor to disable the "helpful" creation of a default constructor.
  • IKVM.Reflection: Fixed ExportedType resolver to support types defined in another module in this assembly.
  • IKVM.Reflection: Added the Assembly.ModuleResolve event.
  • IKVM.Reflection: If missing member resolution is enabled, automatically create missing modules as needed.
  • IKVM.Reflection: Simplified LazyForwardType resolution to reuse ResolveExportedType() and thus always set the metadata token for forwarded missing types.
  • IKVM.Reflection: Added Type.__IsTypeForwarder property to let mcs distinguish between "normal" missing types and forwarded missing types.
  • IKVM.Reflection: When calling MethodBuilder.DefineParameter() multiple times for the same parameter, we would (sometimes) not store the ParameterBuilder and this would cause the resulting PE file to be corrupt. Now we store the duplicate Param records like SRE does.
  • IKVM.Reflection: Added UniverseOptions.MetadataOnly.
  • IKVM.Reflection: Made user string heap loading lazy.
  • IKVM.Reflection: Bug fix. If SizeOfOptionalHeader is greater than the number of bytes we read from the optional header, we should skip the additional bytes. If it is less, the image is invalid. Thanks to Jb Evain.

Binaries available here: ikvmbin-7.3.4728.zip

Wednesday, December 12, 2012 10:25:12 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]