[Soot-list] JDK 1.6 support

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Dec 22 05:16:01 EST 2010


Hello Heejong.

I have successfully used soot with both Java 6 and Java 7 bytecode
without any problems. What particular support are you looking for?

> (And any plan to support JDK 1.7? JDK 1.7 is scheduled to release next
> summer)

I had a student (Matthias Perner) work on support for Java 7
invokedynamic bytecodes. It's already part of Soot (see below). The
only other changes Soot would require for Java 7 are minor syntactic
sugar introduced by Project Coin (but even that only if you use Soot
on source code, which most people don't). I have not looked into this
yet, as the Project Coin proposal is not even finalized yet. It would
be great if there was somebody to volunteer for implementing these
syntactic changes, though.

Excerpt from our CHANGES document:
====================================

6. Thanks to Matthias Perner, added support for handling invokedynamic
   instructions. The instructions are handled as follows:
   - On the Jimple, Grimp and Baf level, invokedynamic instructions
     appear as DynamicInvokeExpr with a static SootMethodRef that
     has class java.dyn.InvokeDynamic as target class. This is in
     accordance with the internal handling in JDK 7.
   - SootMethodRefs which have java.dyn.InvokeDynamic as target class
     may not be resolved: calling resolve() will throw an exception
   - On the Jasmin level, invokedynamic instruction appear in the
   	 form "invokedynamic <methodName>(<methodParams>)<methodRetType>".
   	 In particular, there is no target class given.
   - Jasmin translates this into an invokedynamic instruction with
     two arguments:
     a) a NameAndType attribute referring to
        <methodName>(<methodParams>)<methodRetType> and
     b) the constant "0" (two zero bytes, i.e., a short);
        according to the VM spec this is reserved for future use
====================================

Eric


More information about the Soot-list mailing list