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

Simple inlining question



Hello,

I have a (hopefully) simple question about inlining. I use Soot
from within an application (not from the command line), and invoke
the optimzations via this method:

    public class MyClass() {
	public static void optimize(JimpleBody body) {
		PackManager.v().getPack("jtp").apply(body);
		PackManager.v().getPack("jop").apply(body);
	}
    }

What I would like to do is add "simple" inlining to the above
optimizations. That is, I'd like to have Soot look at all call
sites and inline those whose target is either a static, private,
or final method (i.e., known target) and is suitable for inlining
(e.g., fairly short, not INVOKESPECIAL, etc).

It looks like the soot.jimple.toolkits.invoke has all the logic
for this. I just need to know how to turn it on in the above method.
Any easy answers appreciated :-)

Thanks,
-Archie

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