use of com.googlecode.dex2jar.ir.Trap in project dex2jar by pxb1988.
the class Dex2IRConverter method initExceptionHandlers.
private void initExceptionHandlers(DexCodeNode dexCodeNode, BitSet[] exBranch, BitSet handlers) {
if (dexCodeNode.tryStmts != null) {
for (TryCatchNode tcb : dexCodeNode.tryStmts) {
target.traps.add(new Trap(getLabel(tcb.start), getLabel(tcb.end), getLabels(tcb.handler), tcb.type));
for (DexLabel h : tcb.handler) {
handlers.set(indexOf(h));
}
int endIndex = indexOf(tcb.end);
for (int p = indexOf(tcb.start) + 1; p < endIndex; p++) {
DexStmtNode stmt = insnList.get(p);
if (stmt.op != null && stmt.op.canThrow()) {
BitSet x = exBranch[p];
if (x == null) {
x = exBranch[p] = new BitSet(insnList.size());
}
for (DexLabel h : tcb.handler) {
int hIndex = indexOf(h);
x.set(hIndex);
parentCount[hIndex]++;
}
}
}
}
}
}
Aggregations