This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: gcj: always emit static array data



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


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