use of org.mapleir.ir.code.stmt.ThrowStmt in project maple-ir by LLVM-but-worse.
the class SSAGenPass method checkCloneHandler.
private boolean checkCloneHandler(BasicBlock b) {
if (b.isEmpty())
throw new IllegalArgumentException("empty block after split?");
// backwards iteration is faster
for (ListIterator<Stmt> it = b.listIterator(b.size()); it.hasPrevious(); ) {
Stmt stmt = it.previous();
if (stmt instanceof CopyVarStmt) {
CopyVarStmt copy = (CopyVarStmt) stmt;
int opc = copy.getExpression().getOpcode();
if (!copy.isSynthetic() && opc != Opcode.LOCAL_LOAD && opc != Opcode.CATCH)
return true;
} else if (stmt.canChangeFlow()) {
if (stmt instanceof ThrowStmt)
return true;
// no need to check child exprs as no complex subexprs can occur before propagation.
} else {
return true;
}
}
return false;
}
Aggregations