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