Record Class VmHandlers.Instruction
java.lang.Object
java.lang.Record
org.impulsegraph.vm.VmHandlers.Instruction
- Enclosing class:
VmHandlers
public static record VmHandlers.Instruction(byte opcode, byte flags, int dstReg, int payload)
extends Record
Decode instruction fields from 8-byte off-heap instruction segment or encoded
long.
-
Constructor Summary
ConstructorsConstructorDescriptionInstruction(byte opcode, byte flags, int dstReg, int payload) Creates an instance of aInstructionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdstReg()Returns the value of thedstRegrecord component.final booleanIndicates whether some other object is "equal to" this one.byteflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.byteopcode()Returns the value of theopcoderecord component.intpayload()Returns the value of thepayloadrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Instruction
public Instruction(byte opcode, byte flags, int dstReg, int payload) Creates an instance of aInstructionrecord class.- Parameters:
opcode- the value for theopcoderecord componentflags- the value for theflagsrecord componentdstReg- the value for thedstRegrecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
opcode
public byte opcode()Returns the value of theopcoderecord component.- Returns:
- the value of the
opcoderecord component
-
flags
public byte flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
dstReg
public int dstReg()Returns the value of thedstRegrecord component.- Returns:
- the value of the
dstRegrecord component
-
payload
public int payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-