[Soot-list] Help with Chains

Richard Warburton richard.warburton at gmail.com
Fri Nov 30 10:18:15 EST 2007


Judging from some of the sample optimistions that come with soot the
preferred way to replace statement x within a method (where locals is
its local chain) by statement y is by performing the call:

locals.swapWith(x,y);

Unfortunately when trying to do this within an optimisation I am
looking at I appear to get a NullPointerException from line 169 of
soot.util.HashChain.  Looking at the source of HashChain doens't
suggest anything obviously wrong to me.  Neither x, y nor locals are
null.  Furthermore up to this point nothing has actually been done
with the Jimple IR (ie this is the first transformation in the
program).  It is consequently very unclear what is actually going
wrong here.  Does anyone have any suggestions?

  Richard Warburton


More information about the Soot-list mailing list