Search in sources :

Example 1 with ShortArrayCodeInput

use of com.android.dx.io.instructions.ShortArrayCodeInput in project jadx by skylot.

the class InsnDecoder method decodeInsns.

public void decodeInsns(Code mthCode) throws DecodeException {
    short[] encodedInstructions = mthCode.getInstructions();
    int size = encodedInstructions.length;
    DecodedInstruction[] decoded = new DecodedInstruction[size];
    ShortArrayCodeInput in = new ShortArrayCodeInput(encodedInstructions);
    try {
        while (in.hasMore()) {
            decoded[in.cursor()] = DecodedInstruction.decode(in);
        }
    } catch (Exception e) {
        throw new DecodeException(method, "", e);
    }
    insnArr = decoded;
}
Also used : DecodedInstruction(com.android.dx.io.instructions.DecodedInstruction) FillArrayDataPayloadDecodedInstruction(com.android.dx.io.instructions.FillArrayDataPayloadDecodedInstruction) SparseSwitchPayloadDecodedInstruction(com.android.dx.io.instructions.SparseSwitchPayloadDecodedInstruction) PackedSwitchPayloadDecodedInstruction(com.android.dx.io.instructions.PackedSwitchPayloadDecodedInstruction) ShortArrayCodeInput(com.android.dx.io.instructions.ShortArrayCodeInput) DecodeException(jadx.core.utils.exceptions.DecodeException) DecodeException(jadx.core.utils.exceptions.DecodeException)

Aggregations

DecodedInstruction (com.android.dx.io.instructions.DecodedInstruction)1 FillArrayDataPayloadDecodedInstruction (com.android.dx.io.instructions.FillArrayDataPayloadDecodedInstruction)1 PackedSwitchPayloadDecodedInstruction (com.android.dx.io.instructions.PackedSwitchPayloadDecodedInstruction)1 ShortArrayCodeInput (com.android.dx.io.instructions.ShortArrayCodeInput)1 SparseSwitchPayloadDecodedInstruction (com.android.dx.io.instructions.SparseSwitchPayloadDecodedInstruction)1 DecodeException (jadx.core.utils.exceptions.DecodeException)1