# Thursday, January 31, 2008
How to Disassemble an AtomicReferenceFieldUpdater

It's been a while since I've done an in depth investigation of a microbenchmark and the recent work I did on AtomicReferenceFieldUpdater to make it work in partial trust also has a nice performance impact. So let's investigate that.

The Microbenchmark

import java.util.concurrent.atomic.*;

class Test {
  volatile Object field;

  public static void main(String[] args) {
    AtomicReferenceFieldUpdater upd =
      AtomicReferenceFieldUpdater.newUpdater(Test.class, Object.class, "field");
    Test obj = new Test();
    for (int j = 0; j < 5; j++) {
      long start = System.currentTimeMillis();
      for (int i = 0; i < 10000000; i++)
        upd.compareAndSet(obj, null, null);
      long end = System.currentTimeMillis();
      System.out.println(end - start);

The Results

       IKVM 0.34      IKVM 0.36      IKVM 0.37      JDK 1.6
.NET 1.1 36808 41453    
.NET 2.0 / x86       75647 5776 561 321
.NET 2.0 / x64   5081 512 245

The Differences

The first thing that jumps out is that the IKVM 0.34 results show that .NET 2.0 reflection is much slower than .NET 1.1 reflection. On IKVM 0.36 the reflection implementation changed to take advantage of DynamicMethod when running on .NET 2.0, so there we see a big improvement in performance when running on .NET 2.0.

IKVM 0.37 has the new AtomicReferenceFieldUpdate optimization that no longer uses reflection (if it can figure out at compile time what to do), this again yields a big performance improvement.

Finally, HotSpot manages to beat IKVM be a factor of two. There is no difference between HotSpot client and server modes for this benchmark (on JDK 1.6).

The Compiler

Let's look at some C# pseudo code that shows what ikvmc 0.37 generates for the above benchmark:

using java.util.concurrent.atomic;
using System.Threading;

class Test {
  volatile object field;

  private sealed class __ARFU_fieldLjava/lang/Object; : AtomicReferenceFieldUpdater {
    public override bool compareAndSet(object obj, object expect, object update) {
      return expect == Interlocked.CompareExchange(ref ((Test)obj).field,
                                                   (object)update, (object)expect);
    // ...other methods omitted...

  static void main(string[] args) {
    AtomicReferenceFieldUpdater udp = new __ARFU_fieldLjava/lang/Object;();
    // ...rest of method omitted...

The bytecode compiler only does this optimization if the arguments to newUpdater are constants and match up with a volatile instance reference field in the current class.

The reason this optimization only first showed up in IKVM 0.37 is that it requires the generic version of Interlocked.CompareExchange. In this particular example the non-generic version would have worked, but in the real world nearly all uses of AtomicReferenceFieldUpdater are on fields that have a more specific type than Object.

The Assembly

So why is HotSpot twice as fast? I modified the test slightly to make the generated assembly code easier to read by making it an infinite loop. Here's the x64 code for the loop:

00000000028C2690   mov          r11,qword ptr [r8+10h]
00000000028C2694   mov          r10,1026DD08h
00000000028C269E   cmp          r11,r10
00000000028C26A1   jne          00000000028C2773
00000000028C26A7   mov          r10,qword ptr [r8+20h]
00000000028C26AB   test         r10,r10
00000000028C26AE   jne          00000000028C273B
00000000028C26B4   mov          r10,qword ptr [r8+28h]
00000000028C26B8   mov          r11,r9
00000000028C26BB   add          r11,r10
00000000028C26BE   xor          eax,eax
00000000028C26C0   xor          r10d,r10d
00000000028C26C3   lock cmpxchg qword ptr [r11],r10
00000000028C26C8   sete         r12b
00000000028C26CC   movzx        r12d,r12b
00000000028C26D0   mov          r10,r11
00000000028C26D3   shr          r10,9
00000000028C26D7   mov          r11,589FF80h
00000000028C26E1   mov          byte ptr [r11+r10],0
00000000028C26E6   test         dword ptr [160000h],eax
00000000028C26EC   jmp          00000000028C2690

HotSpot did it's thing and was able to inline the virtual compareAndSet method. I'm pretty sure that HotSpot doesn't have special support for AtomicReferenceFieldUpdater, but this is simply the normal HotSpot devirtualization optimization at work. The lock cmpxchg instruction is the result of HotSpot having intrinsic support for sun.misc.Unsafe.compareAndSwapObject.

Let's go over the assembly instructions in detail:

00000000028C2690   mov          r11,qword ptr [r8+10h]
00000000028C2694   mov          r10,1026DD08h
00000000028C269E   cmp          r11,r10
00000000028C26A1   jne          00000000028C2773

This looks like a HotSpot virtual method inline guard. It's checking to make sure that the object is of the expected type (if it isn't, the inlined virtual method may not be correct anymore).

00000000028C26A7   mov          r10,qword ptr [r8+20h]
00000000028C26AB   test         r10,r10
00000000028C26AE   jne          00000000028C273B

I'm not sure. Some field in the AtomicReferenceFieldUpdater object is tested for null.

00000000028C26B4   mov          r10,qword ptr [r8+28h]

The offset to the field is loaded from the AtomicReferenceFieldUpdater object.

00000000028C26B8   mov          r11,r9

The passed in object reference is moved from r9 to r11.

00000000028C26BB   add          r11,r10

Add the field offset to the object reference. We now have the address of the memory location we want to update in r11.

00000000028C26BE   xor          eax,eax

Clear rax to represent the passed in null value of the expect argument. I'm not sure why the disassembler shows the register as eax, but this instruction clears the full 64 bit rax register.

00000000028C26C0   xor          r10d,r10d

r10 is cleared and represents the passed in null value of the update argument.

00000000028C26C3   lock cmpxchg qword ptr [r11],r10

The actual interlocked compare and exchange instruction. The qword at memory location r11 is compared with rax and if it matches r10 is written to it. Since I'm on a dual core machine, the lock prefix is applied. Locking the bus is expensive, so HotSpot omits it when running on a single core machine.

00000000028C26C8   sete         r12b
00000000028C26CC   movzx        r12d,r12b

The cmpxchg instruction sets the zero flag if it was successful. These two instruction copy the zero flag into the r12 register (it is set to 0 or 255 to represent either false or true). Since the result isn't actually used in this case, this could have been optimized away.

00000000028C26D0   mov          r10,r11
00000000028C26D3   shr          r10,9
00000000028C26D7   mov          r11,589FF80h
00000000028C26E1   mov          byte ptr [r11+r10],0

This is a little interesting. It takes the address of the field that was just (potentially) updated and shifts it to the right by 9 bits and uses that value to index a static table and clear the corresponding byte. This is a GC write barrier. The GC consults the table (known as a card table) to know what objects in older generations it needs to scan when doing a GC of a younger generation.

00000000028C26E6   test         dword ptr [160000h],eax

This seemingly useless test is part of a mechanism used by the VM to suspend the thread at this instruction (a safepoint). When the VM wants to suspend all threads (for a GC) it unmaps the safepoint polling memory page (in this case at 0x160000) and waits for all threads to suspend. Each thread running compiled Java code will eventually run this instruction and cause a page fault, inside the page fault handler it is detected that a safepoint thread suspend is requested and the thread calls the VM to suspend itself.

00000000028C26EC   jmp          00000000028C2690

Branch to the top and start over again.

The Conclusion

The .NET Framework JIT doesn't inline virtual methods and Interlocked.CompareExchange is not a JIT instrisic, so there the story is pretty straightforward. Each loop iteration calls Interlocked.CompareExchange which in turn calls the GC write barrier function. This is why HotSpot is able to beat IKVM 0.37 by a factor of two.

Of course, when you're coding in C# you can write the microbenchmark to call Interlocked.CompareExchange directly:

using System;
using System.Threading;

class Test {
  volatile object field;

  static void Main(string[] args) {
    Test obj = new Test();
    for (int j = 0; j < 5; j++) {
      int start = Environment.TickCount;
      for (int i = 0; i < 10000000; i++)
        Interlocked.CompareExchange(ref obj.field, null, null);
      int end = Environment.TickCount;
      Console.WriteLine(end - start);

This runs in 265 milliseconds which goes to show that in this case all the fancy footwork that HotSpot does can almost be matched simply by having by ref argument passing in your language. Of course, the CLR JIT isn't perfect. When you change the field type to string the running time increases to 436 milliseconds because the invocation of a generic method goes through a stub that makes sure that the method instantiation exists. Here it would probably pay to to teach the JIT about the generic methods in System.Threading.Interlocked.

Thursday, January 31, 2008 10:50:35 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [3]
# Friday, January 25, 2008
IKVM 0.36 Update 1 Release Candidate 2

One more bug fix.


  • Changed version to
  • Fix bug in DynamicMethod based serialization for fields typed as ghost interfaces.

Binaries available here: ikvmbin-
Sources (+ binaries):ikvm-

The external sources are the same as the previous rc.

Friday, January 25, 2008 7:38:42 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Wednesday, January 23, 2008
How To Get an Explicit Interface Implementation Method

Suppose you have a Type that you know implements IEnumerable, how do you get the GetEnumerator method?

Both the developer(s) at Microsoft and the Mono developer(s) that wrote System.Xml.Serialization managed to find the same wrong answer to this question. Here's the code from Mono, but Microsoft does somethig very similar:

MethodInfo met = type.GetMethod ("GetEnumerator", Type.EmptyTypes);
if (met == null) {
  // get private implemenation
  met = type.GetMethod ("System.Collections.IEnumerable.GetEnumerator",
                        BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance,
                        null, Type.EmptyTypes, null);

The reason this is wrong is that the name of the private method is an implementation detail of the compiler that was used to compile the code. C# happens to name the private method this way, but other languages may not.

For example, try the following VB webservice:

<%@ WebService Language="VB" Class="Service1" %>

Imports System.Collections
Imports System.Web.Services

Public Class Service1
  Inherits WebService

  <WebMethod()> Public Function HelloWorld() As Frob
    Return New Frob()
  End Function
End Class

Public Class Frob
  Implements IEnumerable

  ' Note that this method is private
  Private Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
    Return "frob".GetEnumerator()
  End Function

  Public Sub Add(ByVal obj As Object)
    Throw New NotSupportedException()
  End Sub
End Class

If you run this webservice on .NET, you'll an exception inside System.Xml.Serialization.TypeScope.GetTypeDesc(), because it expects to find a public GetEnumerator method or a private System.Collections.IEnumerable.GetEnumerator method. However, VB allows you to pick the method name (in this case simply GetEnumerator). If you make the GetEnumerator method public, the webservice will work.

The Right Way

Here's the right way to get the method:

MethodInfo getEnumerator = typeof(IEnumerable).GetMethod("GetEnumerator", Type.EmptyTypes);
InterfaceMapping map = type.GetInterfaceMap(typeof(IEnumerable));
int index = Array.IndexOf(map.InterfaceMethods, getEnumerator);
MethodInfo meth = map.TargetMethods[index];

Meta Question

Of course, the real question remains unanswered. Why do we need the MethodInfo in the first place? Wouldn't Xml serialization be better off by simply using the IEnumerable interface?

Wednesday, January 23, 2008 7:37:35 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [8]
# Monday, January 14, 2008
IKVM 0.36 Update 1 Release Candidate 1

As I've said when I released 0.36, this is a version that will be maintained for a while because it is the last version to support .NET 1.1. This means that I will strive to release updates relatively soon after bugs are reported (in the supported areas). This is the first of such update releases.


  • Changed version to
  • Fix for reflection bug on .NET generic nested types that caused this.
  • Fix for bug #1865922.
  • java.awt.image.Raster fix.

Binaries available here: ikvmbin-
Sources (+ binaries):ikvm-

The external sources are the same as the ones with the first 0.36 release + java.awt.image.Raster patch referenced above.

Monday, January 14, 2008 6:27:59 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Monday, January 7, 2008
New Development Snapshot

The major change is that I dropped support for .NET 1.1 and started taking advantage of .NET 2.0 specific features. The most significant result of that is that it is now possible to run (some) applications in partial trust and that IKVM.OpenJDK.ClassLibrary.dll and IKVM.Runtime.dll can be put into the GAC and called from partially trusted code. Note that if you want to put the binaries in the GAC you'll have to build your own binaries (to get them strong named) as the development snapshot binaries are not strong named.


  • .NET 1.1 is no longer supported.
  • Removed .NET 2.0 warnings (except for the "unreachable code" ones).
  • Removed most .NET 1.1 specific code.
  • Removed conditional compilation of .NET 2.0 specific code.
  • Updated FileChannelImpl to use SafeFileHandle and GC.Add|RemoveMemoryPressure.
  • Added GC.KeepAlive to "native" methods of MappedByteBuffer.
  • Improved VFS.
  • The VFS file "lib/security/cacerts" is now dynamically generated from the .NET X509 store.
  • Implemented native methods of java.io.Console (some Win32 only).
  • Implemented support for InternalsVisibleToAttribute.
  • Moved JNI implementation into a separate assembly (IKVM.Runtime.JNI.dll) to make IKVM.Runtime.dll verifiable.
  • Made all "native" method classes internal.
  • Restructured VM <-> Library interface to take advantage of InternalsVisibleTo to remove public methods and reflection usage.
  • Added support for adding constructors in map.xml.
  • Changed <clinit> method to SmartConstructorMethodWrapper to support calling it from map.xml
  • Removed call to unnecessary call to MatchTypes (to support partial trust)
  • Ignore SecurityException in CanonicalizePath.
  • Moved some calls to methods with a LinkDemand (that fails in partial trust) to a separate methods.
  • Added stuff to map.xml to remove the need for reflection in VM / Library bootstrap.
  • Inverted IKVM.Runtime.JNI dependency in stack walking code to avoid needlessly loading the JNI assembly.
  • Fixed bug that caused nested .NET generic types to report a declaring type.
  • Added -skiperror option to ikvmstub (by Kevin Grigorenko).
  • Replaced GCHandle in java.lang.ref.Reference with WeakReference to support partial trust.
  • Added check to prevent sun.misc.Unsafe.objectFieldOffset() from working on static fields.
  • Added support for registering a delegate with a DynamicTypeWrapper that gets called after the type is baked.
  • Intrinsified AtomicReferenceFieldUpdater.newUpdater().
  • Added virtual opcode to explicitly trigger class initialization from map.xml.
  • Added accessor methods for "slot" to Method & Constructor.
  • Implemented System.setIn0, setOut0, setErr0 in map.xml.
  • Hacked sun.misc.SharedSecrets in map.xml to replace Unsafe.ensureClassInitialize() with direct calls.
  • Replaced java.nio.Bits.byteOrder() in map.xml with simple System.BitConver.IsLittleEndian based implementation.
  • Disabled DynamicMethodSupport when running in partial trust.
  • Don't trigger load of JNI assembly when "loading" a fake system library.
  • Added ikvmc -platform option.
  • Added SecurityCritical and AllowPartiallyTrustedCallers annotation to IKVM.OpenJDK.ClassLibrary.dll.
  • Added SecurityCritical and AllowPartiallyTrustedCallers attributes to IKVM.Runtime.dll.


Development snapshots are intended for evaluating and keeping track of where the project is going, not for production usage. The binaries have not been extensively tested and are not strong named.

Binaries available here: ikvmbin-0.37.2928.zip

Monday, January 7, 2008 8:56:57 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [4]
# Monday, December 31, 2007
Argh! Part 2
using System;

    GCHandle handle;

        handle = GCHandle.Alloc(this, GCHandleType.WeakTrackResurrection);

        Console.WriteLine(handle.Target != null);

    static void Main()
        new Program();

Judging from the comments, many people had trouble understanding the previous code snippet. The above code is equivalent (except that this actually works on .NET 2.0). Maybe this will help clarify.

Monday, December 31, 2007 10:18:31 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
using System;

    WeakReference wr;

        wr = new WeakReference(this, true);


    static void Main()
        new Program();

What should the output of this program be? On .NET 1.1 it's True (as expected), but on .NET 2.0 it is False. On .NET 2.0 the GC has special support for finalizing WeakReferences, but it fails to take into account whether GC.SuppressFinalize() has been called (and this may be by design, but it's still broken).

This may look academic, but it is actually a real issue in the implementation of ReferenceQueues on IKVM. Previously I used GCHandle to keep a weak reference back to the reference object that was being monitored, but because that requires full trust, I changed the code to use WeakReference, but that broke it because of the above mentioned behavior. The work around is easy, but ugly and inefficient, simply keep these weak references in a global hashtable to make sure they are always strongly reachable.

.NET really needs a better mechanism for doing post-mortem cleanup (i.e. something like java.lang.ref.ReferenceQueue).

P.S. By my new policy, I won't be filing a bug with Microsoft since they have amply demonstrated not to care about external bug reports.

Monday, December 31, 2007 2:33:49 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [6]
# Friday, December 28, 2007
Hello World

Five and a half years ago, Hello World ran for the first time... Now, for the first time a statically compiled HelloWorld.exe runs in partial trust (LocalIntranet zone in this case). Here's an exciting screenshot:

Hello World


Obviously this doesn't mean things are done, but hopefully it won't take another five years ;-)

Friday, December 28, 2007 4:13:47 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
# Monday, December 10, 2007
IKVM 0.36 Released

After what feels like an eternity, I've finally released IKVM 0.36. The binaries are identical to the ones in rc6.

Release Notes

This document lists the known issues and incompatibilities.


  • Code unloading (aka class GC) is not supported.
  • In Java static initializers can deadlock, on .NET some threads can see uninitialized state in cases where deadlock would occur on the JVM.
  • JNI
    • Only supported in the default AppDomain.
    • Only the JNICALL calling convention is supported! (On Windows, HotSpot appears to also support the cdecl calling convention).
    • Cannot call string contructors on already existing string instances
    • A few limitations in Invocation API support
      • The Invocation API is only supported when running on .NET.
      • JNI_CreateJavaVM: init options "-verbose[:class|:gc|:jni]", "vfprintf", "exit" and "abort" are not implemented. The JDK 1.1 version of JavaVMInitArgs isn't supported.
      • JNI_GetDefaultJavaVMInitArgs not implemented
      • JNI_GetCreatedJavaVMs only returns the JavaVM if the VM was started through JNI or a JNI call that retrieves the JavaVM has already occurred.
      • DestroyJVM is only partially implemented (it waits until there are no more non-daemon Java threads and then returns JNI_ERR).
      • DetachCurrentThread doesn't release monitors held by the thread.
    • Native libraries are never unloaded (because code unloading is not supported).
  • The JVM allows any reference type to be passed where an interface reference is expected (and to store any reference type in an interface reference type field), on IKVM this results in an IncompatibleClassChangeError.
  • monitorenter / monitorexit cannot be used on unitialized this reference.
  • Floating point is not fully spec compliant.
  • Volatile fields are not marked with modopt(volatile).
  • A method returning a boolean that returns an integer other than 0 or 1 behaves differently (this also applies to byte/char/short and for method parameters).
  • Synchronized blocks are not async exception safe.
  • Ghost arrays cannot be distinguished from object arrays (isinstance and casting don't differentiate and ArrayStoreException isn't thrown).
  • Class loading is more eager than on the reference VM.
  • Object instances don't get created at new, but only at the invokespecial of the constructor. This causes observable differences with classes that have a finalizer when the constructor arg evaluation throws an exception [with the JSR-133 change in finalization, this is no longer a spec issue, but since the reference VM doesn't correctly implement JSR-133 it still is an implementation difference].
  • Interface implementation methods are never really final (interface can be reimplemented by .NET subclasses).
  • JSR-133 finalization spec change is not implemented. The JSR-133 changes dictate that an object should not be finalized unless the Object constructor has run successfully.

Static Compiler (ikvmc)

  • Some subtle differences with ikvmc compiled code for public members inherited from non-public base classes (so called "access stubs"). Because the access stub lives in a derived class, when accessing a member in a base class, the derived cctor will be run whereas java (and ikvm) only runs the base cctor.
  • Try blocks around base class ctor invocation result in unverifiable code (no known compilers produce this type of code).
  • Try/catch blocks before base class ctor invocation result in unverifiable code (this actually happens with the Eclipse compiler when you pass a class literal to the base class ctor and compile with -target 1.4).
  • Only code compiled in a single assembly fully obeys the JLS binary compability rules.
  • An assembly can only contain one resource with a particular name.
  • Passing incorrect command line options to ikvmc may result in an exception rather than a proper error messages.

Class Library

Most class library code is based on OpenJDK build 13. Below is a list of divergences and IKVM specific implementation notes.

com.sun.security.auth.module        Not implemented.
java.applet GNU Classpath implementation. Not implemented.
java.awt GNU Classpath implementation with partial System.Windows.Forms based back-end. Not supported.
java.io.Console Not implemented.
java.lang.instrument Not implemented.
java.lang.management Not implemented.
java.net No IPv6 support implemented.
java.net.ProxySelector Getting the default system proxy for a URL is not implemented.
java.security Not supported.
java.text.Bidi GNU Classpath implementation. Not supported.
java.util.zip Partially based on GNU Classpath implementation.
javax.crypto IcedTea implementation. Not supported.
javax.imageio.plugins.jpeg Not implemented.
javax.management Not implemented.
javax.print Not implemented.
javax.script Not implemented.
javax.security Not supported.
javax.smartcardio Not implemented.
javax.sound Not implemented.
javax.swing GNU Classpath implementation. Not supported.
javax.tools Not implemented.
org.ietfs.jgss Not implemented.
sun.jdbc.odbc Not implemented.
sun.net.www.content.audio Audio content handlers not implemented.
sun.net.www.content.image Image content handlers not implemented.

The entire public API is available, so "Not implemented." for javax.print, for example, means that the API is there but there is no back-end to provide the actual printing support. "Not supported." means that the code is there and probably works at least somewhat, but that I'm less likely to fix bugs reported in these areas.

In addition to the issues listed above, the extended charset providers are not included (the ones in charsets.jar in the JRE).

Specific API notes:

  • java.lang.Thread.stop(Throwable t) doesn't support throwing arbitrary exceptions on other threads (only java.lang.ThreadDeath).
  • java.lang.Thread.holdsLock(Object o) causes a spurious notify on the object (this is allowed by the J2SE 5.0 spec).
  • java.lang.String.intern() strings are never garbage collected.
  • Weak/soft references and reference queues are inefficient and do not fully implement the required semantics.
  • Threads started outside of Java aren't "visible" (e.g. in ThreadGroup.enumerate()) until they first call Thread.currentThread().
  • java.lang.Thread.getState() returns WAITING or TIMED_WAITING instead of BLOCKING when we're inside Object.wait() and blocking to re-acquire the monitor.
  • java.io.File.getCanonicalPath() is broken on Mono on Windows.
  • java.nio.channel.FileChannel.lock() shared locks are only supported on Windows NT derived operating systems.
  • java.lang.ref.SoftReference: Soft references are not guaranteed to be cleared before an OutOfMemoryError is thrown.
  • java.lang.SecurityManager: Deprecated methods not implemented: classDepth(String), inClass(String), classLoaderDepth(), currentLoadedClass(), currentClassLoader(), inClassLoader()

Supported Platforms

This release has been tested on the following CLI implementations / platforms:

CLI Implementation       Architecture      Operating System
Mono 1.2.5 x86* Windows
Mono 1.2.5 x86* Linux
.NET 1.1 x86 Windows
.NET 2.0 x86 Windows
.NET 2.0 x64 Windows
.NET 2.0 SP1 x86 Windows
.NET 2.0 SP1 x64 Windows

* Running on Mono has only been tested on x86, but Mono includes the native (platform specific) parts of IKVM, so any platform where Mono runs should in theory be able to run this IKVM release.

Partial Trust

Partial trust is not supported. The IKVM class library and runtime require Full Trust to be able to run.

Monday, December 10, 2007 8:50:56 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
# Friday, December 7, 2007
Mono Summit 2007

Last week I attended the Mono Summit 2007 in Madrid. It was a very productive three days and very much fun as well! I got to meet Zoltan, Wade, Paolo, Massi and Dick for the first time and enjoyed seeing Jb (of Cecil and monolinker fame), Rodrigo (of Boo fame) and Miguel again.

Jb created a small repro of the monolinker bug that caused it too fail on IKVM.OpenJDK.ClassLibrary.dll, so hopefully that'll be fixed soon. I also talked to him about using Cecil in ikvmc to free me from the shackles of Reflection.Emit. This is a major chunk of work, but I think it will be worth it.

Zoltan found some weirdness in my usage of DynamicMethod (the DynamicMethod signature for the constructor reflection helper had an extra unused argument, the CLR didn't mind because it matched up with the unused this reference, but Mono didn't like it). Unfortunately, fixing this didn't resolve the problems I had with DynamicMethod on Mono 1.2.5 and 1.2.6, so fast reflection will remain disabled while running on Mono for the time being (on Zoltan's current code base it did work, so when the Mono release after 1.2.6 is out I'll be able to enable it).

Rodrigo did a very interesting and entertaining presentation on Boo. I must admit that I haven't seriously played with Boo yet, but it looks extremely interesting. It is a statically typed language that also supports more dynamic typing (like Erik Meijer's "Static Typing Where Possible, Dynamic Typing When Needed"). It also supports some very cool meta programming capabilities. I definitely need to check this out and I recommend you do too.

Paolo and I had a tentative discussion about adding Java bytecode support to the Mono JIT, so that the expensive IKVM just-in-time bytecode to IL conversion can be skipped when running Java code in dynamic mode on Mono. This would be really nice to have, but there aren't any specific plans yet, so don't hold your breath yet.

Finally, I tried to convice Jim Purbrick (of SecondLife, who was there because he wants to use Mono to speed up LSL and possibly support other languages) that he really should support Java as well ;-)

Friday, December 7, 2007 7:42:20 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]