mirror of
https://github.com/revanced/smali.git
synced 2025-05-08 10:24:31 +02:00
Deodex an invoke-object-init/range as a non-range invoke-virtual when possible
This commit is contained in:
parent
94565fa09e
commit
9743f4de0c
@ -1487,8 +1487,17 @@ public class MethodAnalyzer {
|
||||
private void analyzeInvokeObjectInitRange(@Nonnull AnalyzedInstruction analyzedInstruction, boolean analyzeResult) {
|
||||
Instruction3rc instruction = (Instruction3rc)analyzedInstruction.instruction;
|
||||
|
||||
Instruction3rc deodexedInstruction = new ImmutableInstruction3rc(Opcode.INVOKE_DIRECT_RANGE,
|
||||
instruction.getStartRegister(), instruction.getRegisterCount(), instruction.getReference());
|
||||
Instruction deodexedInstruction;
|
||||
|
||||
int startRegister = instruction.getStartRegister();
|
||||
int registerCount = instruction.getRegisterCount();
|
||||
if (registerCount == 1 && startRegister < 16) {
|
||||
deodexedInstruction = new ImmutableInstruction35c(Opcode.INVOKE_DIRECT,
|
||||
registerCount, startRegister, 0, 0, 0, 0, instruction.getReference());
|
||||
} else {
|
||||
deodexedInstruction = new ImmutableInstruction3rc(Opcode.INVOKE_DIRECT_RANGE,
|
||||
startRegister, registerCount, instruction.getReference());
|
||||
}
|
||||
|
||||
analyzedInstruction.setDeodexedInstruction(deodexedInstruction);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user