# Tuesday, 25 May 2010
New Development Snapshot

More bug fixing and rounding out IKVM.Reflection.

Changes:

  • Fixed resolution of generic type instance names with "fake" type as type argument.
  • Fixed bug in Finalize/finalize special casing for .NET types that caused exception when reflecting on them.
  • Fixed Finalize/finalize special casing for .NET types to also work for java.lang.Throwable derived types.
  • Removed fake core class library types from ikvmstub and added a -bootstrap option to run without dependency on runtime/core class library.
  • Fixed regression introduced when ikvm.runtime.Startup.setProperties() signature was changed. It should also be changed in the executable main stub.
  • Fixed ikvmc/ikvmstub regression introduced with the switch to IKVM.Reflection (not IKVM.Reflection.Emit) in volatile field handling acros assemblies.
  • Fixed several bugs exposed by Google Guice 2.0 test suite (bug #3004682).
  • Fixed AssemblyClassLoader so that it does not claim to be able to load .class resources for dynamically loaded classes.
  • When compiling with the -sharedclassloader option we can't do the "effectively final" optimization, because classes in another assembly can be part of the same package (and hence extend the packge private class).
  • Handle the case where the exception block ends at the end of the method.
  • IKVM.Reflection: Implemented Type.IsAssignableFrom() (minus co-/contravariance).
  • IKVM.Reflection: Implemented custom attribute filtering at the source. Added support for custom attribute sub typing.
  • IKVM.Reflection: Added __GetCustomAttributes() overloads for Assembly and Module for ease of use and consistency.
  • IKVM.Reflection: Added ICustomAttributeProvider interface.

Binaries available here: ikvmbin-0.43.3797.zip

Tuesday, 25 May 2010 06:28:37 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]
# Tuesday, 18 May 2010
New Development Snapshot

More IKVM.Reflection fixes and some improvements to ikvmc and ikvmstub.

Changes:

  • Allow ikvmstub to work with -nostdlib and an explicit path to mscorlib.
  • Fixed ikvmc/ikvmstub assembly resolver to recognize mscorlib by its name, not by having a System.Object type.
  • ikvmc/ikvmstub: Added strong named assembly version "policy" support. Reject lower versions, accept higher versions with optional warning and prefer exact matches.
  • ikvmc/ikvmstub: Added check to avoid loading assemblies that require a newer version of mscorlib than the one were using (to avoid weird exceptions and potential other problems).
  • ikvmc/ikvmstub: Base assembly ref/def matching on Universe.CompareAssemblyIdentity().
  • Changed StaticCompiler.GetType() to be multi-target aware. Instead of looking thru all assemblies currently loaded, only the relevant referenced assemblies are searched. Note that this is a (minor) breaking change. Types referenced in -remap:map.xml file are now only resolved against directly referenced assemblies.
  • Fixed ikvmc regression in custom assembly class loader module constructor support.
  • IKVM.Reflection: It turns out that mscorlib is special cased by the runtime. Any name with a simple name of "mscorlib" is considered mscorlib.
  • IKVM.Reflection: Made mscorlib handling more explicit (and simpler) and fixed Import() to not load assemblies directly, but go through the resolve event.
  • IKVM.Reflection: Added Assembly.CodeBase property and fixes Assembly.GetName() and AssemblyName.GetAssemblyName() to set the CodeBase of the AssemblyName.
  • IKVM.Reflection: Fixed GetReferencedAssemblies() to set AssemblyName.CultureInfo when it's the invariant culture and to set AssemblyName.Flags.
  • IKVM.Reflection: Added AssemblyName.ToString().
  • IKVM.Reflection: Set flags in AssemblyName returned by Assembly.GetName().
  • IKVM.Reflection: Support setting the Retargettable assembly name flag.
  • IKVM.Reflection: Added implementation of Fusion's CompareAssemblyIdentity API.
  • IKVM.Reflection: Added RawModule to allow user code to load and inspect a module without it becoming part of the universe and later import it efficiently into the universe.
  • IKVM.Reflection: Made Universe.HasMscorlib internal and removed the now obsolete Universe.LoadMscorlib().
  • IKVM.Reflection: Added protection against accidentally importing any IKVM.Reflection type, not just Type.

