[Soot-list] Jimple Code cleaned for redundant variables

Patrick Lam plam at sable.mcgill.ca
Thu Jul 7 10:55:47 EDT 2011


On 07/07/11 10:37, John Dee wrote:
> Hi there.
>
> I read in the 'Soot Survivors Guide' that Jimple code is '/cleaned for
> redundant code, like unused variables or assignments/' (on page 9).
>
> Supposing I have
>
> public class Foo {
> private int x;
> private int y;
>
> public Foo() {
> y = 10;
> }
>
> public void fooBar() {
> int j = ++y;
> System.out.println("J is " + j);
> }
> }
>
> Does this mean that the variable 'x', since it is unused or
> uninitialised, it will not be accessible from
> the Jimple code?

Local variables only, not fields.

pat



More information about the Soot-list mailing list