This commit is contained in:
Coleen Phillimore 2014-07-14 10:15:21 -04:00
commit c9b2bc62c9
2991 changed files with 67823 additions and 46239 deletions

View file

@ -1998,7 +1998,13 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
if (!UseInlineCaches && is_loaded && code == Bytecodes::_invokevirtual
&& !target->can_be_statically_bound()) {
// Find a vtable index if one is available
vtable_index = target->resolve_vtable_index(calling_klass, callee_holder);
// For arrays, callee_holder is Object. Resolving the call with
// Object would allow an illegal call to finalize() on an
// array. We use holder instead: illegal calls to finalize() won't
// be compiled as vtable calls (IC call resolution will catch the
// illegal call) and the few legal calls on array types won't be
// either.
vtable_index = target->resolve_vtable_index(calling_klass, holder);
}
#endif