FRigVMByteCode

The [FRigVMByteCode](API\Runtime\RigVM\RigVMCore\FRigVMByteCode) is a container to store a list of instructions with their corresponding data.

Windows
MacOS
Linux

References

Module

RigVM

Header

/Engine/Source/Runtime/RigVM/Public/RigVMCore/RigVMByteCode.h

Include

#include "RigVMCore/RigVMByteCode.h"

Syntax

struct FRigVMByteCode

Remarks

The FRigVMByteCode is a container to store a list of instructions with their corresponding data. The byte code is then used within a VM to execute. To iterate over the instructions within the byte code you can use GetInstructions() to retrieve a FRigVMInstructionArray.

Constructors

Name Description

Public function

FRigVMByteCode()

Functions

Name Description

Public function

uint64

 

AddChangeTypeOp

(
    FRigVMOperand InArg,
    ERigVMRegisterType InType,
    uint16 InElementSize,
    uint16 InElementCount,
    uint16 InSliceCount
)

Adds a change-type operator to reuse a register for a smaller or same size type

Public function

uint64

 

AddCopyOp

(
    const FRigVMOperand& InSource,
    const FRigVMOperand& InTarget
)

Adds a copy operator to copy the content of a source argument to a target argument

Public function

uint64

 

AddDecrementOp

(
    const FRigVMOperand& InArg
)

Adds an decrement operator to decrement a int32 argument

Public function

uint64

 

AddEqualsOp

(
    const FRigVMOperand& InA,
    const FRigVMOperand& InB,
    const FRigVMOperand& InResult
)

Adds an equals operator to store the comparison result of A and B into a Result argument

Public function

uint64

 

AddExecuteOp

(
    uint16 InFunctionIndex,
    const TArrayView< FRigVMOperand >&...
)

Adds an execute operator given its function index operands

Public function

uint64

 

AddExitOp()

Adds an exit operator to exit the execution loop

Public function

uint64

 

AddFalseOp

(
    const FRigVMOperand& InArg
)

Adds a false operator to set a given argument to false

Public function

uint64

 

AddIncrementOp

(
    const FRigVMOperand& InArg
)

Adds an increment operator to increment a int32 argument

Public function

uint64

 

AddJumpIfOp

(
    ERigVMOpCode InOpCode,
    uint16 InInstructionIndex,
    const FRigVMOperand& InConditionAr...,
    bool bJumpWhenConditionIs
)

Adds an absolute, forward or backward jump operator based on a condition argument

Public function

uint64

 

AddJumpOp

(
    ERigVMOpCode InOpCode,
    uint16 InInstructionIndex
)

Adds an absolute, forward or backward jump operator

Public function

uint64

 

AddNotEqualsOp

(
    const FRigVMOperand& InA,
    const FRigVMOperand& InB,
    const FRigVMOperand& InResult
)

Adds an not-equals operator to store the comparison result of A and B into a Result argument

Public function

uint64

 

AddTrueOp

(
    const FRigVMOperand& InArg
)

Adds a true operator to set a given argument to true

Public function

uint64

 

AddZeroOp

(
    const FRigVMOperand& InArg
)

Adds a zero operator to zero the memory of a given argument

Public function

void

 

Empty()

Resets the container and removes all memory

Public function Const

const TArray...

 

GetByteCode()

Returns the raw data of the byte code

Public function Const

FRigVMInstru...

 

GetInstructions()

Returns an instruction array for iterating over all operators

Public function Const

const OpType...

 

GetOpAt

(
    uint64 InByteCodeIndex
)

Returns an operator at a given byte code index

Public function Const

const OpType...

 

GetOpAt

(
    const FRigVMInstruction& InInstruc...
)

Returns an operator for a given instruction

Public function Const

ERigVMOpCode

 

GetOpCodeAt

(
    uint64 InByteCodeIndex
)

Returns the opcode at a given byte index

Public function Const

TArrayView< ...

 

GetOperandsAt

(
    uint64 InByteCodeIndex,
    uint16 InArgumentCount
)

Returns a list of operands at a given byte code index

Public function Const

TArrayView< ...

 

GetOperandsForExecuteOp

(
    uint64 InByteCodeIndex
)

Returns the operands for an execute operator / instruction at a given byte code index

Public function Const

TArrayView< ...

 

GetOperandsForExecuteOp

(
    const FRigVMInstruction& InInstruc...
)

Returns the operands for a given execute instruction

Public function Const

uint64

 

GetOpNumBytesAt

(
    uint64 InByteCodeIndex,
    bool bIncludeOperands
)

Returns the size of the operator in bytes at a given byte index

Public function Const

FRigVMByteCo...

 

GetStatistics()

Returns the statistics information

Public function Const

uint64

 

Num()

Returns the number of instructions in this container

Public function

void

 

Reset()

Resets the container and maintains all memory

Public function

bool

 

Serialize

(
    FArchive& Ar
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss