[Soot-list] Inserting RuntimeVisibleTypeAnnotations using Soot

7 views
Skip to first unread message

Shreyansh Kulshreshtha

unread,
Mar 7, 2021, 8:52:13 AM3/7/21
to soot...@cs.mcgill.ca
Dear All

I am working on a project in which I have to insert certain annotations using soot similar to the one in https://github.com/beehive-lab/TornadoVM/blob/master/examples/src/main/java/uk/ac/manchester/tornado/examples/Saxpy.java.
for (@Parallel int i = 0; i < y.length; i++) {
            y[i] = alpha * x[i];
}


I checked the .class file for the representation of annotations in the bytecode using javap and found the following in the saxpy function.
RuntimeVisibleTypeAnnotations:
        0: #52(): LOCAL_VARIABLE, {start_pc=14, length=27, index=5}
          uk.ac.manchester.tornado.api.annotations.Parallel

But on using method.getTags() ,I am only getting the name of the annotation (VisibilityLocalVariableAnnotationTag), but no other information is visible there. 

Can you please help me read these annotations as well as insert them using soot?

--
Regards

Shreyansh Kulshreshtha
Reply all
Reply to author
Forward
0 new messages