Search in sources :

Example 1 with AbstractPayload

use of soot.toDex.instructions.AbstractPayload in project soot by Sable.

the class StmtVisitor method addPayloads.

private void addPayloads() {
    // add switch payloads to the end of the insns
    for (AbstractPayload payload : payloads) {
        addInsn(new AddressInsn(payload), null);
        addInsn(payload, null);
    }
}
Also used : AddressInsn(soot.toDex.instructions.AddressInsn) AbstractPayload(soot.toDex.instructions.AbstractPayload)

Example 2 with AbstractPayload

use of soot.toDex.instructions.AbstractPayload in project soot by Sable.

the class StmtVisitor method getRealInsns.

public List<BuilderInstruction> getRealInsns(LabelAssigner labelAssigner) {
    List<BuilderInstruction> finalInsns = new ArrayList<BuilderInstruction>();
    for (Insn i : insns) {
        if (i instanceof AddressInsn) {
            // skip non-insns
            continue;
        }
        BuilderInstruction realInsn = i.getRealInsn(labelAssigner);
        finalInsns.add(realInsn);
        if (insnStmtMap.containsKey(i)) {
            // get tags
            instructionInsnMap.put(realInsn, i);
        }
        LocalRegisterAssignmentInformation assignmentInfo = insnRegisterMap.get(i);
        if (assignmentInfo != null)
            instructionRegisterMap.put(realInsn, assignmentInfo);
        if (i instanceof AbstractPayload)
            instructionPayloadMap.put(realInsn, (AbstractPayload) i);
    }
    return finalInsns;
}
Also used : AddressInsn(soot.toDex.instructions.AddressInsn) Insn(soot.toDex.instructions.Insn) BuilderInstruction(org.jf.dexlib2.builder.BuilderInstruction) ArrayList(java.util.ArrayList) AddressInsn(soot.toDex.instructions.AddressInsn) AbstractPayload(soot.toDex.instructions.AbstractPayload)

Aggregations

AbstractPayload (soot.toDex.instructions.AbstractPayload)2 AddressInsn (soot.toDex.instructions.AddressInsn)2 ArrayList (java.util.ArrayList)1 BuilderInstruction (org.jf.dexlib2.builder.BuilderInstruction)1 Insn (soot.toDex.instructions.Insn)1