Issue #45 Unicode character cannot save

Code formatting
This commit is contained in:
Jindra Petk
2013-03-30 16:43:26 +01:00
parent d3bd9b641d
commit be106cc34b
772 changed files with 84378 additions and 84353 deletions

View File

@@ -11,56 +11,56 @@ import java.util.Stack;
*/
public abstract class GraphSource {
public abstract int size();
public abstract int size();
public abstract GraphSourceItem get(int pos);
public abstract GraphSourceItem get(int pos);
public abstract boolean isEmpty();
public abstract boolean isEmpty();
public abstract List<GraphTargetItem> translatePart(List localData, Stack<GraphTargetItem> stack, int start, int end);
public abstract List<GraphTargetItem> translatePart(List localData, Stack<GraphTargetItem> stack, int start, int end);
private void visitCode(int ip, int lastIp, HashMap<Integer, List<Integer>> refs) {
while (ip < size()) {
refs.get(ip).add(lastIp);
lastIp = ip;
if (refs.get(ip).size() > 1) {
break;
}
GraphSourceItem ins = get(ip);
if (ins.isExit()) {
break;
}
if (ins.isBranch() || ins.isJump()) {
List<Integer> branches = ins.getBranches(this);
for (int b : branches) {
if (b >= 0) {
visitCode(b, ip, refs);
}
private void visitCode(int ip, int lastIp, HashMap<Integer, List<Integer>> refs) {
while (ip < size()) {
refs.get(ip).add(lastIp);
lastIp = ip;
if (refs.get(ip).size() > 1) {
break;
}
break;
}
ip++;
};
}
GraphSourceItem ins = get(ip);
public HashMap<Integer, List<Integer>> visitCode(List<Integer> alternateEntries) {
HashMap<Integer, List<Integer>> refs = new HashMap<Integer, List<Integer>>();
for (int i = 0; i < size(); i++) {
refs.put(i, new ArrayList<Integer>());
}
visitCode(0, 0, refs);
int pos = 0;
for (int e : alternateEntries) {
pos++;
visitCode(e, -pos, refs);
}
return refs;
}
public abstract int adr2pos(long adr);
if (ins.isExit()) {
break;
}
public abstract long pos2adr(int pos);
if (ins.isBranch() || ins.isJump()) {
List<Integer> branches = ins.getBranches(this);
for (int b : branches) {
if (b >= 0) {
visitCode(b, ip, refs);
}
}
break;
}
ip++;
};
}
public HashMap<Integer, List<Integer>> visitCode(List<Integer> alternateEntries) {
HashMap<Integer, List<Integer>> refs = new HashMap<Integer, List<Integer>>();
for (int i = 0; i < size(); i++) {
refs.put(i, new ArrayList<Integer>());
}
visitCode(0, 0, refs);
int pos = 0;
for (int e : alternateEntries) {
pos++;
visitCode(e, -pos, refs);
}
return refs;
}
public abstract int adr2pos(long adr);
public abstract long pos2adr(int pos);
}