public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/31365]  New: private methods given vtable slots
@ 2007-03-26 16:06 tromey at gcc dot gnu dot org
  2007-04-28  0:31 ` [Bug java/31365] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-03-26 16:06 UTC (permalink / raw)
  To: java-prs

Right now gcj will make a vtable slot for a non-static private method.
We speculate that this is done for CNI.
However, there's no point to a private method having a vtable slot,
since private methods are never inherited.  Ideally both gcj and g++
would emit calls to private methods directly (not via the vtable).

This may mean that private methods will have to check for this==null,
or perhaps their callers will (the latter may be preferable since most
calls will be on 'this', and thus the check can be removed).

link.cc already omits private methods from the constructed vtables.


-- 
           Summary: private methods given vtable slots
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31365


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug java/31365] private methods given vtable slots
  2007-03-26 16:06 [Bug java/31365] New: private methods given vtable slots tromey at gcc dot gnu dot org
@ 2007-04-28  0:31 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-28  0:31 UTC (permalink / raw)
  To: java-prs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |missed-optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31365


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-28  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 16:06 [Bug java/31365] New: private methods given vtable slots tromey at gcc dot gnu dot org
2007-04-28  0:31 ` [Bug java/31365] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).