Binaries available here: ikvmbin-0.43.3790.zip

Tuesday, 18 May 2010 16:58:24 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
# Monday, 10 May 2010
New Development Snapshot

More fixes. Thanks to Kornél Pál for his patches, bug reports and work on porting gmcs to IKVM.Reflection.

Changes:

  • Removed mcs specific flag that is no longer required.
  • Removed use of reflection for getting the slot of a java.lang.reflect.Field.
  • Implemented RuntimeMXBean. Feature request #2994310.
  • Implemented OperatingSystemMXBean.
  • Added ikvmc option to disable automagic serialization.
  • Fixed ikvmc to give a proper error message if an output file cannot be created.
  • Added -delaysign option to ikvmc.
  • Added support for AssemblyVersionAttribute and AssemblyCultureAttribute to ikvmc.
  • Added warnings to ikvmc for AssemblyDelaySignAttribute, AssemblyKeyFileAttribute and AssemblyKeyNameAttribute.
  • Added warning to ikvmc when StructLayoutAttribute is ignored.
  • Fixed runtime to register .NET generic type instances with the right class loader (i.e. the special generic class loader that is created, instead of the assembly class loader of the generic type definition).
  • Fixed EnumHelper.GetPrimitiveValue() to handle the case where the underlying type of an enum differs from the constants values attached to the fields.
  • Added a couple of checks to the runtime to avoid problems when user code tries to convert .NET types that aren't supported into a java.lang.Class.
  • IKVM.Reflection: Fixed a whole bunch of bugs exposed by Kornél Pál awesome work on porting gmcs to IKVM.Reflection.
  • IKVM.Reflection: Removed TypeForwardedToAttribute support and added explicit API to do the same. Modified ikvmc to use new API.
  • IKVM.Reflection: Removed DefaultParameterValueAttribute support.
  • IKVM.Reflection: Fixed AssemblyName.GetAssemblyName() to throw the proper exceptions.
  • IKVM.Reflection: Implemented ModuleBuilder.GetArrayMethod(). Based on patch from Kornél Pál.
  • IKVM.Reflection: Removed CheckBaked() from __GetDeclaredXxx methods and moved it to .NET compatible APIs only.
  • IKVM.Reflection: Added support for defining mscorlib assembly.
  • IKVM.Reflection: Added __SetAssemblyVersion(), __SetAssemblyCulture(), __SetAssemblyKeyPair(), __SetAssemblyPublicKey(), __SetAssemblyAlgorithmId() and __SetAssemblyFlags() methods to AssemblyBuilder.
  • IKVM.Reflection: Added support for delay signing.
  • IKVM.Reflection: Added TypeBuilder.__SetAttributes() and MethodBuilder.__SetAttributes() to allow modying the attributes after the builder has been created.

Binaries available here: ikvmbin-0.43.3782.zip

Monday, 10 May 2010 07:26:53 (W. Europe Daylight Time, UTC+02:00)  #    Comments [3]
# Monday, 03 May 2010
IKVM 0.42 Update 1 Released

I've promoted 0.42 Update 1 RC 2 to an official release.

Changes (Update 1 RC 0 + RC 1 + RC 2):

  • Added fix to mangle all artificial type names if they clash with Java type names in the same assembly.
  • Fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41696.
  • Fixed exception sorter to be correct when invoked with two references to the same object.
  • Fix for bug #2946842.
  • Fixed ikvmstub to not emit stubs for generic type definitions.
  • Fixed several incorrect usages of Type.IsArray when we only want to deal with vectors.
  • Fixed timezone handing bug for unrecognized timezone names.
  • Several partial trust fixes.

The 0.42 release notes can be found here.

If you want to build from source, you need openjdk6-b16-stripped.zip from the 0.42.0.3 folder.

Monday, 03 May 2010 07:10:51 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]