[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Soot structure
On Thu, 22 May 2003, Christophe Massol wrote:
> Hello,
>
> In the Soot Structure does a Ref element (like InstanceFieldRef) which
> references a Field (per example) is a single element which is referenced by
> mutilple statments or does soot create a Ref expr (with the same field link)
> for each Statement ?
If you'll look at soot.coffi.CFG, you'll see that every time Soot
encounters a PUTFIELD or a GETFIELD, it instantiates a new
InstanceFieldRef. The Jimple parser does the same thing.
Since InstanceFieldRefs are mutable, it's probably not a good idea to
share InstanceFieldRefs between two different statements in code that you
generate, even if Soot uses Boxes.
pat