978 /** If tree is a concatenation of string literals, replace it |
978 /** If tree is a concatenation of string literals, replace it |
979 * by a single literal representing the concatenated string. |
979 * by a single literal representing the concatenated string. |
980 */ |
980 */ |
981 protected JCExpression foldStrings(JCExpression tree) { |
981 protected JCExpression foldStrings(JCExpression tree) { |
982 if (!allowStringFolding) |
982 if (!allowStringFolding) |
983 return null; |
983 return tree; |
984 ListBuffer<JCExpression> opStack = new ListBuffer<>(); |
984 ListBuffer<JCExpression> opStack = new ListBuffer<>(); |
985 ListBuffer<JCLiteral> litBuf = new ListBuffer<>(); |
985 ListBuffer<JCLiteral> litBuf = new ListBuffer<>(); |
986 boolean needsFolding = false; |
986 boolean needsFolding = false; |
987 JCExpression curr = tree; |
987 JCExpression curr = tree; |
988 while (true) { |
988 while (true) { |