[Soot-list] Extract method with preserved jumps

Attila Bartha at.bartha at gmail.com
Wed Nov 25 09:18:29 EST 2009


Hi

 

I am trying to extract selected Jimple code into a new method, i.e. move a
range of units from body A to a new method's body B.

Adding the units to the B's unit chain works fine. Jumps are preserved.

However, when I remove those units form A's unit chain, the jumps are
removed, too. Thus, it changes the units in B!

This is probably because PatchingChain remove(Object) calls
((Unit)obj).redirectJumpsToThisTo(successor); , and there is no alternative
remove method.

 

How can I make sure that the jumps are preserved when removing them from A?

Is there such an example in one of the existing transformations?

Or can it be fixed by replacing A's unit chain with a new one to avoid
having to call remove() ?

 

Regards

 

Attila

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20091125/c7921061/attachment.html 


More information about the Soot-list mailing list