[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Escape Analysis using Soot



Hi Andy,

The approved way of attaching information to Soot objects is by using maps
to associate information with them.

We found in our previous project that it was bad news indeed to attach
data to McCAT objects directly.  It became quite painful, for instance, to
merge different extensions of an object.  Extending Value wouldn't work
because you'd need to change all of the objects which subclass Value. 

> for aliases and one for the escape state. I could use a map to associate
> my data with a Value (using the Value name as a key) but that's a pain;

Don't use the Value name as a key, use the Value itself.  This is the
approach we use internally, and it is a bit annoying because Java lacks
parametric polymorphism so that you have to use tons of type casts, but
it's not so bad otherwise.

pat