Package sootup.interceptors
Class DeadAssignmentEliminator
java.lang.Object
sootup.interceptors.DeadAssignmentEliminator
- All Implemented Interfaces:
BodyInterceptor
This interceptor eliminates assignment statements to locals whose values are not subsequently
used, unless evaluating the right-hand side of the assignment may cause side-effects. Complexity
is linear with respect to the statements.
- Author:
- Marcus Nachtigall
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
interceptBody
(Body.BodyBuilder builder, View view) Takes a BodyBuilder and may apply a transformation to it, for example removing unused local variables.
-
Constructor Details
-
DeadAssignmentEliminator
public DeadAssignmentEliminator() -
DeadAssignmentEliminator
public DeadAssignmentEliminator(boolean eliminateOnlyStackLocals)
-
-
Method Details
-
interceptBody
Description copied from interface:BodyInterceptor
Takes a BodyBuilder and may apply a transformation to it, for example removing unused local variables.- Specified by:
interceptBody
in interfaceBodyInterceptor
-