Updated: 3/13/2003; 2:20:45 PM.
IKVM.NET Weblog
The development of a Java VM for .NET
        

Monday, November 25, 2002
This weblog has moved to http://weblog.ikvm.net/

The System.TypeLoadException I mentioned here turns out to be caused by a bug in the .NET 1.0 CLR (MS has already fixed it in the current 1.1 beta).

Here is some code that triggers it:

interface __Shape
{
    public abstract __Rectangle getBounds();
    public abstract __Rectangle2D getBounds2D();
}
abstract class __RectangularShape implements __Shape
{
    public __Rectangle getBounds()
    {
return null;
    }
}
abstract class __Rectangle2D extends __RectangularShape
{
    public __Rectangle2D getBounds2D()
    {
        return null;
    }
}
class __Rectangle extends __Rectangle2D implements __Shape
{
    public __Rectangle getBounds()
    {
        return null;
    }
    public __Rectangle2D getBounds2D()
    {
        return null;
    }
}

If this code was compiled with Jikes 1.18 (which doesn't emit Miranda methods) and then run in IK.VM.NET, it failed with a System.TypeLoadException. The fix was easy, just emit an abstract method for each interface method that a type doesn't implement. A compiled DLL of the above code can be found here. When run through peverify 1.0, it will fail verification, in 1.1 this is fixed.

I compiled the Classpath code I got on Friday with Jikes 1.18 and made a new release based on that (including, of course, all the VM fixes I had to do).

Updated the binaries and source snaphots.


10:05:05 AM    Comments

© Copyright 2003 Jeroen Frijters.
 
November 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Oct   Dec