Navigation
API > API/Plugins > API/Plugins/RigVM > API/Plugins/RigVM/RigVMCore
References
| Module | RigVM |
| Header | /Engine/Plugins/Runtime/RigVM/Source/RigVM/Public/RigVMCore/RigVMByteCode.h |
| Include | #include "RigVMCore/RigVMByteCode.h" |
Syntax
USTRUCT&40;&41;
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
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| uint64 | AddBeginBlockOp
(
FRigVMOperand InCountArg, |
Adds an operator to end the last memory slice | |
| int32 | AddBranchInfo
(
const FName& InBranchLabel, |
Adds information about a branch for an instruction's argument | |
| int32 | AddBranchInfo
(
const FRigVMBranchInfo& InBranchInfo |
Adds information about a branch for an instruction's argument | |
| uint64 | AddCopyOp
(
const FRigVMOperand& InSource, |
Adds a copy operator to copy the content of a source argument to a target argument | |
| uint64 | AddCopyOp
(
const FRigVMCopyOp& InCopyOp |
Adds a copy operator to copy the content of a source argument to a target argument | |
| uint64 | AddDecrementOp
(
const FRigVMOperand& InArg |
Adds an decrement operator to decrement a int32 argument | |
| uint64 | Adds an operator to end the last memory slice | ||
| uint64 | AddEqualsOp
(
const FRigVMOperand& InA, |
Adds an equals operator to store the comparison result of A and B into a Result argument | |
| uint64 | AddExecuteOp
(
uint16 InFunctionIndex, |
Adds an execute operator given its function index operands | |
| uint64 | AddExitOp () |
Adds an exit operator to exit the execution loop | |
| uint64 | AddFalseOp
(
const FRigVMOperand& InArg |
Adds a false operator to set a given argument to false | |
| uint64 | AddIncrementOp
(
const FRigVMOperand& InArg |
Adds an increment operator to increment a int32 argument | |
| uint64 | AddInvokeEntryOp
(
const FName& InEntryName |
Adds an invoke entry operator | |
| uint64 | AddJumpIfOp
(
ERigVMOpCode InOpCode, |
Adds an absolute, forward or backward jump operator based on a condition argument | |
| uint64 | AddJumpOp
(
ERigVMOpCode InOpCode, |
Adds an absolute, forward or backward jump operator | |
| uint64 | AddJumpToBranchOp
(
FRigVMOperand InBranchNameArg, |
Adds a jump to branch operator | |
| uint64 | AddNotEqualsOp
(
const FRigVMOperand& InA, |
Adds an not-equals operator to store the comparison result of A and B into a Result argument | |
| int32 | AddPredicateBranch
(
const FRigVMPredicateBranch& InPredicateBranch |
Adds information about a predicate branch for an instruction | |
| uint64 | AddTrueOp
(
const FRigVMOperand& InArg |
Adds a true operator to set a given argument to true | |
| uint64 | AddZeroOp
(
const FRigVMOperand& InArg |
Adds a zero operator to zero the memory of a given argument | |
| FString | DumpToText () |
||
| void | Empty () |
Resets the container and removes all memory | |
| int32 | FindEntryIndex
(
const FName& InEntryName |
Returns the index of an entry given a name or INDEX_NONE | |
| TArray< int32 > | GetAllInstructionIndicesForCallPath
(
const FString& InCallPath, |
Returns all found instruction indices for a given callpath | |
| const TArray< int32 > & | GetAllInstructionIndicesForCallstack
(
const TArray< UObject* >& InCallstack |
Returns all found instruction indices for a given callpath | |
| const TArray< int32 > & | GetAllInstructionIndicesForSubject
(
UObject* InSubject |
Returns all found instruction indices for a given subject | |
| const TArrayView< const uint8 > | GetByteCode () |
Returns the raw data of the byte code | |
| uint32 | Returns a unique hash identifying this bytecode | ||
| FString | GetCallPathForInstruction
(
int32 InInstructionIndex |
Returns the callpath which was used to inject a given instruction | |
| const TArray< UObject * > * | GetCallstackForInstruction
(
int32 InInstructionIndex |
Returns the callstack which was used to inject a given instruction | |
| uint32 | GetCallstackHash
(
const TArrayView< UObject*const >& InCallstack |
Computes a hash for a given callstack | |
| uint32 | GetCallstackHash
(
const TArray< UObject* >& InCallstack |
Computes a hash for a given callstack | |
| uint32 | GetCallstackHashForInstruction
(
int32 InInstructionIndex |
Returns the callstack hash which was used to inject a given instruction | |
| const FRigVMByteCodeEntry & | GetEntry
(
int32 InEntryIndex |
Returns the entry with a given index | |
| int32 | GetFirstInstructionIndexForCallPath
(
const FString& InCallPath, |
Returns the first hit instruction index for a given callpath (or INDEX_NONE) | |
| int32 | GetFirstInstructionIndexForCallstack
(
const TArray< UObject* >& InCallstack |
Returns the first hit instruction index for a given callpath (or INDEX_NONE) | |
| int32 | GetFirstInstructionIndexForSubject
(
UObject* InSubject |
Returns the first hit instruction index for a given subject (or INDEX_NONE) | |
| uint64 | GetFirstOperandByteIndex
(
const FRigVMInstruction& InInstruction |
Returns the byte index of the first operand for this instructions | |
| FRigVMOperandArray | GetInputOperands
(
int32 InInstructionIndex |
Returns the input operands of a given instruction | |
| FRigVMInstructionArray | Returns an instruction array for iterating over all operators | ||
| TArray< int32 > | GetInstructionsForOperand
(
const FRigVMOperand& InOperand |
Returns all of the operands for a given instruction | |
| int32 | Returns the number of instructions within this byte code | ||
| uint64 | GetOpAlignment
(
ERigVMOpCode InOpCode |
Returns the alignment for an operator given its opcode | |
| OpType & | GetOpAt
(
const FRigVMInstruction& InInstruction |
Returns an operator for a given instruction | |
| const OpType & | GetOpAt
(
const FRigVMInstruction& InInstruction |
Returns an operator for a given instruction | |
| const OpType & | GetOpAt
(
uint64 InByteCodeIndex |
Returns an operator at a given byte code index | |
| OpType & | GetOpAt
(
uint64 InByteCodeIndex |
Returns an operator at a given byte code index | |
| ERigVMOpCode | GetOpCodeAt
(
uint64 InByteCodeIndex |
Returns the opcode at a given byte index | |
| uint64 | Returns the alignment for an operand | ||
| FRigVMOperandArray | GetOperandsAt
(
uint64 InByteCodeIndex, |
Returns a list of operands at a given byte code index | |
| FRigVMOperandArray | GetOperandsForExecuteOp
(
const FRigVMInstruction& InInstruction |
Returns the operands for a given execute instruction | |
| FRigVMOperandArray | GetOperandsForOp
(
const FRigVMInstruction& InInstruction |
Returns all of the operands for a given instruction | |
| uint32 | GetOperatorHash
(
const FRigVMInstruction& InInstruction |
Returns a unique hash for an operator at a given instruction index | |
| uint64 | GetOpNumBytesAt
(
uint64 InByteCodeIndex, |
Returns the size of the operator in bytes at a given byte index | |
| FRigVMOperandArray | GetOutputOperands
(
int32 InInstructionIndex |
Returns the output operands of a given instruction | |
| FRigVMByteCodeStatistics | Returns the statistics information | ||
| UObject * | GetSubjectForInstruction
(
int32 InInstructionIndex |
Returns the subject which was used to inject a given instruction | |
| uint64 | InlineFunction
(
const FRigVMByteCode* FunctionByteCode, |
Adds an execute operator given its function index operands | |
| bool | IsOperandShared
(
const FRigVMOperand& InOperand |
Returns true if the operator in question is used by multiple instructions | |
| void | |||
| uint64 | Num () |
Returns the number of instructions in this container | |
| uint64 | NumEntries () |
Returns the number of entries | |
| void | Reset () |
Resets the container and maintains all memory | |
| void | |||
| void | |||
| void | SetOperandsForInstruction
(
int32 InInstructionIndex, |
Operators
| Type | Name | Description | |
|---|---|---|---|
| const uint8 & | operator[]
(
int32 InIndex |
Const accessor for a byte given its index |
Constants
| Name | Description |
|---|---|
| EmptyInstructionIndices |