[Soot-list] annotation bug? (was: Java 1.5 annotations)

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Apr 30 13:31:30 EDT 2008


>  Glad to hear it!  I should clarify that I was using revision 3198 before
> and that I was not exercising the new frontend, so my main concern is the
> output issue.

Ok, a little update on that: As it seems at the moment, the Jasmin
parser is just utterly broken. I am surprised that nobody realized
this before. I will try to fix this during the next days but it may
take a bit as I have other stuff on my work list, too.


>  Would it be possible to annotate Jimple locals and then have these
> annotations preserved in the class file?  (Or, more generally, to support
> local variable annotations only on code exclusively generated by and
> processed by Soot?)  This would make some things easier for me.  If not, I
> can find a workaround.

I would rather not want to introduce such support. Even in Sun made
the same decision:

http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html
"If m has an element whose value is annotation.RetentionPolicy.CLASS,
or annotation.RetentionPolicy.RUNTIME a Java compiler must ensure that
a is represented in the binary representation of the class or
interface in which a appears, unless m annotates a local variable
declaration. An annotation on a local variable declaration is never
retained in the binary representation."

They apparently also found no solution for a clear representation. I
think those people know Java quite well and therefore I would conclude
that there *is* no clear representation. Therefore I would rather ask
you to work around it somehow differently.

Eric


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list