[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is this a bug?
On Sun, Mar 21, 2004 at 08:57:20PM -0600, Venkatesh Prasad Ranganath wrote:
> Now this is strange. In jimple, one can load and release a method's body on a need basis. If so, why is it assumed that the
> concrete method will have an active body? Instead shouldn't the printer load the method body, print it, and release the
> method body?
This is not a bug. It is not true that a method body is retrieved
and released as needed. Retrieving a body is a complicated process
which takes a long time and involves doing many costly analyses and
transformations (all the ones in the jb pack), so it shouldn't be done
more than once. When running in whole-program mode, bodies are retrieved
only in the cg pack; otherwise, they are retrieved only immediately
before all the packs are run on that method. If you extend Soot in the
recommended way by subclassing its main class to add transformers and
using Soot's existing loading and pack scheduling code, it will ensure
that all the methods needed are retrieved. If you extend it in other
ways, you must ensure this yourself.
Ondrej
>
> Or am I missing something?
>
> waiting for reply,
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad
>