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]
Other format: [Raw text]

[BC ABI] Merged with HEAD


With this patch we get a clean bill of health on gcj-abi-2-dev-branch
except for 

1.  a definite assignment issue for which I've created a PR,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15650

2.  TestEarlyGC.exe sometimes fails.  I don't know what's causing that
    failure.

Andrew.




2004-05-25  Andrew Haley  <aph@redhat.com>

        * class.c (build_symbol_entry): Convert the names of constructors
        to init_identifier_node when generating an entry for the indirect
        dispatch table.

        * expr.c (build_known_method_ref): Generate indirect calls for
        all methods marked DECL_EXTERNAL or TREE_PUBLIC.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.180.2.4
diff -c -2 -p -r1.180.2.4 class.c
*** class.c     25 May 2004 15:56:14 -0000      1.180.2.4
--- class.c     25 May 2004 16:03:25 -0000
*************** build_symbol_entry (tree decl)
*** 2359,2365 ****
  {
    tree clname, name, signature, sym;
-   
    clname = build_utf8_ref (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))));
!   name = build_utf8_ref (DECL_NAME (decl));
    signature = build_java_signature (TREE_TYPE (decl));
    signature = build_utf8_ref (unmangle_classname 
--- 2359,2371 ----
  {
    tree clname, name, signature, sym;
    clname = build_utf8_ref (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))));
!   /* ???  Constructors are given the name foo.foo all the way through
!      the compiler, but in the method table they're all renamed
!      foo.<init>.  So, we have to do the same here unless we want an
!      unresolved reference at runtime.  */
!   name = build_utf8_ref ((TREE_CODE (decl) == FUNCTION_DECL 
!                         && DECL_CONSTRUCTOR_P (decl))
!                        ? init_identifier_node
!                        : DECL_NAME (decl));
    signature = build_java_signature (TREE_TYPE (decl));
    signature = build_utf8_ref (unmangle_classname 
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.185.2.4
diff -c -2 -p -r1.185.2.4 expr.c
*** expr.c      25 May 2004 15:56:14 -0000      1.185.2.4
--- expr.c      25 May 2004 16:03:26 -0000
*************** build_known_method_ref (tree method, tre
*** 1865,1878 ****
    if (is_compiled_class (self_type))
      {
!       /* At one point I used 
! 
!       (!TREE_PUBLIC (method) && DECL_CONTEXT (method))) 
!       
!       here, meaning that we would make a direct call to methods that
!       are in the current compilation unit and not public.  That ought
!       to work, right?  Wrong.  Unfortunately, for some reason we still
!       generate a PLT jump for such methods, and they can end up being
!       resolved in some other library.  Sigh.  */
!       if (!flag_indirect_dispatch)
        {
          make_decl_rtl (method, NULL);
--- 1865,1874 ----
    if (is_compiled_class (self_type))
      {
!       /* With indirect dispatch we have to use indirect calls for all
!        publically visible methods or gcc will use PLT indirections
!        to reach them.  We also have to use indirect dispatch for all
!        external methods.  */
!       if (! flag_indirect_dispatch 
!         || (! DECL_EXTERNAL (method) && ! TREE_PUBLIC (method)))
        {
          make_decl_rtl (method, NULL);


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