This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ patch: Add support for calling Java interfaces


Jason Merrill wrote:

> >>>>> "Bryce" == Bryce McKinlay <bryce@albatross.co.nz> writes:
>
> > +  tree lookup_fn = builtin_function ("_Jv_LookupInterfaceMethodIdx",
> > +                                  build_function_type (ptr_type_node, t),
> > +                                  0, NOT_BUILT_IN, NULL_PTR);
>
> You should only call builtin_function once; after that, just look it up.

Right - I was following the existing code for calling _Jv_exception_info in
except.c, so that should change as well? Is it appropriate to put this in
c-common.c, or should I make it a static in class.c and lazy-initialize it?

> > +  /* Determine the itable index of FN. */
> > +  i = 1;
> > +  for (method = TYPE_METHODS (iface); method; method = TREE_CHAIN (method))
> > +    {
> > +      if (DECL_ARTIFICIAL (method) || !DECL_VIRTUAL_P (method))
> > +        continue;
>
> Why check DECL_ARTIFICIAL?

Hmm... no reason in particular. I guess C++ never adds artificial virtual
functions?

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]