ShasamblyPrimitiveCastOpcode

Generator for primitive cast Opcodes.PRIMITIVE_CAST Casts the top value on the stack from and to the given primitive type.

Constructors

Link copied to clipboard
constructor(from: Int, to: Int)

Properties

Link copied to clipboard
val from: Int
Link copied to clipboard
open override val size: Int

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!

Link copied to clipboard
val to: Int

Functions

Link copied to clipboard
open override fun generate(gen: ShasamblyGenerator): ByteArray

Generates the ShasamblyOpcode Return's an array of it's bytes