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

Arena-backed ownership context for SSA functions and modules. More...

#include <SSA.H>

Collaboration diagram for Aleph::Compiler_SSA_Context:
[legend]

Classes

struct  Owned_Object
 

Public Member Functions

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

Private Attributes

AhArenaAllocator arena
 
DynArray< Owned_Object > owned
 

Detailed Description

Arena-backed ownership context for SSA functions and modules.

Definition at line 222 of file SSA.H.

Constructor & Destructor Documentation

◆ Compiler_SSA_Context() [1/2]

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

Constructs an SSA context.

Definition at line 235 of file SSA.H.

◆ Compiler_SSA_Context() [2/2]

Aleph::Compiler_SSA_Context::Compiler_SSA_Context ( const Compiler_SSA_Context &  )
delete

◆ ~Compiler_SSA_Context()

Aleph::Compiler_SSA_Context::~Compiler_SSA_Context ( )
inlinenoexcept

Destroys all managed objects and rewinds the arena.

Definition at line 243 of file SSA.H.

References reset().

Member Function Documentation

◆ make()

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

Allocates and constructs one SSA object in the arena.

Definition at line 250 of file SSA.H.

References ah_runtime_error_unless, arena, Aleph::blossom_maximum_cardinality_matching(), and owned.

Referenced by Aleph::Compiler_SSA_Lowering::lower_function_internal(), and Aleph::Compiler_SSA_Lowering::lower_module().

◆ operator=()

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

◆ reset()

void Aleph::Compiler_SSA_Context::reset ( )
inlinenoexcept

Resets the arena and destroys all tracked objects.

Definition at line 267 of file SSA.H.

References Aleph::and, arena, owned, and Aleph::AhArenaAllocator::reset().

Referenced by ~Compiler_SSA_Context().

Member Data Documentation

◆ arena

AhArenaAllocator Aleph::Compiler_SSA_Context::arena
private

Definition at line 230 of file SSA.H.

Referenced by make(), and reset().

◆ owned

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

Definition at line 231 of file SSA.H.

Referenced by make(), and reset().


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