ShasamblyOpcodeJumpIfToRelativeIndex
open class ShasamblyOpcodeJumpIfToRelativeIndex(val relativeIndex: Int) : ShasamblyOpcodeJumpIf(source)
Generator for opcode Opcodes.JUMP_IF. Jumps to a relative opcode index if the byte (or boolean) on top of the stack is true (so it must not be 0x00)
You can use for Example
ShasamblyOpcodeJumpIfToRelativeIndex(-2)
Content copied to clipboard
to jump to the previous index or
ShasamblyOpcodeJumpIfToRelativeIndex(1)
Content copied to clipboard
to skip the next opcode
See also
Properties
Link copied to clipboard
Link copied to clipboard
Returns the size of the ShasamblyOpcode in bytes This is required by by the generate function of some opcodes because they have to resolve opcode indexes to byte indexes This value should be constant and not depend on other opcodes!