public MethodAnalyzer(@Nonnull ClassPath classPath, @Nonnull Method method, @Nullable InlineMethodResolver inlineResolver, boolean normalizeVirtualMethods) { this.classPath = classPath; this.inlineResolver = inlineResolver; this.normalizeVirtualMethods = normalizeVirtualMethods; this.method = method; MethodImplementation methodImpl = method.getImplementation(); if (methodImpl == null) { throw new IllegalArgumentException("The method has no implementation"); } this.methodImpl = methodImpl; // Override AnalyzedInstruction and provide custom implementations of some of the methods, so that we don't // have to handle the case this special case of instruction being null, in the main class startOfMethod = new AnalyzedInstruction(this, new ImmutableInstruction10x(Opcode.NOP), -1, methodImpl.getRegisterCount()) { @Override protected boolean addPredecessor(AnalyzedInstruction predecessor) { throw new UnsupportedOperationException(); } @Override @Nonnull public RegisterType getPredecessorRegisterType(@Nonnull AnalyzedInstruction predecessor, int registerNumber) { throw new UnsupportedOperationException(); } }; buildInstructionList(); analyzedState = new BitSet(analyzedInstructions.size()); paramRegisterCount = MethodUtil.getParameterRegisterCount(method); analyze(); }
numParameterRegisters = MethodUtil.getParameterRegisterCount(method); if (!isStatic) { numParameterRegisters--;
method_stack.peek().isStatic = AccessFlags.STATIC.isSet(accessFlags); method_stack.peek().methodParameterRegisters = MethodUtil.getParameterRegisterCount((method_name_and_prototype69!=null?((smaliTreeWalker.method_name_and_prototype_return)method_name_and_prototype69).parameters:null), method_stack.peek().isStatic);
protoSection.getParameters(methodSection.getPrototype(methodKey))); writer.writeUshort(MethodUtil.getParameterRegisterCount(parameters, isStatic)); paramCount = ((VariableRegisterInstruction)instruction).getRegisterCount(); } else { paramCount = MethodUtil.getParameterRegisterCount(methodRef, InstructionUtil.isInvokeStatic(opcode));
public static int getParameterRegisterCount(@Nonnull MethodReference methodRef, boolean isStatic) { return getParameterRegisterCount(methodRef.getParameterTypes(), isStatic); }
public static int getParameterRegisterCount(@Nonnull MethodReference methodRef, boolean isStatic) { return getParameterRegisterCount(methodRef.getParameterTypes(), isStatic); }
public static int getParameterRegisterCount(@Nonnull Method method) { return getParameterRegisterCount(method, MethodUtil.isStatic(method)); }
public static int getParameterRegisterCount(@Nonnull MethodReference methodRef, boolean isStatic) { return getParameterRegisterCount(methodRef.getParameterTypes(), isStatic); }
public static int getParameterRegisterCount(@Nonnull Method method) { return getParameterRegisterCount(method, MethodUtil.isStatic(method)); }
public static int getParameterRegisterCount(@Nonnull Method method) { return getParameterRegisterCount(method, MethodUtil.isStatic(method)); }
paramRegisterCount = MethodUtil.getParameterRegisterCount(method); analyze();
public MethodAnalyzer(@Nonnull ClassPath classPath, @Nonnull Method method, @Nullable InlineMethodResolver inlineResolver, boolean normalizeVirtualMethods) { this.classPath = classPath; this.inlineResolver = inlineResolver; this.normalizeVirtualMethods = normalizeVirtualMethods; this.method = method; MethodImplementation methodImpl = method.getImplementation(); if (methodImpl == null) { throw new IllegalArgumentException("The method has no implementation"); } this.methodImpl = methodImpl; // Override AnalyzedInstruction and provide custom implementations of some of the methods, so that we don't // have to handle the case this special case of instruction being null, in the main class startOfMethod = new AnalyzedInstruction(this, new ImmutableInstruction10x(Opcode.NOP), -1, methodImpl.getRegisterCount()) { @Override protected boolean addPredecessor(AnalyzedInstruction predecessor) { throw new UnsupportedOperationException(); } @Override @Nonnull public RegisterType getPredecessorRegisterType(@Nonnull AnalyzedInstruction predecessor, int registerNumber) { throw new UnsupportedOperationException(); } }; buildInstructionList(); analyzedState = new BitSet(analyzedInstructions.size()); paramRegisterCount = MethodUtil.getParameterRegisterCount(method); analyze(); }
method_stack.peek().isStatic = AccessFlags.STATIC.isSet(accessFlags); method_stack.peek().methodParameterRegisters = MethodUtil.getParameterRegisterCount((method_name_and_prototype67!=null?((smaliTreeWalker.method_name_and_prototype_return)method_name_and_prototype67).parameters:null), method_stack.peek().isStatic);
method_stack.peek().isStatic = AccessFlags.STATIC.isSet(accessFlags); method_stack.peek().methodParameterRegisters = MethodUtil.getParameterRegisterCount((method_name_and_prototype69!=null?((smaliTreeWalker.method_name_and_prototype_return)method_name_and_prototype69).parameters:null), method_stack.peek().isStatic);
protoSection.getParameters(methodSection.getPrototype(methodKey))); writer.writeUshort(MethodUtil.getParameterRegisterCount(parameters, isStatic)); ReferenceInstruction refInsn = (ReferenceInstruction)instruction; MethodReference methodRef = (MethodReference)refInsn.getReference(); int paramCount = MethodUtil.getParameterRegisterCount(methodRef, InstructionUtil.isInvokeStatic(instruction.getOpcode())); if (paramCount > outParamCount) { outParamCount = paramCount;
protoSection.getParameters(methodSection.getPrototype(methodKey))); writer.writeUshort(MethodUtil.getParameterRegisterCount(parameters, isStatic)); paramCount = ((VariableRegisterInstruction)instruction).getRegisterCount(); } else { paramCount = MethodUtil.getParameterRegisterCount(methodRef, InstructionUtil.isInvokeStatic(opcode));