JUCE  v5.2.0-514-g49784a029
JUCE API
juce::littlefoot::Compiler::CodeGenerator Struct Reference
Collaboration diagram for juce::littlefoot::Compiler::CodeGenerator:

Classes

struct  Marker
 
struct  MarkerAndAddress
 

Public Member Functions

 CodeGenerator (Array< uint8 > &output, const SyntaxTreeBuilder &stb)
 
void attachMarker (Marker m)
 
Marker createMarker () noexcept
 
void emit (OpCode op)
 
void emit (Marker m)
 
void emit (int8 value)
 
void emit (int16 value)
 
void emit (int32 value)
 
template<typename Arg1 , typename... Args>
void emit (Arg1 arg1, Args... args)
 
void emitCast (Type source, Type dest, const CodeLocation &location)
 
void emitPush (const var &value)
 
void emitVariableRead (Type sourceType, Type requiredType, int stackDepth, int index, const CodeLocation &location)
 
void generateCode (BlockPtr outerBlock, uint32 heapSizeBytesRequired)
 
Marker getMarkerAtAddress (int address) const noexcept
 
int getResolvedMarkerAddress (Marker marker) const
 
void removeCode (int address, int size)
 
void removeJumpsToNextInstruction (int address)
 
void resolveMarkers ()
 

Public Attributes

Marker breakTarget
 
Marker continueTarget
 
Array< MarkerAndAddressmarkersToResolve
 
int nextMarker = 0
 
Array< uint8 > & outputCode
 
Array< MarkerAndAddressresolvedMarkers
 
const SyntaxTreeBuildersyntaxTree
 

Constructor & Destructor Documentation

◆ CodeGenerator()

juce::littlefoot::Compiler::CodeGenerator::CodeGenerator ( Array< uint8 > &  output,
const SyntaxTreeBuilder stb 
)
inline

Member Function Documentation

◆ attachMarker()

void juce::littlefoot::Compiler::CodeGenerator::attachMarker ( Marker  m)
inline

◆ createMarker()

Marker juce::littlefoot::Compiler::CodeGenerator::createMarker ( )
inlinenoexcept

◆ emit() [1/6]

void juce::littlefoot::Compiler::CodeGenerator::emit ( OpCode  op)
inline

◆ emit() [2/6]

void juce::littlefoot::Compiler::CodeGenerator::emit ( Marker  m)
inline

◆ emit() [3/6]

void juce::littlefoot::Compiler::CodeGenerator::emit ( int8  value)
inline

◆ emit() [4/6]

void juce::littlefoot::Compiler::CodeGenerator::emit ( int16  value)
inline

◆ emit() [5/6]

void juce::littlefoot::Compiler::CodeGenerator::emit ( int32  value)
inline

◆ emit() [6/6]

template<typename Arg1 , typename... Args>
void juce::littlefoot::Compiler::CodeGenerator::emit ( Arg1  arg1,
Args...  args 
)
inline

◆ emitCast()

void juce::littlefoot::Compiler::CodeGenerator::emitCast ( Type  source,
Type  dest,
const CodeLocation location 
)
inline

◆ emitPush()

void juce::littlefoot::Compiler::CodeGenerator::emitPush ( const var value)
inline

◆ emitVariableRead()

void juce::littlefoot::Compiler::CodeGenerator::emitVariableRead ( Type  sourceType,
Type  requiredType,
int  stackDepth,
int  index,
const CodeLocation location 
)
inline

◆ generateCode()

void juce::littlefoot::Compiler::CodeGenerator::generateCode ( BlockPtr  outerBlock,
uint32  heapSizeBytesRequired 
)
inline

◆ getMarkerAtAddress()

Marker juce::littlefoot::Compiler::CodeGenerator::getMarkerAtAddress ( int  address) const
inlinenoexcept

◆ getResolvedMarkerAddress()

int juce::littlefoot::Compiler::CodeGenerator::getResolvedMarkerAddress ( Marker  marker) const
inline

◆ removeCode()

void juce::littlefoot::Compiler::CodeGenerator::removeCode ( int  address,
int  size 
)
inline

◆ removeJumpsToNextInstruction()

void juce::littlefoot::Compiler::CodeGenerator::removeJumpsToNextInstruction ( int  address)
inline

◆ resolveMarkers()

void juce::littlefoot::Compiler::CodeGenerator::resolveMarkers ( )
inline

Member Data Documentation

◆ breakTarget

Marker juce::littlefoot::Compiler::CodeGenerator::breakTarget

◆ continueTarget

Marker juce::littlefoot::Compiler::CodeGenerator::continueTarget

◆ markersToResolve

Array<MarkerAndAddress> juce::littlefoot::Compiler::CodeGenerator::markersToResolve

◆ nextMarker

int juce::littlefoot::Compiler::CodeGenerator::nextMarker = 0

◆ outputCode

Array<uint8>& juce::littlefoot::Compiler::CodeGenerator::outputCode

◆ resolvedMarkers

Array<MarkerAndAddress> juce::littlefoot::Compiler::CodeGenerator::resolvedMarkers

◆ syntaxTree

const SyntaxTreeBuilder& juce::littlefoot::Compiler::CodeGenerator::syntaxTree

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