branch
fun branch( method: MethodVisitor, instruction: L2Instruction, opcode: Int, success: L2PcOperand, failure: L2PcOperand, successCounter: LongAdder, failureCounter: LongAdder)
Content copied to clipboard
Emit code to conditionally branch to one of the specified program counters.
Parameters
method
The method into which the generated JVM instructions will be written.
instruction
The L2Instruction that includes the operands.
opcode
The JVM opcode, e.g., Opcodes.IFEQ, that decides between the two branch targets.
success
The L2PcOperand that specifies the branch target in the event that the opcode succeeds, i.e., actually branches.
failure
The L2PcOperand that specifies the branch target in the event that the opcode fails, i.e., does not actually branch and falls through to a branch.
success Counter
An LongAdder to increment each time the branch is taken.
failure Counter
An LongAdder to increment each time the branch falls through.