Class JumpsIntoLoopCloneRewriter
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.JumpsIntoLoopCloneRewriter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<Op03SimpleStatement> copyBlock(Op03SimpleStatement stm, Op03SimpleStatement caller, Op03SimpleStatement start, Op03SimpleStatement end, Set<Op03SimpleStatement> valid, BlockIdentifier containedIn, Set<Op03SimpleStatement> addSources, Map<Op03SimpleStatement, Op03SimpleStatement> orig2copy) private List<Op03SimpleStatement> copyST(List<Op03SimpleStatement> original, Map<Op03SimpleStatement, Op03SimpleStatement> replacements, boolean failIfMissing) private Op03SimpleStatementgetPossLast(Op03SimpleStatement stm, BlockIdentifier ident) private booleanhandleConditionalCaller(Op03SimpleStatement stm, Op03SimpleStatement caller, Op03SimpleStatement target, Map<Op03SimpleStatement, Op03SimpleStatement> copies) private voidnopPointlessCondition(IfStatement newConditionStatement, Op03SimpleStatement newCondition) private voidrefactorDo(List<Op03SimpleStatement> addThese, Op03SimpleStatement stm, BlockIdentifier ident) private voidrefactorWhile(List<Op03SimpleStatement> addThese, Op03SimpleStatement stm, BlockIdentifier ident) voidrewrite(List<Op03SimpleStatement> op03SimpleParseNodes, DecompilerComments comments) private GraphVisitor<Op03SimpleStatement> visitCandidates(BlockIdentifier blockIdent, Op03SimpleStatement possLast, Map<Op03SimpleStatement, Op03SimpleStatement> candidates)
-
Field Details
-
maxDepth
private int maxDepth
-
-
Constructor Details
-
JumpsIntoLoopCloneRewriter
JumpsIntoLoopCloneRewriter(Options options)
-
-
Method Details
-
rewrite
-
refactorDo
private void refactorDo(List<Op03SimpleStatement> addThese, Op03SimpleStatement stm, BlockIdentifier ident) -
refactorWhile
private void refactorWhile(List<Op03SimpleStatement> addThese, Op03SimpleStatement stm, BlockIdentifier ident) -
handleConditionalCaller
private boolean handleConditionalCaller(Op03SimpleStatement stm, Op03SimpleStatement caller, Op03SimpleStatement target, Map<Op03SimpleStatement, Op03SimpleStatement> copies) -
nopPointlessCondition
private void nopPointlessCondition(IfStatement newConditionStatement, Op03SimpleStatement newCondition) -
getPossLast
-
visitCandidates
private GraphVisitor<Op03SimpleStatement> visitCandidates(BlockIdentifier blockIdent, Op03SimpleStatement possLast, Map<Op03SimpleStatement, Op03SimpleStatement> candidates) -
copyBlock
private List<Op03SimpleStatement> copyBlock(Op03SimpleStatement stm, Op03SimpleStatement caller, Op03SimpleStatement start, Op03SimpleStatement end, Set<Op03SimpleStatement> valid, BlockIdentifier containedIn, Set<Op03SimpleStatement> addSources, Map<Op03SimpleStatement, Op03SimpleStatement> orig2copy) -
copyST
private List<Op03SimpleStatement> copyST(List<Op03SimpleStatement> original, Map<Op03SimpleStatement, Op03SimpleStatement> replacements, boolean failIfMissing)
-