use of com.tencent.tinker.android.dx.instruction.InstructionPromoter in project tinker by Tencent.
the class InstructionTransformer method transform.
public short[] transform(short[] encodedInstructions) throws DexException {
ShortArrayCodeOutput out = new ShortArrayCodeOutput(encodedInstructions.length);
InstructionPromoter ipmo = new InstructionPromoter();
InstructionWriter iw = new InstructionWriter(out, ipmo);
InstructionReader ir = new InstructionReader(new ShortArrayCodeInput(encodedInstructions));
try {
// First visit, we collect mappings from original target address to promoted target address.
ir.accept(new InstructionTransformVisitor(ipmo));
// Then do the real transformation work.
ir.accept(new InstructionTransformVisitor(iw));
} catch (EOFException e) {
throw new DexException(e);
}
return out.getArray();
}
Aggregations