Finding the declaring class of a _Jv_Field
Tom Tromey
tromey@cygnus.com
Sun Oct 29 13:39:00 GMT 2000
>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:
Mark> The correct fix is to check in interpret.cc after putfield or
Mark> putstatic have already called _Jv_ResolvePoolEntry on the
Mark> field. And then check if the defining_class of the instruction
Mark> is the same as the declaring_class of the field you are about to
Mark> modify.
Wouldn't we really want to do `final' checking in the bytecode
verifier? Ok, we don't have a verifier, so interpret.cc is the
logical choice. But in the long term we'd want to move this check to
the verifier, right?
Mark> But after calling _Jv_ResolvePoolEntry I only have a _Jv_Field
Mark> and I cannot figure out how to get the declaring class for
Mark> it. How is that done?
_Jv_Field fld;
Class k = fld.getClass ();
Or am I missing something?
See libjava/gcj/field.h.
Tom
More information about the Java
mailing list