Search in sources :

Example 1 with Label

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

the class AsmMethod method visitJumpInsn.

public void visitJumpInsn(final int opcode, final org.objectweb.asm.Label asmLabel) {
    Label label = declareLabel(asmLabel);
    //        System.out.println(name + " " + OPCODES_ARRAY[opcode] + " " + asmLabel + " " + label);
    final Instruction instruction = new JumpInstruction(instructionList.size(), OPCODES_ARRAY[opcode], currentLineNumber, label);
    updateCurrentState(instruction);
}
Also used : Label(org.freud.analysed.classbytecode.method.instruction.Label) 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) JumpInstruction(org.freud.analysed.classbytecode.method.instruction.JumpInstruction)

Example 2 with Label

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

the class AsmMethod method visitLabel.

public void visitLabel(final org.objectweb.asm.Label asmLabel) {
    final Label label = declareLabel(asmLabel);
    label.declare(instructionList.size());
    final String handledType = label.getHandledType();
    if (handledType != null) {
        currentOperandStack = new StaticOperandStack(handledType, currentOperandStack, null);
    }
}
Also used : StaticOperandStack(org.freud.analysed.classbytecode.method.instruction.StaticOperandStack) Label(org.freud.analysed.classbytecode.method.instruction.Label)

Aggregations

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