Field resolution -vs- JNI

Tom Tromey tromey@redhat.com
Thu Mar 22 22:21:00 GMT 2001


I tracked down the JNI failure.

The JNI code assumes, as I apparently once assumed, that field
resolution happens as side effect of class initialization.  Field
resolution is the act of turning the field's type from a Utf8Const
into a Class reference.

Reflection assumes that field resolution happens lazily.

Some notes on this:

* I'm going to change JNI to do lazily resolution.

* I don't understand why we don't just emit a direct class reference
  in the compiler.

* We seem to inconsistently acquire the class lock when doing field
  resolution.  I'm going to change things to always acquire this
  lock.

Tom



More information about the Java mailing list