# Wednesday, December 12, 2012
« IKVM.NET 7.2 Released | Main | A Hack To Make CLR's DEVPATH Suck Less »
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]
Home page

I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.

Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)

Comment (HTML not allowed)  

Live Comment Preview