Class ConditionalRewriter
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.ConditionalRewriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanconsiderAsDexIf(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements) private static booleanconsiderAsSimpleIf(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Set<Op03SimpleStatement> ignoreTheseJumps, boolean reduceSimpleScope) private static booleanconsiderAsTrivialIf(Op03SimpleStatement ifStatement, List<Op03SimpleStatement> statements) private static booleandetectAndRemarkJumpIntoOther(Set<BlockIdentifier> blocksAtStart, Set<BlockIdentifier> blocksAtEnd, Op03SimpleStatement realEnd, Op03SimpleStatement ifStatement) private static intfindOverIdx(int startNext, List<Op03SimpleStatement> statements) static voididentifyNonjumpingConditionals(List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Options options) private static booleanisRangeOnlyReachable(int startIdx, int endIdx, int tgtIdx, List<Op03SimpleStatement> statements, Set<Op03SimpleStatement> permittedSources) private static ConditionalRewriter.DiscoveredTernarytestForTernary(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)
-