hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
changeset 25716 fc9bd7814b10
parent 25715 d5a8dbdc5150
parent 25494 c18718ecf276
child 25719 ef6312344da2
equal deleted inserted replaced
25715:d5a8dbdc5150 25716:fc9bd7814b10
  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 ||