|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Arena-backed ownership context for bytecode functions and modules. More...
#include <Bytecode.H>
Classes | |
| struct | Owned_Object |
Public Member Functions | |
| Compiler_Bytecode_Context (const size_t arena_size=AhArenaAllocator::DEFAULT_SIZE) | |
| Constructs a bytecode context. | |
| Compiler_Bytecode_Context (const Compiler_Bytecode_Context &)=delete | |
| Compiler_Bytecode_Context & | operator= (const Compiler_Bytecode_Context &)=delete |
| ~Compiler_Bytecode_Context () noexcept | |
| Destroys all tracked objects and rewinds the arena. | |
| template<typename T , typename... Args> | |
| T * | make (Args &&... args) |
| Allocates and constructs one bytecode object in the arena. | |
| void | reset () noexcept |
| Resets the arena and destroys all tracked objects. | |
Private Attributes | |
| AhArenaAllocator | arena |
| DynArray< Owned_Object > | owned |
Arena-backed ownership context for bytecode functions and modules.
Definition at line 253 of file Bytecode.H.
|
inlineexplicit |
Constructs a bytecode context.
Definition at line 266 of file Bytecode.H.
|
delete |
|
inlinenoexcept |
Destroys all tracked objects and rewinds the arena.
Definition at line 274 of file Bytecode.H.
References reset().
Allocates and constructs one bytecode object in the arena.
Definition at line 281 of file Bytecode.H.
References ah_runtime_error_unless, arena, Aleph::blossom_maximum_cardinality_matching(), and owned.
Referenced by Aleph::Compiler_Bytecode_Lowering::lower_function(), and Aleph::Compiler_Bytecode_Lowering::lower_module().
|
delete |
|
inlinenoexcept |
Resets the arena and destroys all tracked objects.
Definition at line 298 of file Bytecode.H.
References Aleph::and, arena, owned, and Aleph::AhArenaAllocator::reset().
Referenced by ~Compiler_Bytecode_Context(), Aleph::Compiler_Driver::clear(), and Aleph::Compiler_Generic_Driver::clear().
|
private |
Definition at line 261 of file Bytecode.H.
|
private |
Definition at line 262 of file Bytecode.H.