BytecodeArray code = meth.getCode();
ByteArray bytes = code.getBytes();
TranslationAdvice advice = DexTranslationAdvice.THE_ONE;
RopMethod rmeth =
Ropper.convert(meth, advice);
StringBuffer sb = new StringBuffer(2000);
if (optimize) {
boolean isStatic = AccessFlags.isStatic(meth.getAccessFlags());
int paramWidth = computeParamWidth(meth, isStatic);
rmeth = Optimizer.optimize(rmeth, paramWidth, isStatic, true,
advice);
}
BasicBlockList blocks = rmeth.getBlocks();
sb.append("first " + Hex.u2(rmeth.getFirstLabel()) + "\n");
int sz = blocks.size();
for (int i = 0; i < sz; i++) {
BasicBlock bb = blocks.get(i);
int label = bb.getLabel();
sb.append("block ");
sb.append(Hex.u2(label));
sb.append("\n");
IntList preds = rmeth.labelToPredecessors(label);
int psz = preds.size();
for (int j = 0; j < psz; j++) {
sb.append(" pred ");
sb.append(Hex.u2(preds.get(j)));
sb.append("\n");