This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Eager vs Lazy resolution of classes
This issue has a bearing on split verification.
We need to be able to verify a class without doing full class
initialization of the classes it refers to. The verifier in the
runtime library does this (see ref_intersection::compatible()). This is
OK.
However, _Jv_IsAssignableFrom() uses klass->ancestors, and this field
is initialized until _Jv_PrepareConstantTimeTables().
For split verification to work, we need a way to test assignability
without fully preparing the target classes. This should be easy
enough: we only need to load ancestors and superinterfaces to
determine assignability.
_Jv_BytecodeVerifier::is_assignable_from_slow() looks like it will do
the trick, but it's buried inside the verifier.
Tom, can you see a good way to expose this useful functionality? I
think something like a version of _Jv_IsAssignableFrom() that checks
to see if we can do a check the fast way but falls back to the slow
way would be fine.
Andrew.