Class LoopIdentifier
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.LoopIdentifier
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static BlockIdentifier
considerAsDoLoopStart
(Op03SimpleStatement start, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Map<BlockIdentifier, Op03SimpleStatement> postBlockCache) private static void
considerAsPathologicalLoop
(Op03SimpleStatement start, List<Op03SimpleStatement> statements) private static BlockIdentifier
considerAsWhileLoopStart
(Method method, Op03SimpleStatement start, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Map<BlockIdentifier, Op03SimpleStatement> postBlockCache) (package private) static boolean
containsTargetInBlock
(Op03SimpleStatement stm, BlockIdentifier block) private static Op03SimpleStatement
private static void
fixLoopOverlaps
(List<Op03SimpleStatement> statements, List<LoopIdentifier.LoopResult> loopResults, Set<BlockIdentifier> relevantBlocks) (package private) static Op03SimpleStatement
getCloseFwdJumpInto
(Op03SimpleStatement start, BlockIdentifier blockIdentifier, List<Op03SimpleStatement> statements, int startIdx, int lastIdx) static void
identifyLoops1
(Method method, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory) private static void
rewriteEndLoopOverlapStatement
(Op03SimpleStatement oldEnd, BlockIdentifier loopBlock) private static int
validateAndAssignLoopIdentifier
(List<Op03SimpleStatement> statements, int idxTestStart, int idxAfterEnd, BlockIdentifier blockIdentifier, Op03SimpleStatement start)
-
Constructor Details
-
LoopIdentifier
public LoopIdentifier()
-
-
Method Details
-
identifyLoops1
public static void identifyLoops1(Method method, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory) -
fixLoopOverlaps
private static void fixLoopOverlaps(List<Op03SimpleStatement> statements, List<LoopIdentifier.LoopResult> loopResults, Set<BlockIdentifier> relevantBlocks) -
rewriteEndLoopOverlapStatement
private static void rewriteEndLoopOverlapStatement(Op03SimpleStatement oldEnd, BlockIdentifier loopBlock) -
considerAsPathologicalLoop
private static void considerAsPathologicalLoop(Op03SimpleStatement start, List<Op03SimpleStatement> statements) -
considerAsDoLoopStart
private static BlockIdentifier considerAsDoLoopStart(Op03SimpleStatement start, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Map<BlockIdentifier, Op03SimpleStatement> postBlockCache) -
getCloseFwdJumpInto
static Op03SimpleStatement getCloseFwdJumpInto(Op03SimpleStatement start, BlockIdentifier blockIdentifier, List<Op03SimpleStatement> statements, int startIdx, int lastIdx) -
containsTargetInBlock
-
considerAsWhileLoopStart
private static BlockIdentifier considerAsWhileLoopStart(Method method, Op03SimpleStatement start, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Map<BlockIdentifier, Op03SimpleStatement> postBlockCache) -
findFirstConditional
-
validateAndAssignLoopIdentifier
private static int validateAndAssignLoopIdentifier(List<Op03SimpleStatement> statements, int idxTestStart, int idxAfterEnd, BlockIdentifier blockIdentifier, Op03SimpleStatement start)
-