[Soot-list] Transform of call sites

Hal Hildebrand hal.hildebrand at gmail.com
Wed Jul 28 12:31:59 EDT 2010


On Jul 28, 2010, at 9:24 AM, Patrick Lam wrote:

> On 07/28/10 12:16, Hal Hildebrand wrote:
>>        Iterator statements = body.getUnits().snapshotIterator();
>>        while (statements.hasNext()) {
>>            Stmt stmt = (Stmt) statements.next();
>>            if (stmt instanceof InvokeStmt) {
>> 	
>>                ...  Case A
>> 
>>            } else if (stmt instanceof AssignStmt) {
>>                AssignStmt assign = (AssignStmt) stmt;
>>                if (assign.containsInvokeExpr()) {
>> 
>> 		    ... Case B
>> 
>>                }
>>            } else if (stmt.containsInvokeExpr()) {
>> 
>> 		... Case C
>> 
>>            }
> 
> I believe that the only statements which can contain invoke expressions are InvokeStmts and AssignStmts, so case C should never occur. Seems like you'd want to put your transformation code in the other two cases.

Excellent.  That was my observation, but the plural of anecdote is not data, so I wasn't convinced.  If this is indeed the case, then I don't have to do any transformations, as I can insert the code I need around these statements as is.

Thanks!



More information about the Soot-list mailing list