[Soot-list] Getting grimp aggregation from jimple

Archie Cobbs archie at dellroad.org
Sat Nov 20 21:25:42 EST 2004


Hi,

I'm looking at the idea of using Grimp aggregated code for JC
(http://jcvm.sourceforge.net) code generation instead of Jimple
code. This appears easy to do by simply invoking Grimp.v().newBody()
after all the other analysis steps.

However, when I do this, all the annotation tags from the prior
"jap" phase (e.g., array bounds checks and cast elimination) are
lost. So now I'm considering the best way to preserve this
information.

The first approach I've come up with is simply to copy over the
tags when creating Grimp Expr's and Stmt's from their Jimple versions.
However, the array bounds check tags and cast check tags are
associated with Stmt objects rather than Value objects, so this
doesn't quite work when you aggregate multiple Jimple statements
into a single Grimp statement.

This brings up the first question: wouldn't it be more correct to
associate "ArrayCheckTag" and "CastCheckTag" tags with Value objects
(ArrayRef and CastExpr objects, respectively) rather than the
enclosing Stmt objects?

And the second question: suppose I did this, then would carrying
these tags over into the Grimp equivalents affect their correctness
in any way? (It doesn't seem like it should)

Finally, would such a patch be acceptable to back-port into Soot?

Thanks for any advice,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com


More information about the Soot-list mailing list