mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 02:10:44 +00:00
Fixed code style
This commit is contained in:
@@ -266,7 +266,7 @@ public class DottedChain implements Serializable, Comparable<DottedChain> {
|
||||
public String toString() {
|
||||
return toRawString();
|
||||
}
|
||||
|
||||
|
||||
protected String toString(boolean as3, boolean raw, boolean withSuffix) {
|
||||
if (isNull) {
|
||||
return "";
|
||||
|
||||
@@ -286,7 +286,7 @@ public class Graph {
|
||||
stack.add(queue);
|
||||
stacknext:
|
||||
while (!stack.isEmpty()) {
|
||||
|
||||
|
||||
queue = stack.peek();
|
||||
if (!queue.isEmpty()) {
|
||||
part = queue.remove();
|
||||
@@ -472,9 +472,9 @@ public class Graph {
|
||||
}
|
||||
Comparator<PartCommon> comparator = new Comparator<PartCommon>() {
|
||||
@Override
|
||||
public int compare(PartCommon o1, PartCommon o2) {
|
||||
public int compare(PartCommon o1, PartCommon o2) {
|
||||
int levelCompare = o2.level - o1.level;
|
||||
if (levelCompare == 0) {
|
||||
if (levelCompare == 0) {
|
||||
try {
|
||||
if (o1.part.leadsTo(localData, Graph.this, code, o2.part, loops, throwStates, false)) {
|
||||
return -1;
|
||||
@@ -637,7 +637,7 @@ public class Graph {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(PartCommon o) {
|
||||
public int compareTo(PartCommon o) {
|
||||
int ret = o.level - level;
|
||||
if (ret == 0) {
|
||||
ret = part.closedTime - o.part.closedTime;
|
||||
@@ -824,20 +824,20 @@ public class Graph {
|
||||
makeAllCommands(ret, stack);
|
||||
finalProcessAll(ret, 0, getFinalData(localData, loops, throwStates), path);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
protected SecondPassData prepareSecondPass(List<GraphTargetItem> list) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
protected void processOther(List<GraphTargetItem> list, long lastLoopId) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void processSwitches(List<GraphTargetItem> list) {
|
||||
processSwitches(list, -1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
while(something){
|
||||
@@ -934,7 +934,7 @@ public class Graph {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (breakCount == 2) {
|
||||
if (breakCaseIndex <= 0) {
|
||||
continue loopi;
|
||||
@@ -950,8 +950,8 @@ public class Graph {
|
||||
if (br.loopId != swi.loop.id) {
|
||||
continue loopi;
|
||||
}
|
||||
swi.caseCommands.get(breakCaseIndex - 1).remove(swi.caseCommands.get(breakCaseIndex - 1).size() - 1);
|
||||
}
|
||||
swi.caseCommands.get(breakCaseIndex - 1).remove(swi.caseCommands.get(breakCaseIndex - 1).size() - 1);
|
||||
}
|
||||
|
||||
boolean hasContinues = false;
|
||||
for (int c = 0; c < swi.caseCommands.size(); c++) {
|
||||
@@ -1495,7 +1495,7 @@ public class Graph {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (xx) {
|
||||
A;
|
||||
@@ -1510,7 +1510,7 @@ public class Graph {
|
||||
}
|
||||
break/continue x;
|
||||
|
||||
*/
|
||||
*/
|
||||
if (i + 1 < list.size()) {
|
||||
GraphTargetItem nextItem = list.get(i + 1);
|
||||
if (onFalse.isEmpty() && !onTrue.isEmpty()) {
|
||||
@@ -1577,7 +1577,7 @@ public class Graph {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
private void checkContinueAtTheEnd(List<GraphTargetItem> commands, Loop loop) {
|
||||
if (!commands.isEmpty()) {
|
||||
int i = commands.size() - 1;
|
||||
@@ -1720,7 +1720,7 @@ public class Graph {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
protected GraphTargetItem checkLoop(List<GraphTargetItem> output, LoopItem loopItem, BaseLocalData localData, List<Loop> loops, List<ThrowState> throwStates, TranslateStack stack) {
|
||||
return loopItem;
|
||||
}
|
||||
@@ -2225,7 +2225,7 @@ public class Graph {
|
||||
protected List<GraphTargetItem> printGraph(List<GotoItem> foundGotos, Map<GraphPart, List<GraphTargetItem>> partCodes, Map<GraphPart, Integer> partCodePos, Set<GraphPart> visited, BaseLocalData localData, TranslateStack stack, Set<GraphPart> allParts, GraphPart parent, GraphPart part, List<GraphPart> stopPart, List<StopPartKind> stopPartKind, List<Loop> loops, List<ThrowState> throwStates, int staticOperation, String path) throws InterruptedException {
|
||||
return printGraph(foundGotos, partCodes, partCodePos, visited, localData, stack, allParts, parent, part, stopPart, stopPartKind, loops, throwStates, null, staticOperation, path, 0);
|
||||
}
|
||||
|
||||
|
||||
protected List<GraphTargetItem> printGraph(List<GotoItem> foundGotos, Map<GraphPart, List<GraphTargetItem>> partCodes, Map<GraphPart, Integer> partCodePos, Set<GraphPart> visited, BaseLocalData localData, TranslateStack stack, Set<GraphPart> allParts, GraphPart parent, GraphPart part, List<GraphPart> stopPart, List<StopPartKind> stopPartKind, List<Loop> loops, List<ThrowState> throwStates, List<GraphTargetItem> ret, int staticOperation, String path, int recursionLevel) throws InterruptedException {
|
||||
loopPrintGraph:
|
||||
while (true) {
|
||||
@@ -2990,7 +2990,7 @@ public class Graph {
|
||||
if (continueCommands.isEmpty()) {
|
||||
commands.addAll(precoCommands);
|
||||
precoCommands = new ArrayList<>();
|
||||
|
||||
|
||||
//Single continue and there is break/continue/return/throw at end of the commands
|
||||
} else if (!commands.isEmpty() && continueCommands.size() == 1) {
|
||||
GraphTargetItem lastItem = commands.get(commands.size() - 1);
|
||||
@@ -3150,7 +3150,7 @@ public class Graph {
|
||||
}
|
||||
|
||||
protected void checkGraph(List<GraphPart> allBlocks) {
|
||||
}
|
||||
}
|
||||
|
||||
protected int checkIp(int ip) {
|
||||
return ip;
|
||||
@@ -3420,7 +3420,7 @@ public class Graph {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected SwitchItem handleSwitch(GraphTargetItem switchedObject,
|
||||
GraphSourceItem switchStartItem, List<GotoItem> foundGotos, Map<GraphPart, List<GraphTargetItem>> partCodes, Map<GraphPart, Integer> partCodePos, Set<GraphPart> visited, Set<GraphPart> allParts, TranslateStack stack, List<GraphPart> stopPart, List<StopPartKind> stopPartKind, List<Loop> loops, List<ThrowState> throwStates, BaseLocalData localData, int staticOperation, String path,
|
||||
List<GraphTargetItem> caseValuesMap, GraphPart defaultPart, List<GraphPart> caseBodyParts, Reference<GraphPart> nextRef, Reference<GraphTargetItem> tiRef) throws InterruptedException {
|
||||
@@ -3624,7 +3624,7 @@ public class Graph {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//If the lastone is default empty and alone, remove it
|
||||
if (!caseCommands.isEmpty()) {
|
||||
List<GraphTargetItem> lastc = caseCommands.get(caseCommands.size() - 1);
|
||||
|
||||
@@ -134,7 +134,7 @@ public class GraphPart implements Serializable {
|
||||
next.setNumblocks(numBlocks);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean leadsToRecursive(BaseLocalData localData, Graph gr, GraphSource code, GraphPart prev, GraphPart part, HashSet<GraphPart> visited, List<Loop> loops, List<ThrowState> throwStates, boolean useThrow) throws InterruptedException {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
@@ -357,7 +357,7 @@ public class GraphPart implements Serializable {
|
||||
|
||||
public boolean containsIP(int ip) {
|
||||
return (ip >= start) && (ip <= end);
|
||||
}
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return end - start + 1;
|
||||
|
||||
@@ -113,7 +113,7 @@ public abstract class GraphSource implements Serializable {
|
||||
|
||||
public abstract int adr2pos(long adr);
|
||||
|
||||
public abstract int adr2pos(long adr, boolean nearest);
|
||||
public abstract int adr2pos(long adr, boolean nearest);
|
||||
|
||||
public long getAddressAfterCode() {
|
||||
if (isEmpty()) {
|
||||
@@ -122,7 +122,7 @@ public abstract class GraphSource implements Serializable {
|
||||
long lastAddr = pos2adr(size() - 1);
|
||||
return lastAddr + get(size() - 1).getBytesLength();
|
||||
}
|
||||
|
||||
|
||||
public abstract long pos2adr(int pos);
|
||||
|
||||
public final long pos2adr(int pos, boolean allowPosAfterCode) {
|
||||
|
||||
@@ -287,7 +287,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
|
||||
|
||||
public boolean needsSemicolon() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public GraphTextWriter toStringBoolean(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
return toString(writer, localData, "Boolean");
|
||||
|
||||
+4
-4
@@ -205,7 +205,7 @@ public class GraphPrecontinueDetector {
|
||||
for (Node n : node.next) {
|
||||
populateNodes(n, populated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean handleWhile(List<Node> headNodes) {
|
||||
Set<Node> visited = new HashSet<>();
|
||||
@@ -290,7 +290,7 @@ public class GraphPrecontinueDetector {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private boolean joinNodes(List<Node> headNodes) {
|
||||
Set<Node> visited = new HashSet<>();
|
||||
Reference<Integer> numChanged = new Reference<>(0);
|
||||
@@ -354,7 +354,7 @@ public class GraphPrecontinueDetector {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private boolean checkIfs(List<Node> headNodes) {
|
||||
Set<Node> visited = new HashSet<>();
|
||||
Reference<Integer> numChanged = new Reference<>(0);
|
||||
@@ -364,7 +364,7 @@ public class GraphPrecontinueDetector {
|
||||
headNodes.set(h, newHeadNode);
|
||||
}
|
||||
return numChanged.getVal() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
private Node checkIfs(Node node, Set<Node> visited, Reference<Integer> numIfs) {
|
||||
if (visited.contains(node)) {
|
||||
|
||||
Reference in New Issue
Block a user