Implementation of constant folding. Unfortunately, javac does its constant folding after we are invoked, and it does so, perhaps understandably, at a lower level than the AST. The objective here is to get constant folding done at the AST level so other, actually interesting optimisations are not hindered by the non-foldedness of constants when they subsequently are run. Unfortunately, doing things at this level means we have to deal with issues like brackets. TODO: Lambdas might be able to make this less soul-destroyingly awful to look at.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.