Package soot.jimple

Examples of soot.jimple.LookupSwitchStmt


        m_labels.add(ifstmt.getTarget());
      } else if(curr instanceof GotoStmt){
        GotoStmt gotostmt = (GotoStmt) curr;
        m_labels.add(gotostmt.getTarget());
      } else if(curr instanceof LookupSwitchStmt){
        LookupSwitchStmt lookup = (LookupSwitchStmt) curr;
        addTargets(lookup.getTargets());
        m_labels.add(lookup.getDefaultTarget());
      } else if(curr instanceof TableSwitchStmt){
        TableSwitchStmt table = (TableSwitchStmt) curr;
        addTargets(table.getTargets());
      }
    }
View Full Code Here


               
                assertions.getWhenFalse().getLast().addSucc(translations.get(falseSuccessor).getFirst());
                assertions.getWhenTrue().getLast().addSucc(translations.get(trueSuccessor).getFirst());
            }
            else if (stmt instanceof LookupSwitchStmt) {
              LookupSwitchStmt sw = (LookupSwitchStmt)stmt;
             
              // add cases
              List<Integer> values = new ArrayList<Integer>();
              for (int i=0; i<sw.getTargetCount(); i++) {
                Stmt succ = (Stmt)sw.getTarget(i);
                AssertionBranch assertion = assertionCreator.createSwitchAssertions(sw.getKeyBox(), sw.getLookupValue(i), sw, assertionContext);
               
                tail.addSucc(assertion.getFirst());
                assertion.getLast().addSucc(translations.get(succ).getFirst());
               
                values.add(sw.getLookupValue(i));
              }
             
              // add default case
              AssertionBranch assertion = assertionCreator.createSwitchDefaultAssertions(sw.getKeyBox(), values, sw, assertionContext);
              tail.addSucc(assertion.getFirst());
              assertion.getLast().addSucc(translations.get(sw.getDefaultTarget()).getFirst());
            }
            else {
                // normal statement
              for (Unit succ : normalFlow.getSuccsOf(stmt)) {
                  tail.addSucc(translations.get(succ).getFirst());
View Full Code Here

TOP

Related Classes of soot.jimple.LookupSwitchStmt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.