Hi,

I see that the implementation of LANG_HOOKS_GET_CALLEE_FNDECL in Java
always returns NULL (at least for the time being).

static tree
java_get_callee_fndecl (tree call_expr)
{
  tree method, table, element, atable_methods;

  HOST_WIDE_INT index;

  /* FIXME: This is disabled because we end up passing calls through
     the PLT, and we do NOT want to do that.  */
  return NULL;

  :
  :

Is anybody planning to fix this?  If not, I'm thinking about removing
this language hook.  The reason is not just clean up.  Rather it is
because I need to change the prototype of get_callee_fndecl and
LANG_HOOKS_GET_CALLEE_FNDECL..  Currently, fold_ternary has the
following call tree.

  fold_ternary
    get_callee_fndecl
      java_get_callee_fndecl

If I change fold_ternary to take components of CALL_EXPR like the
address expression of CALL_EXPR and the argument list, instead of
CALL_EXPR itself, I would have to change java_get_callee_fndecl to
take the first operand of a CALL_EXPR, instead of a CALL_EXPR.

It's not that the change is so involved, but it doesn't make much
sense to keep something dead up to date.

In other words, when I posted the following patch

  http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02038.html

Roger Sayle requested to keep the call to get_callee_fndecl so that we
can "fold" the first operand of a CALL_EXPR to a FUNCTION_DECL.

FYI, the above FIXME comes from

  http://gcc.gnu.org/ml/java-patches/2004-q2/msg00083.html

Kazu Hirata

Reply via email to