Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Compiler_IR_Context Class Reference

Arena-backed ownership context for IR nodes. More...

#include <Compiler_IR_Model.H>

Collaboration diagram for Aleph::Compiler_IR_Context:
[legend]

Classes

struct  Owned_Object
 

Public Member Functions

 Compiler_IR_Context (const size_t arena_size=AhArenaAllocator::DEFAULT_SIZE)
 Constructs an IR context with arena_size bytes.
 
 Compiler_IR_Context (const Compiler_IR_Context &)=delete
 
Compiler_IR_Context & operator= (const Compiler_IR_Context &)=delete
 
 ~Compiler_IR_Context () noexcept
 
template<typename T , typename... Args>
T * make (Args &&...args)
 Allocates and constructs one IR object.
 
void reset () noexcept
 Destroys all tracked objects and rewinds the arena.
 

Private Attributes

AhArenaAllocator arena
 
DynArray< Owned_Object > owned
 

Detailed Description

Arena-backed ownership context for IR nodes.

Definition at line 256 of file Compiler_IR_Model.H.

Constructor & Destructor Documentation

◆ Compiler_IR_Context() [1/2]

Aleph::Compiler_IR_Context::Compiler_IR_Context ( const size_t  arena_size = AhArenaAllocator::DEFAULT_SIZE)
inlineexplicit

Constructs an IR context with arena_size bytes.

Definition at line 269 of file Compiler_IR_Model.H.

◆ Compiler_IR_Context() [2/2]

Aleph::Compiler_IR_Context::Compiler_IR_Context ( const Compiler_IR_Context &  )
delete

◆ ~Compiler_IR_Context()

Aleph::Compiler_IR_Context::~Compiler_IR_Context ( )
inlinenoexcept

Definition at line 276 of file Compiler_IR_Model.H.

References reset().

Member Function Documentation

◆ make()

template<typename T , typename... Args>
T * Aleph::Compiler_IR_Context::make ( Args &&...  args)
inline

◆ operator=()

Compiler_IR_Context & Aleph::Compiler_IR_Context::operator= ( const Compiler_IR_Context &  )
delete

◆ reset()

void Aleph::Compiler_IR_Context::reset ( )
inlinenoexcept

Member Data Documentation

◆ arena

AhArenaAllocator Aleph::Compiler_IR_Context::arena
private

Definition at line 264 of file Compiler_IR_Model.H.

Referenced by make(), and reset().

◆ owned

DynArray<Owned_Object> Aleph::Compiler_IR_Context::owned
private

Definition at line 265 of file Compiler_IR_Model.H.

Referenced by make(), and reset().


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