This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcj: always emit static array data
- To: aph at pasanda dot cygnus dot co dot uk
- Subject: Re: gcj: always emit static array data
- From: Anthony Green <green at cygnus dot com>
- Date: Mon, 16 Aug 1999 07:38:28 -0700
- CC: gcc-patches at sourceware dot cygnus dot com
- References: <19990816140200.10659.qmail@pasanda.cygnus.co.uk>
Andrew wrote:
> So we should stop the compiler from referring to the array in the
> class initialization routine, n'est ce pas? We are initializing an
> unreachable array...
Well, you can still access it via java.lang.reflect. We should
consider cleaning this up once we add a compiler option for omitting
reflective data.
In any case, the original problem wasn't that we couldn't link
programs containing unreferenced static arrays. It was that we
couldn't link programs containing _referenced_ static arrays. My
sample program is just a special case (in that is contains no
references). So, for instance, we weren't able to compile
java.util.GregorianCalendar with any level of optimization. :-(
AG
--
Anthony Green Cygnus Solutions
Sunnyvale, California