This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Field resolution -vs- JNI
- To: Java Discuss List <java at gcc dot gnu dot org>
- Subject: Field resolution -vs- JNI
- From: Tom Tromey <tromey at redhat dot com>
- Date: 22 Mar 2001 22:28:53 -0700
- Reply-To: tromey at redhat dot com
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