cfr icon indicating copy to clipboard operation
cfr copied to clipboard

Make not fully decompiled code analyzable and more java-like

Open GraxCode opened this issue 5 years ago • 1 comments

Not a big issue, but is a bit bothering when analyzing code.

lbl-1000:
            // 1 sources

            {
                l = (LabelNode)var15_18.next();
                if (skipDupeSwitches) {
                    if (alreadyConnected.contains((Object)l)) continue;
                    alreadyConnected.add((Object)l);
                }
                blockAtCase = (Block)correspBlock.get((Object)l);
                blockAtCase.getInput().add((Object)b);
                outputs.add((Object)blockAtCase);
lbl109:
                // 3 sources

                ** while (var15_18.hasNext())
            }
lbl110:
            // 1 sources

            b.setOutput(outputs);
            continue;
lbl-1000:
            // 1 sources

            {

Those label blocks should be indented and the comment on the same line, as well as the bracket. Also maybe change ** GOTO lbl109 to goto lbl109; to make it at least look like a bit more like java code. Also it is unclear what e. g. that while block does.

GraxCode avatar May 01 '20 13:05 GraxCode

A way to make code even more readable would be to continue decompiling the code, but with using goto statements if they were legal. The code wouldn't be valid, but easier to understand.

GraxCode avatar Jun 16 '20 19:06 GraxCode