[kaffe] libraries/clib/native/Field.c

Godmar Back gback@stanford.edu
Tue, 7 May 2002 12:02:33 -0600 (MDT)


> 
> jint
> Java_java_lang_reflect_Field_getInt0(struct Hjava_lang_reflect_Field *
> this, struct Hjava_lang_Object* obj) 
> {
>         return (*(jint*)getFieldAddress(this, obj));
> }
> 
> I don't immediately see why this should happen, but it does seem to
> happen. Swapping the parameters aroudn as above seems to solve the
> problem, but it's perhaps a good diea to figure out what's going on. It
> seems the swapping-around only works for static fields; could it be the VM
> is trying to pass the JNI environment or similiar first in the stack
> bumping the rest of the addresses?
> 

Yes.
Methods that start with Java_ are called using the JNI calling convention.
See jni.c::Kaffe_JNI_native 

	- Godmar