1980 bool is_loaded = target->is_loaded();
1981 ValueType* result_type = as_ValueType(declared_signature->return_type());
1982 ValueStack* state_before = copy_state_exhandling();
1983
1984 // The bytecode (code) might change in this method so we are checking this very late.
1985 const bool has_receiver =
1986 code == Bytecodes::_invokespecial ||
1987 code == Bytecodes::_invokevirtual ||
1988 code == Bytecodes::_invokeinterface;
1989 Values* args = state()->pop_arguments(target->arg_size_no_receiver() + patching_appendix_arg);
1990 Value recv = has_receiver ? apop() : NULL;
1991 int vtable_index = Method::invalid_vtable_index;
1992
1993 #ifdef SPARC
1994 // Currently only supported on Sparc.
1995 // The UseInlineCaches only controls dispatch to invokevirtuals for
1996 // loaded classes which we weren't able to statically bind.
1997 if (!UseInlineCaches && is_loaded && code == Bytecodes::_invokevirtual
1998 && !target->can_be_statically_bound()) {
1999 // Find a vtable index if one is available
2000 vtable_index = target->resolve_vtable_index(calling_klass, callee_holder);
2001 }
2002 #endif
2003
2004 if (recv != NULL &&
2005 (code == Bytecodes::_invokespecial ||
2006 !is_loaded || target->is_final())) {
2007 // invokespecial always needs a NULL check. invokevirtual where
2008 // the target is final or where it's not known that whether the
2009 // target is final requires a NULL check. Otherwise normal
2010 // invokevirtual will perform the null check during the lookup
2011 // logic or the unverified entry point. Profiling of calls
2012 // requires that the null check is performed in all cases.
2013 null_check(recv);
2014 }
2015
2016 if (is_profiling()) {
2017 if (recv != NULL && profile_calls()) {
2018 null_check(recv);
2019 }
2020 // Note that we'd collect profile data in this method if we wanted it.
|
1980 bool is_loaded = target->is_loaded();
1981 ValueType* result_type = as_ValueType(declared_signature->return_type());
1982 ValueStack* state_before = copy_state_exhandling();
1983
1984 // The bytecode (code) might change in this method so we are checking this very late.
1985 const bool has_receiver =
1986 code == Bytecodes::_invokespecial ||
1987 code == Bytecodes::_invokevirtual ||
1988 code == Bytecodes::_invokeinterface;
1989 Values* args = state()->pop_arguments(target->arg_size_no_receiver() + patching_appendix_arg);
1990 Value recv = has_receiver ? apop() : NULL;
1991 int vtable_index = Method::invalid_vtable_index;
1992
1993 #ifdef SPARC
1994 // Currently only supported on Sparc.
1995 // The UseInlineCaches only controls dispatch to invokevirtuals for
1996 // loaded classes which we weren't able to statically bind.
1997 if (!UseInlineCaches && is_loaded && code == Bytecodes::_invokevirtual
1998 && !target->can_be_statically_bound()) {
1999 // Find a vtable index if one is available
2000 vtable_index = target->resolve_vtable_index(calling_klass, holder);
2001 }
2002 #endif
2003
2004 if (recv != NULL &&
2005 (code == Bytecodes::_invokespecial ||
2006 !is_loaded || target->is_final())) {
2007 // invokespecial always needs a NULL check. invokevirtual where
2008 // the target is final or where it's not known that whether the
2009 // target is final requires a NULL check. Otherwise normal
2010 // invokevirtual will perform the null check during the lookup
2011 // logic or the unverified entry point. Profiling of calls
2012 // requires that the null check is performed in all cases.
2013 null_check(recv);
2014 }
2015
2016 if (is_profiling()) {
2017 if (recv != NULL && profile_calls()) {
2018 null_check(recv);
2019 }
2020 // Note that we'd collect profile data in this method if we wanted it.
|