This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: don't generate dead bytecode
Tom Tromey wrote:
>The other problem we face is that a Java fold() must handle string
>operations as well.
>
fold only does "shallow" folding - i.e. it assumes that you call
it at each step when you create tree-node for an operator, so that
any operands to a binary operator have already been folded.
fold does not recursively traverse its input. Thus I don't think
strings are a problem - basically we just need to handle string
concatenation separately before we call fold - like we do now.
--Per