Kiwi Engine
VM for interpreter
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Fields
KEInstruction Struct Reference

#include <KEInstruction.h>

Data Fields

struct CNObject superClass
 
KEOpcode opCode
 
union {
   struct {
      struct KEInstruction *   compoundInstruction
 
      KERegisterId   maxLocalRegisterId
 
   }   functionInstruction
 
   struct {
      struct CNObjectList   instructionList
 
   }   compoundInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   sourceId
 
   }   moveInstruction
 
   struct {
      KERegisterId   destinationId
 
      struct KEValue   constantValue
 
   }   setInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   sourceId
 
   }   unaryInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   leftId
 
      KERegisterId   rightId
 
   }   binaryInstruction
 
   struct {
      KERegisterId   destinationId
 
      struct KEPath *   path
 
      struct KEValue *   pathValue
 
      struct CNObjectList   hiddenRegisters
 
   }   createFunctionInstruction
 
   struct {
      KERegisterId   functionId
 
      struct CNObjectList   returnRegisters
 
      struct CNObjectList   parameterRegisters
 
   }   callFunctionInstruction
 
   struct {
      struct KEPath *   path
 
      struct KEValue *   pathValue
 
      struct CNObjectList   returnRegisters
 
      struct CNObjectList   parameterRegisters
 
   }   callBuiltinInstruction
 
   struct {
      KERegisterId   destinationId
 
      struct KEFrame *   rootFrame
 
   }   rootFrameInstruction
 
   struct {
      KERegisterId   destinationId
 
   }   createFrameInstruction
 
   struct {
      KERegisterId   destinationId
 
      struct KEPath *   destinationPath
 
      KERegisterId   sourceId
 
   }   setFrameInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   sourceId
 
      struct KEPath *   sourcePath
 
   }   getFrameInstruction
 
   struct {
      KERegisterId   destinationId
 
   }   createArrayInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   destinationIndex
 
      KERegisterId   sourceId
 
   }   setArrayInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   sourceId
 
      KERegisterId   sourceIndex
 
   }   getArrayInstruction
 
   struct {
      KERegisterId   destinationId
 
   }   createDictionaryInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   destinationKey
 
      KERegisterId   sourceId
 
   }   setDictionaryInstruction
 
   struct {
      KERegisterId   destinationId
 
      KERegisterId   sourceId
 
      KERegisterId   sourceKey
 
   }   getDictionaryInstruction
 
   struct {
      KERegisterId   conditionId
 
      struct KEInstruction *   thenInstruction
 
      struct KEInstruction *   elseInstruction
 
   }   ifInstruction
 
   struct {
      KERegisterId   conditionId
 
      struct CNObjectList   caseInstructionList
 
      struct KEInstruction *   defaultInstruction
 
   }   switchInstruction
 
   struct {
      CNBoolean   isDefaultCondition
 
      int64_t   caseValue
 
      struct KEInstruction *   caseInstruction
 
   }   caseInstruction
 
   struct {
      KERegisterId   conditionId
 
      struct KEInstruction *   bodyInstruction
 
   }   whileInstruction
 
   struct {
      KERegisterId   elementId
 
      KERegisterId   arrayId
 
      struct KEInstruction *   bodyInstruction
 
   }   foreachArrayInstruction
 
   struct {
      KERegisterId   elementId
 
      KERegisterId   dictionaryId
 
      struct KEInstruction *   bodyInstruction
 
   }   foreachDictionaryInstruction
 
   struct {
      KERegisterId   codeId
 
   }   exitInstruction
 
}; 
 
struct KELineInfolineInfo
 

Detailed Description

Instruction class

Field Documentation

union { ... }

Operands

KERegisterId KEInstruction::arrayId

Array variable id

struct { ... } KEInstruction::binaryInstruction

Operand for boolean binary instruction

struct KEInstruction* KEInstruction::bodyInstruction

Body of loop instruction

struct KEInstruction* KEInstruction::caseInstruction

Body of case instruction

struct CNObjectList KEInstruction::caseInstructionList

List of case statements (KEInstruction with KESwithOpcode)

int64_t KEInstruction::caseValue

Case value. This value is valid when the isDefaultCondition value is False.

struct KEInstruction* KEInstruction::compoundInstruction

Body instruction of function

struct { ... } KEInstruction::compoundInstruction

Operand for compound instruction

KERegisterId KEInstruction::conditionId

Condition register id

struct KEValue KEInstruction::constantValue

Source constant value

struct { ... } KEInstruction::createFunctionInstruction

Operand for create-function instruction

struct KEInstruction* KEInstruction::defaultInstruction

Default case instruction (will be NULL)

KERegisterId KEInstruction::destinationId

Destination register id

KERegisterId KEInstruction::destinationIndex

Index of the array

KERegisterId KEInstruction::destinationKey

Key value for the dictionary

struct KEPath* KEInstruction::destinationPath

Path of the slot

KERegisterId KEInstruction::dictionaryId

Array variable id

KERegisterId KEInstruction::elementId

element variable id

struct KEInstruction* KEInstruction::elseInstruction

Else part instruction. If the instruction does not have else part, this value will be NULL

struct { ... } KEInstruction::exitInstruction

Exit instruction

KERegisterId KEInstruction::functionId

Function register id

struct { ... } KEInstruction::functionInstruction

Operand for function instruction

struct CNObjectList KEInstruction::hiddenRegisters

List of CNNumber object. This will be used to present the local registers for the hidden parameters

struct CNObjectList KEInstruction::instructionList

List of KEInstructions

CNBoolean KEInstruction::isDefaultCondition

Is default or not

KERegisterId KEInstruction::leftId

Source left register id

struct KELineInfo* KEInstruction::lineInfo

Line information

KERegisterId KEInstruction::maxLocalRegisterId

Max local register id

struct { ... } KEInstruction::moveInstruction

Operand for move instruction

KEOpcode KEInstruction::opCode

Code of instruction

struct CNObjectList KEInstruction::parameterRegisters

List of register id (CNNumber *) to pass parameters

struct KEPath* KEInstruction::path

Path for the function

Path of the built-in function

struct KEValue* KEInstruction::pathValue

FunctionValue which is pointed by the path. This will be set at the linker phase.

BuiltinFuncValue which is pointed by the path. This will be set at the linker phase.

struct CNObjectList KEInstruction::returnRegisters

List of register id (CNNumber *) to store results

KERegisterId KEInstruction::rightId

Source right register id

struct KEFrame* KEInstruction::rootFrame

Value which is pointed path

struct { ... } KEInstruction::setInstruction

Operand for set instruction

KERegisterId KEInstruction::sourceId

Source register id

KERegisterId KEInstruction::sourceIndex

Index of the array

KERegisterId KEInstruction::sourceKey

Key for the dictionary

struct KEPath* KEInstruction::sourcePath

Path of the slot

struct CNObject KEInstruction::superClass

Super class

struct KEInstruction* KEInstruction::thenInstruction

Then part instruction

struct { ... } KEInstruction::unaryInstruction

Operand for boolean unary instruction


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