public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/12772] Need infrastructure to determine if a class in in same binary unit
       [not found] <20031025043704.12772.mckinlay@redhat.com>
@ 2004-05-14 21:24 ` aph at gcc dot gnu dot org
  2004-05-15  8:35 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-05-14 21:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aph at gcc dot gnu dot org  2004-05-14 16:26 -------
Suppose that the classpath is foo.so:bar.so and suppose that a class is found in 
bar.so.  We should first try to resolve that class's dependencies in foo.so, even
though it may be possible to resolve them in bar.so.  So, even if we could
determine that a class was in the same binary unit, it wouldn't be binary
compatible to optimize based on that, at least not by default.

-fassume-local does provide a way around this: the user is asking the compile to
ignore binary compatibility rules.


-- 


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


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

* [Bug java/12772] Need infrastructure to determine if a class in in same binary unit
       [not found] <20031025043704.12772.mckinlay@redhat.com>
  2004-05-14 21:24 ` [Bug java/12772] Need infrastructure to determine if a class in in same binary unit aph at gcc dot gnu dot org
@ 2004-05-15  8:35 ` tromey at gcc dot gnu dot org
  2004-05-15 10:52 ` mckinlay at redhat dot com
  2004-11-12  0:13 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-05-15  8:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-05-14 18:05 -------
I think comment 1 was referring to optimizing accesses to
private outer fields.  For object code we could do this by
adding a special permission bit (or equivalent) that is used
when code comes from the same translation unit.

There are a few pathological cases here, where in theory
you can do runtime class replacement, but in practice it
won't really work.  E.g., a local or anonymous class can
capture final local variables, but there is no standard for
how these variables end up in the class -- every compiler is
free to implement it differently.  Replacing one of these
inner classes at runtime is strange and probably would not work
well in practice.

Accessing private outer fields falls into this category as well.
There is no standard controlling the names of the accessor methods
that are added to the outer class.  Given that, it is hard to
see how the language standard can claim that binary compatibility
actually makes sense here.  But, if we really want to go this
route, then I think we will have to always generate the accessor
methods, regardless of whether we're generating .class or .o.
E.g., the user could conceivably replace an inner ".o" with an
inner ".class" representation -- but this representation wouldn't
have access to whatever special hack we put in the runtime.


-- 


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


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

* [Bug java/12772] Need infrastructure to determine if a class in in same binary unit
       [not found] <20031025043704.12772.mckinlay@redhat.com>
  2004-05-14 21:24 ` [Bug java/12772] Need infrastructure to determine if a class in in same binary unit aph at gcc dot gnu dot org
  2004-05-15  8:35 ` tromey at gcc dot gnu dot org
@ 2004-05-15 10:52 ` mckinlay at redhat dot com
  2004-11-12  0:13 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mckinlay at redhat dot com @ 2004-05-15 10:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mckinlay at redhat dot com  2004-05-14 18:20 -------
When "intra translation unit" optimizations are enabled, which will be the case
unless runtime class replacement is needed, then there is no need for a special
accessibility flag because the compiler can use direct field access within the
binary - see my comments on bug 15363.

If we want "extra binary compatibilty", ie the ability to replace individual
classes within a compilation unit at runtime, then its probably best to just use
the accessor methods here.


-- 


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


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

* [Bug java/12772] Need infrastructure to determine if a class in in same binary unit
       [not found] <20031025043704.12772.mckinlay@redhat.com>
                   ` (2 preceding siblings ...)
  2004-05-15 10:52 ` mckinlay at redhat dot com
@ 2004-11-12  0:13 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-12  0:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2004-08-13 00:21:34         |2004-11-12 00:12:46
               date|                            |


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


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

* [Bug java/12772] Need infrastructure to determine if a class in in same binary unit
  2003-10-25  4:37 [Bug java/12772] New: " bryce at mckinlay dot net dot nz
@ 2003-10-25 19:49 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-25 19:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-25 18:28:01
               date|                            |
            Summary|Need infrastructure to      |Need infrastructure to
                   |determine if a class in in  |determine if a class in in
                   |same binary unit            |same binary unit


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

end of thread, other threads:[~2004-11-12  0:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20031025043704.12772.mckinlay@redhat.com>
2004-05-14 21:24 ` [Bug java/12772] Need infrastructure to determine if a class in in same binary unit aph at gcc dot gnu dot org
2004-05-15  8:35 ` tromey at gcc dot gnu dot org
2004-05-15 10:52 ` mckinlay at redhat dot com
2004-11-12  0:13 ` pinskia at gcc dot gnu dot org
2003-10-25  4:37 [Bug java/12772] New: " bryce at mckinlay dot net dot nz
2003-10-25 19:49 ` [Bug java/12772] " 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).