public class ConditionalRewriter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
ConditionalRewriter.DiscoveredTernary |
private static class |
ConditionalRewriter.IsForwardIf |
Constructor and Description |
---|
ConditionalRewriter() |
Modifier and Type | Method and 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) |
public static void identifyNonjumpingConditionals(java.util.List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, Options options)
private static boolean considerAsTrivialIf(Op03SimpleStatement ifStatement, java.util.List<Op03SimpleStatement> statements)
private static boolean considerAsDexIf(Op03SimpleStatement ifStatement, java.util.List<Op03SimpleStatement> statements)
private static int findOverIdx(int startNext, java.util.List<Op03SimpleStatement> statements)
private static boolean isRangeOnlyReachable(int startIdx, int endIdx, int tgtIdx, java.util.List<Op03SimpleStatement> statements, java.util.Set<Op03SimpleStatement> permittedSources)
private static boolean detectAndRemarkJumpIntoOther(java.util.Set<BlockIdentifier> blocksAtStart, java.util.Set<BlockIdentifier> blocksAtEnd, Op03SimpleStatement realEnd, Op03SimpleStatement ifStatement)
private static boolean considerAsSimpleIf(Op03SimpleStatement ifStatement, java.util.List<Op03SimpleStatement> statements, BlockIdentifierFactory blockIdentifierFactory, java.util.Set<Op03SimpleStatement> ignoreTheseJumps, boolean reduceSimpleScope)
private static ConditionalRewriter.DiscoveredTernary testForTernary(java.util.List<Op03SimpleStatement> ifBranch, java.util.List<Op03SimpleStatement> elseBranch, Op03SimpleStatement leaveIfBranch)