Gorgon Game Engine
Instruction Struct Reference

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< ValueParameters
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Instruction() [1/2]

◆ Instruction() [2/2]

Instruction ( const Instruction inst)

Member Data Documentation

◆ @32

union { ... }

◆ JumpOffset

int JumpOffset

◆ Name

Value Name

Name of the function or variable.

◆ Parameters

std::vector<Value> Parameters

Parameters of the function.

◆ Reference

bool Reference

◆ RHS

Value RHS

The value that will be assigned to the variable.

◆ Store

Byte Store

Whether to store the result of the function.

◆ Type

Type of the instruction.


The documentation for this struct was generated from the following file: