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 classConditionalRewriter.DiscoveredTernaryprivate static classConditionalRewriter.IsForwardIf
-
Constructor Summary
Constructors Constructor Description ConditionalRewriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static booleanconsiderAsDexIf(Op03SimpleStatement ifStatement, java.util.List<Op03SimpleStatement> statements)private static booleanconsiderAsSimpleIf(Op03SimpleStatement ifStatement, java.util.List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, java.util.Set<Op03SimpleStatement> ignoreTheseJumps, boolean reduceSimpleScope)private static booleanconsiderAsTrivialIf(Op03SimpleStatement ifStatement, java.util.List<Op03SimpleStatement> statements)private static booleandetectAndRemarkJumpIntoOther(java.util.Set<BlockIdentifier> blocksAtStart, java.util.Set<BlockIdentifier> blocksAtEnd, Op03SimpleStatement realEnd, Op03SimpleStatement ifStatement)private static intfindOverIdx(int startNext, java.util.List<Op03SimpleStatement> statements)static voididentifyNonjumpingConditionals(java.util.List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Options options)private static booleanisRangeOnlyReachable(int startIdx, int endIdx, int tgtIdx, java.util.List<Op03SimpleStatement> statements, java.util.Set<Op03SimpleStatement> permittedSources)private static ConditionalRewriter.DiscoveredTernarytestForTernary(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)
-
-