equal
deleted
inserted
replaced
1996 // The UseInlineCaches only controls dispatch to invokevirtuals for |
1996 // The UseInlineCaches only controls dispatch to invokevirtuals for |
1997 // loaded classes which we weren't able to statically bind. |
1997 // loaded classes which we weren't able to statically bind. |
1998 if (!UseInlineCaches && is_loaded && code == Bytecodes::_invokevirtual |
1998 if (!UseInlineCaches && is_loaded && code == Bytecodes::_invokevirtual |
1999 && !target->can_be_statically_bound()) { |
1999 && !target->can_be_statically_bound()) { |
2000 // Find a vtable index if one is available |
2000 // Find a vtable index if one is available |
2001 vtable_index = target->resolve_vtable_index(calling_klass, callee_holder); |
2001 // For arrays, callee_holder is Object. Resolving the call with |
|
2002 // Object would allow an illegal call to finalize() on an |
|
2003 // array. We use holder instead: illegal calls to finalize() won't |
|
2004 // be compiled as vtable calls (IC call resolution will catch the |
|
2005 // illegal call) and the few legal calls on array types won't be |
|
2006 // either. |
|
2007 vtable_index = target->resolve_vtable_index(calling_klass, holder); |
2002 } |
2008 } |
2003 #endif |
2009 #endif |
2004 |
2010 |
2005 if (recv != NULL && |
2011 if (recv != NULL && |
2006 (code == Bytecodes::_invokespecial || |
2012 (code == Bytecodes::_invokespecial || |