goto

Branch to address

Bytecode

Type Description
u1 goto opcode = 0xA7 (167)
s2 branchoffset

Stack No change

Description

Causes execution to branch to the instruction at the address (pc + branchoffset), where pc is the address of the goto opcode in the bytecode and branchoffset is a 16-bit signed integer parameter that immediately follows the goto opcode in the bytecode.

The target address must be that of an opcode of an instruction within the method that contains this goto instruction.

Notes

Addresses are measured in bytes from the start of the bytecode - i.e. address 0 is the first byte in the bytecode of the currently executing method. The maximum address in a method is 65535.