This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Java: fixes for -fno-assume-compiled
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org, <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 15 Dec 2002 10:23:33 -0500 (EST)
- Subject: Re: Java: fixes for -fno-assume-compiled
On Sun, 15 Dec 2002, Andrew Haley wrote:
> Could you explain this next hunk a bit more? It seems to defeat an
> optimization. Perhaps the optimization didn't work, or didn't help?
Didn't work. Under some circumstances (inner classes), class constants
were getting compiled into the wrong class's cpool. I suspect
current_constant_pool_data_ref needed to be cleared somewhere where
current_class changes, but I didn't look, since...
> > - TYPE_CPOOL_DATA_REF (current_class) = current_constant_pool_data_ref
> > + TYPE_CPOOL_DATA_REF (current_class) = cpool_data_ref
> > = build1 (ADDR_EXPR, ptr_type_node, decl);
...it appears TYPE_CPOOL_DATA_REF also saves this value. If it is already
saved in a per-class structure, why bother with a global variable?
Jeff