# Friday, 20 February 2009
New Development Snapshot

Yet more changes to support -sharedclassloader and while I was at FOSDEM I tried running SPECjvm2008 so I did the fixes necessary to get that to run. Note that if you want to run SPECjvm2008, you'll have to generate rt.jar (ikvmstub -shared ikvm.openjdk.core && ren IKVM.OpenJDK.Core.jar rt.jar) and create an ikvm.exe.config file to set the boot class path to rt.jar:

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="ikvm:sun.boot.class.path" value="\ikvm\lib\rt.jar" />
  </appSettings>
</configuration>

Changes:

  • Implemented JPEGImageWriter.getDefaultWriteParam().
  • Added dummy implementations for java.awt.Graphics.setComposite/getComposite/getFontRenderContext.
  • Added supported for redirecting Runtime.exec("java ...") to ikvm.exe.
  • Small performance improvement to stack walking in ObjectInputStream.
  • Removed several JIT performance workarounds that are no longer needed as of .NET 2.0 SP2 (aka .NET 3.5 SP1) .
  • Added hack to ikvmstub (-shared option) to generate stubs for core class library.
  • Imported JMath (John F. Brophy's pure Java port of fdlibm) and use it for most Math functions instead of .NET Math API.
  • Made 32 bit floating point math more compatible by rounding to 32 bit after every operation. On x86 this takes a significant performance hit, but without it the differences were too large for the SPECjvm2008 sunflow benchmark to pass.
  • Set foreground/background colors for java.awt.Graphics created from Image correctly.
  • Added support for setting the JPEG compression level and for custom quantization (but not huffman) tables.
  • Moved Y correction to java.awt.Graphics2D float overload of drawString, so that it too positions the text (approx.) correctly.
  • Don't overwrite the thread context class loader if it has already been set when sun.misc.Launcher initializes. Thanks to Dawid Weiss for finding this.

As always with a development snapshot, don't use this in production, but please do try it out and let me know about it. The sources are available in cvs and the binaries here: ikvmbin-0.39.3338.zip
 

Friday, 20 February 2009 06:04:20 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Tuesday, 10 February 2009
New Development Snapshot

More changes to support -sharedassemblyclassloader, a couple of fixes and Volker's JDBC-ODBC bridge implementation.

Changes:

  • Moved JDBC code into IKVM.OpenJDK.Jdbc.dll.
  • Added JDBC-ODBC-Bridge (based on System.Data.Odbc) to IKVM.OpenJDK.Jdbc.dll.
  • Fixed IKVM.Reflection.Emit's AssemblyBuilder.AssemblyName to always include Version, Culture and PublicKeyToken.
  • Fixed NullReferenceException in IKVM.Reflection.Emit's SignatureHelper.WriteType.
  • Implemented TypeWrapper.GetEnclosingMethod for ReflectionOnly assemblies (this allows ikvmstub to work on ikvmc generated assemblies loaded by specifying a path).
  • Fixed pointer type check for method return types.
  • When ikvmc loads a referenced assembly that is the main assembly of a sharedclassloader group, also pre-load the other assemblies in the group.
  • More fixes to deal with the fact that the AssemblyClassLoader <-> Assembly mapping is no longer a one to one relation.
  • Changed AssemblyClassLoader to cache assembly load failures (because the CLR binder also caches failures).
  • Disable String.toCharArray() intrinsic in dynamic mode, because it relies on defining global variables which aren't available in dynamic mode.

As always with a development snapshot, don't use this in production, but please do try it out and let me know about it. The sources are available in cvs and the binaries here: ikvmbin-0.39.3328.zip

Tuesday, 10 February 2009 08:55:25 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Thursday, 05 February 2009
IKVM 0.38 Update 1 RC 1

A fairly serious (because of its potentially elusive nature) bug was found in 0.38 and I forgot to update the version number of IKVM.OpenJDK.ClassLibrary.dll in the previous release candidate, so here is a new release candidate.

Changes:

  • Changed version to 0.38.0.4.
  • Fixed bug in PassiveWeakDictionary that caused ghost arrays to lose their type after a while. Thanks to Dawid Weiss for reporting this issue.

Binaries available here: ikvmbin-0.38.0.4.zip
Sources (+ binaries): Sources: ikvm-0.38.0.4.zip, classpath-0.95-stripped.zip, openjdk6-b12-stripped.zip
 

Thursday, 05 February 2009 15:51:03 (W. Europe Standard Time, UTC+01:00)  #    Comments [2]
# Monday, 02 February 2009
IKVM 0.38 Update 1 RC 0

Since there isn't yet a schedule for when 0.40 will be available, I decided to release an update of 0.38 that includes recent bug fixes.

Changes:

  • Changed version to 0.38.0.3.
  • Fixed the stack trace when an unwrapped java.lang.Error (or subclass) escapes from a static initializer.
  • It turns out that we really should create an MBeanServer in sun.management.ManagementFactory.createPlatformMBeanServer(), even if we don't populate it with anything useful, applications might still want to register their own MBeans. This fix allows Derby 10.4.2.0 to work.
  • Added helpful message to ClassCastException generated for ghost array casts.
  • Added check for constructor with missing body in map.xml.
  • Removed over eager state checking from java.util.zip.Deflater. Fixes Lucene issue.
  • Fixed enclosing method discovery to work for ReflectionOnly assemblies. This allows ikvmstub to work with ikvmc generated assemblies.
  • Always emit an explicit method override if we've mangled the name/sig, because we can't predict whether it will be needed or not (without keeping track of the mangling in the base classes) and the cost is minimal since this doesn't happen all that often.
  • Miranda method should use mangled name (if the name is mangled).
  • Fixed pointer detection to work for types with multiple indirection levels.
  • If the last call site of a subroutine wasn't reachable, the return switch would fall through potentially causing the code to be unverifiable.
  • The check for unloadable types on the stack indexed the stack in the wrong order.
  • Fixed exception wrapping for java.security.AccessController.doPrivileged().
  • Fixed tracer to only add a trace listener in executables.

Binaries available here: ikvmbin-0.38.0.3.zip
Sources (+ binaries): Sources: ikvm-0.38.0.3.zip, classpath-0.95-stripped.zip, openjdk6-b12-stripped.zip
 

Monday, 02 February 2009 07:01:55 (W. Europe Standard Time, UTC+01:00)  #    Comments [4]