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]
Other format: [Raw text]

Re: RFC: fix PR 28892


Tom Tromey writes:
 > PR 28892 involves compiling bytecode which has been run through
 > retroweaver.  Apparently retroweaver will emit bytecode that
 > initializes static final variables in methods other than <clinit>.
 > This particular set of constraints doesn't appear to be checked by the
 > JDK, meaning that this is bytecode which JDK users can run but which
 > we will reject.
 > 
 > I fixed this by removing the checks.  Any comments (Andrew?) before I
 > check this in?

I'd have made it WONTFIX.  Sadly, however, there seems to be no rule
in the specification that forbids final fields being rewritten in
methods other than clinit.

This makes some optimizations harder.  I think we need a flag to tell
gcj that what we are compiling may not be Java code.  Then we can do
better optimizations when we know that it is.

Andrew.


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