Class ConditionalRewriter
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.ConditionalRewriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
considerAsDexIf
(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements) private static boolean
considerAsSimpleIf
(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Set<Op03SimpleStatement> ignoreTheseJumps, boolean reduceSimpleScope) private static boolean
considerAsTrivialIf
(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements) private static boolean
detectAndRemarkJumpIntoOther
(Set<BlockIdentifier> blocksAtStart, Set<BlockIdentifier> blocksAtEnd, Op03SimpleStatement realEnd, Op03SimpleStatement ifStatement) private static int
findOverIdx
(int startNext, List<Op03SimpleStatement> statements) static void
identifyNonjumpingConditionals
(List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Options options) private static boolean
isRangeOnlyReachable
(int startIdx, int endIdx, int tgtIdx, List<Op03SimpleStatement> statements, Set<Op03SimpleStatement> permittedSources) private static ConditionalRewriter.DiscoveredTernary
testForTernary
(List<Op03SimpleStatement> ifBranch, List<Op03SimpleStatement> elseBranch, Op03SimpleStatement leaveIfBranch)
-
Constructor Details
-
ConditionalRewriter
public ConditionalRewriter()
-
-
Method Details
-
identifyNonjumpingConditionals
public static void identifyNonjumpingConditionals(List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Options options) -
considerAsTrivialIf
private static boolean considerAsTrivialIf(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements) -
considerAsDexIf
private static boolean considerAsDexIf(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements) -
findOverIdx
-
isRangeOnlyReachable
private static boolean isRangeOnlyReachable(int startIdx, int endIdx, int tgtIdx, List<Op03SimpleStatement> statements, Set<Op03SimpleStatement> permittedSources) -
detectAndRemarkJumpIntoOther
private static boolean detectAndRemarkJumpIntoOther(Set<BlockIdentifier> blocksAtStart, Set<BlockIdentifier> blocksAtEnd, Op03SimpleStatement realEnd, Op03SimpleStatement ifStatement) -
considerAsSimpleIf
private static boolean considerAsSimpleIf(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Set<Op03SimpleStatement> ignoreTheseJumps, boolean reduceSimpleScope) -
testForTernary
private static ConditionalRewriter.DiscoveredTernary testForTernary(List<Op03SimpleStatement> ifBranch, List<Op03SimpleStatement> elseBranch, Op03SimpleStatement leaveIfBranch)
-