decompiler  1.0.0
Public Member Functions | Private Attributes | List of all members
ghidra::SectionVector Class Reference

A collection of named p-code sections for a single Constructor. More...

#include <slgh_compile.hh>

Public Member Functions

 SectionVector (ConstructTpl *rtl, SymbolScope *scope)
 Constructor. More...
 
ConstructTpl * getMainSection (void) const
 Get the main section.
 
ConstructTpl * getNamedSection (int4 index) const
 Get a named section by index.
 
RtlPair getMainPair (void) const
 Get the main section/namespace pair.
 
RtlPair getNamedPair (int4 i) const
 Get a named section/namespace pair by index.
 
void setNextIndex (int4 i)
 Set the index of the currently parsing named section.
 
int4 getMaxId (void) const
 Get the maximum (exclusive) named section index.
 
void append (ConstructTpl *rtl, SymbolScope *scope)
 Add a new named section. More...
 

Private Attributes

int4 nextindex
 Index of the section currently being parsed.
 
RtlPair main
 The main section.
 
vector< RtlPairnamed
 Named sections accessed by index.
 

Detailed Description

A collection of named p-code sections for a single Constructor.

A Constructor always has a main section of p-code (which may be empty). Alternately a Constructor may define additional named sections of p-code. Operations in these sections are emitted using the crossbuild directive and can be incorporated into following instructions.

Internally different sections (RtlPair) are identified by index. A SectionSymbol holds the section's name and its corresponding index.

Constructor & Destructor Documentation

◆ SectionVector()

ghidra::SectionVector::SectionVector ( ConstructTpl *  rtl,
SymbolScope *  scope 
)

Constructor.

This must be constructed with the main section of p-code, which can contain no p-code

Parameters
rtlis the main section of p-code
scopeis the symbol scope associated with the section

References main, nextindex, ghidra::RtlPair::scope, and ghidra::RtlPair::section.

Member Function Documentation

◆ append()

void ghidra::SectionVector::append ( ConstructTpl *  rtl,
SymbolScope *  scope 
)

Add a new named section.

Associate the new section with nextindex, established prior to parsing

Parameters
rtlis the named section of p-code
scopeis the associated symbol scope

References named, and nextindex.

Referenced by ghidra::SleighCompile::finalNamedSection(), and ghidra::SleighCompile::nextNamedSection().


The documentation for this class was generated from the following files: