This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: Quick Optimization Question


>>>>> "Mohan" == Mohan Embar <gnustuff@thisiscool.com> writes:

Mohan> public static final byte[] FOO = new byte[] {....};
Mohan> ...will gcj know to translate FOO.length into
Mohan> a constant at compile time?

Nope.

There used to be code to do this in some situations but I think it was
removed.

My "invariant hoisting" pass has some of the machinery to fix this.
It just needs to be taught about new[].  However, getting this patch
in may be troublesome.

Tom


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