![]() |
Gorgon Game Engine
|
A single instruction. More...
Public Member Functions | |
Instruction () | |
Instruction (const Instruction &inst) | |
Public Attributes | |
union { | |
int JumpOffset | |
Byte Store | |
Whether to store the result of the function. More... | |
}; | |
Value | Name |
Name of the function or variable. More... | |
std::vector< Value > | Parameters |
Parameters of the function. More... | |
bool | Reference |
Value | RHS |
The value that will be assigned to the variable. More... | |
InstructionType | Type |
Type of the instruction. More... | |
A single instruction.
An instruction can either be a function call or an assignment.
If it is a function call, Name field stores the name of the function. Store field decides whether the result of the instruction will be used and therefore, should be stored. Additionally Parameters stores the parameters of the function. If parameters contains expressions, they should be split into single instructions and their temporary values should be referenced.
If the type of the instruction is assignment, Name field contains the name of the variable. Store field is not used and RHS field contains the right hand side value that should be assigned to the variable.
Instruction | ( | ) |
Instruction | ( | const Instruction & | inst | ) |
union { ... } |
int JumpOffset |
Value Name |
Name of the function or variable.
std::vector<Value> Parameters |
Parameters of the function.
bool Reference |
Value RHS |
The value that will be assigned to the variable.
Byte Store |
Whether to store the result of the function.
Type of the instruction.