Alexey Andreev 2015-05-14 14:22:22 +04:00
parent f07a8aec8f
commit 85cfe4814e

View File

@ -1192,23 +1192,22 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext
}
Set<String> names = index < debugNames.size() ? debugNames.get(index) : null;
if (minifying || names == null || names.isEmpty()) {
--index;
if (index < variableNames.length()) {
return Character.toString(variableNames.charAt(index));
} else {
return Character.toString(variableNames.charAt(index % variableNames.length())) +
index / variableNames.length();
}
StringBuilder sb = new StringBuilder();
--index;
if (index < variableNames.length()) {
sb.append(Character.toString(variableNames.charAt(index)));
} else {
sb.append(Character.toString(variableNames.charAt(index % variableNames.length())) +
index / variableNames.length());
}
if (!minifying && names != null && !names.isEmpty()) {
List<String> nameList = new ArrayList<>(names);
Collections.sort(nameList);
StringBuilder sb = new StringBuilder();
for (String name : nameList) {
sb.append('_').append(name);
}
return sb.toString();
}
return sb.toString();
}
private String pointerName() {