Package jadx.core.dex.visitors.shrink
Class CodeShrinkVisitor
java.lang.Object
jadx.core.dex.visitors.AbstractVisitor
jadx.core.dex.visitors.shrink.CodeShrinkVisitor
- All Implemented Interfaces:
IDexTreeVisitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanassignInline(MethodNode mth, RegisterArg arg, InsnNode assignInsn, BlockNode assignBlock) private static booleancanMoveBetweenBlocks(MethodNode mth, InsnNode assignInsn, BlockNode assignBlock, BlockNode useBlock, InsnNode useInsn) private static voidcheckInline(MethodNode mth, BlockNode block, InsnList insnList, List<WrapInfo> wrapList, ArgsInfo argsInfo, RegisterArg arg) private static booleancheckLambdaInline(RegisterArg arg, InsnNode assignInsn) Forbid inline lambda into invoke as an instance arg, i.e.private static booleaninline(MethodNode mth, RegisterArg arg, InsnNode insn, BlockNode block) private static booleansearchArgWithName(InsnNode assignInsn, String varName) private static voidshrinkBlock(MethodNode mth, BlockNode block) static voidshrinkMethod(MethodNode mth) private static voidsimplifyMoveInsns(MethodNode mth, BlockNode block) private static booleanvarWithSameNameExists(MethodNode mth, SSAVar inlineVar) voidvisit(MethodNode mth) Visit methodMethods inherited from class jadx.core.dex.visitors.AbstractVisitor
getName, init, toString, visit
-
Constructor Details
-
CodeShrinkVisitor
public CodeShrinkVisitor()
-
-
Method Details
-
visit
Description copied from interface:IDexTreeVisitorVisit method- Specified by:
visitin interfaceIDexTreeVisitor- Overrides:
visitin classAbstractVisitor
-
shrinkMethod
-
shrinkBlock
-
checkInline
private static void checkInline(MethodNode mth, BlockNode block, InsnList insnList, List<WrapInfo> wrapList, ArgsInfo argsInfo, RegisterArg arg) -
checkLambdaInline
Forbid inline lambda into invoke as an instance arg, i.e. this will not compile:() -> { ... }.apply(); -
varWithSameNameExists
-
searchArgWithName
-
assignInline
private static boolean assignInline(MethodNode mth, RegisterArg arg, InsnNode assignInsn, BlockNode assignBlock) -
inline
-
canMoveBetweenBlocks
private static boolean canMoveBetweenBlocks(MethodNode mth, InsnNode assignInsn, BlockNode assignBlock, BlockNode useBlock, InsnNode useInsn) -
simplifyMoveInsns
-