Search in sources :

Example 26 with AugmentedStmt

use of soot.dava.internal.asg.AugmentedStmt in project soot by Sable.

the class ExceptionNode method dump.

public void dump() {
    logger.debug("try {");
    for (AugmentedStmt au : get_TryBody()) logger.debug("\t" + au);
    logger.debug("}");
    for (IterableSet<AugmentedStmt> catchBody : get_CatchList()) {
        logger.debug("catch " + get_ExceptionMap().get(catchBody) + " {");
        for (AugmentedStmt au : catchBody) logger.debug("\t" + au);
        logger.debug("}");
    }
}
Also used : AugmentedStmt(soot.dava.internal.asg.AugmentedStmt)

Example 27 with AugmentedStmt

use of soot.dava.internal.asg.AugmentedStmt in project soot by Sable.

the class MonitorConverter method convert.

public void convert(DavaBody body) {
    for (AugmentedStmt mas : body.get_MonitorFacts()) {
        MonitorStmt ms = (MonitorStmt) mas.get_Stmt();
        body.addToImportList("soot.dava.toolkits.base.DavaMonitor.DavaMonitor");
        ArrayList arg = new ArrayList();
        arg.add(ms.getOp());
        if (ms instanceof EnterMonitorStmt)
            mas.set_Stmt(new GInvokeStmt(new DVirtualInvokeExpr(new DStaticInvokeExpr(v.makeRef(), new ArrayList()), enter.makeRef(), arg, new HashSet<Object>())));
        else
            mas.set_Stmt(new GInvokeStmt(new DVirtualInvokeExpr(new DStaticInvokeExpr(v.makeRef(), new ArrayList()), exit.makeRef(), arg, new HashSet<Object>())));
    }
}
Also used : DVirtualInvokeExpr(soot.dava.internal.javaRep.DVirtualInvokeExpr) GInvokeStmt(soot.grimp.internal.GInvokeStmt) DStaticInvokeExpr(soot.dava.internal.javaRep.DStaticInvokeExpr) ArrayList(java.util.ArrayList) AugmentedStmt(soot.dava.internal.asg.AugmentedStmt) MonitorStmt(soot.jimple.MonitorStmt) EnterMonitorStmt(soot.jimple.EnterMonitorStmt) EnterMonitorStmt(soot.jimple.EnterMonitorStmt) HashSet(java.util.HashSet)

Aggregations

AugmentedStmt (soot.dava.internal.asg.AugmentedStmt)27 Stmt (soot.jimple.Stmt)16 ArrayList (java.util.ArrayList)12 List (java.util.List)9 DefinitionStmt (soot.jimple.DefinitionStmt)9 ASTNode (soot.dava.internal.AST.ASTNode)8 ASTStatementSequenceNode (soot.dava.internal.AST.ASTStatementSequenceNode)8 Value (soot.Value)7 Iterator (java.util.Iterator)6 Type (soot.Type)6 GInvokeStmt (soot.grimp.internal.GInvokeStmt)6 DVariableDeclarationStmt (soot.dava.internal.javaRep.DVariableDeclarationStmt)5 GAssignStmt (soot.grimp.internal.GAssignStmt)5 GReturnStmt (soot.grimp.internal.GReturnStmt)5 IntType (soot.IntType)4 ValueBox (soot.ValueBox)4 DecompilationException (soot.dava.DecompilationException)4 DAbruptStmt (soot.dava.internal.javaRep.DAbruptStmt)4 BooleanType (soot.BooleanType)3 ByteType (soot.ByteType)3