Search in sources :

Example 1 with IntOperandInstruction

use of org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction in project freud by LMAX-Exchange.

the class AsmMethod method visitIntInsn.

public void visitIntInsn(final int opcodeUsed, final int operand) {
    final Opcode opcode = OPCODES_ARRAY[opcodeUsed];
    final Instruction instruction;
    if (opcode == Opcode.NEWARRAY) {
        instruction = new ReferenceOperandInstruction(instructionList.size(), opcode, currentLineNumber, NEWARRAY_TYPES[operand]);
    } else {
        instruction = new IntOperandInstruction(instructionList.size(), opcode, currentLineNumber, operand);
    }
    updateCurrentState(instruction);
}
Also used : IntOperandInstruction(org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction) ReferenceOperandInstruction(org.freud.analysed.classbytecode.method.instruction.ReferenceOperandInstruction) Opcode(org.freud.analysed.classbytecode.method.instruction.Opcode) Instruction(org.freud.analysed.classbytecode.method.instruction.Instruction) ReferenceOperandInstruction(org.freud.analysed.classbytecode.method.instruction.ReferenceOperandInstruction) VarInstruction(org.freud.analysed.classbytecode.method.instruction.VarInstruction) JumpInstruction(org.freud.analysed.classbytecode.method.instruction.JumpInstruction) ConstInstruction(org.freud.analysed.classbytecode.method.instruction.ConstInstruction) FieldInstruction(org.freud.analysed.classbytecode.method.instruction.FieldInstruction) IntOperandInstruction(org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction) MethodInvocationInstruction(org.freud.analysed.classbytecode.method.instruction.MethodInvocationInstruction)

Example 2 with IntOperandInstruction

use of org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction in project freud by LMAX-Exchange.

the class AsmMethod method visitIincInsn.

public void visitIincInsn(final int var, final int increment) {
    final Instruction instruction = new IntOperandInstruction(instructionList.size(), Opcode.IINC, currentLineNumber, increment);
    updateCurrentState(instruction);
}
Also used : IntOperandInstruction(org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction) Instruction(org.freud.analysed.classbytecode.method.instruction.Instruction) ReferenceOperandInstruction(org.freud.analysed.classbytecode.method.instruction.ReferenceOperandInstruction) VarInstruction(org.freud.analysed.classbytecode.method.instruction.VarInstruction) JumpInstruction(org.freud.analysed.classbytecode.method.instruction.JumpInstruction) ConstInstruction(org.freud.analysed.classbytecode.method.instruction.ConstInstruction) FieldInstruction(org.freud.analysed.classbytecode.method.instruction.FieldInstruction) IntOperandInstruction(org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction) MethodInvocationInstruction(org.freud.analysed.classbytecode.method.instruction.MethodInvocationInstruction)

Aggregations

ConstInstruction (org.freud.analysed.classbytecode.method.instruction.ConstInstruction)2 FieldInstruction (org.freud.analysed.classbytecode.method.instruction.FieldInstruction)2 Instruction (org.freud.analysed.classbytecode.method.instruction.Instruction)2 IntOperandInstruction (org.freud.analysed.classbytecode.method.instruction.IntOperandInstruction)2 JumpInstruction (org.freud.analysed.classbytecode.method.instruction.JumpInstruction)2 MethodInvocationInstruction (org.freud.analysed.classbytecode.method.instruction.MethodInvocationInstruction)2 ReferenceOperandInstruction (org.freud.analysed.classbytecode.method.instruction.ReferenceOperandInstruction)2 VarInstruction (org.freud.analysed.classbytecode.method.instruction.VarInstruction)2 Opcode (org.freud.analysed.classbytecode.method.instruction.Opcode)1