pub struct ArenaInner {Show 16 fields
pub herd: Herd,
pub bb: DashMap<usize, *const ()>,
pub blk_root: DashMap<usize, *const ()>,
pub blk_module: DashMap<usize, *const ()>,
pub blk_func: DashMap<usize, *const ()>,
pub blk_class: DashMap<usize, *const ()>,
pub blk_trait: DashMap<usize, *const ()>,
pub blk_interface: DashMap<usize, *const ()>,
pub blk_impl: DashMap<usize, *const ()>,
pub blk_call: DashMap<usize, *const ()>,
pub blk_enum: DashMap<usize, *const ()>,
pub blk_field: DashMap<usize, *const ()>,
pub blk_const: DashMap<usize, *const ()>,
pub blk_parameter: DashMap<usize, *const ()>,
pub blk_return: DashMap<usize, *const ()>,
pub blk_alias: DashMap<usize, *const ()>,
}Expand description
The actual data container: thread-safe, allocation-aware. Uses ’static lifetime for storage since we use raw pointers internally.
Fields§
§herd: Herd§bb: DashMap<usize, *const ()>§blk_root: DashMap<usize, *const ()>§blk_module: DashMap<usize, *const ()>§blk_func: DashMap<usize, *const ()>§blk_class: DashMap<usize, *const ()>§blk_trait: DashMap<usize, *const ()>§blk_interface: DashMap<usize, *const ()>§blk_impl: DashMap<usize, *const ()>§blk_call: DashMap<usize, *const ()>§blk_enum: DashMap<usize, *const ()>§blk_field: DashMap<usize, *const ()>§blk_const: DashMap<usize, *const ()>§blk_parameter: DashMap<usize, *const ()>§blk_return: DashMap<usize, *const ()>§blk_alias: DashMap<usize, *const ()>Implementations§
Source§impl ArenaInner
impl ArenaInner
Sourcepub fn new_with_capacity(cap: usize) -> Self
pub fn new_with_capacity(cap: usize) -> Self
Create ArenaInner with pre-allocated capacity for each field.
Sourcepub fn alloc_with_id<'a, T: ArenaInsertWithId<'a>>(
&'a self,
id: usize,
value: T,
) -> &'a T
pub fn alloc_with_id<'a, T: ArenaInsertWithId<'a>>( &'a self, id: usize, value: T, ) -> &'a T
Thread-safe allocation with ID for lookup. Allocates in bump arena and inserts into DashMap.
Sourcepub fn alloc<'a, T: ArenaInsert<'a>>(&'a self, value: T) -> &'a T
pub fn alloc<'a, T: ArenaInsert<'a>>(&'a self, value: T) -> &'a T
Thread-safe allocation without ID tracking. Just allocates in bump arena, no DashMap insert.
Sourcepub fn alloc_in_herd<T>(&self, value: T) -> &T
pub fn alloc_in_herd<T>(&self, value: T) -> &T
Allocate a value in the thread-local bump allocator. Uses thread_local to cache the Member per thread, avoiding mutex contention.
Sourcepub fn alloc_str(&self, src: &str) -> &str
pub fn alloc_str(&self, src: &str) -> &str
Allocate a string in the thread-local bump allocator. Returns a reference to the arena-allocated string, avoiding heap allocation.
Sourcepub fn get_bb<'a>(&'a self, id: usize) -> Option<&'a BasicBlock<'a>>
pub fn get_bb<'a>(&'a self, id: usize) -> Option<&'a BasicBlock<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn iter_bb<'a>(&'a self) -> impl Iterator<Item = &'a BasicBlock<'a>> + 'a
pub fn iter_bb<'a>(&'a self) -> impl Iterator<Item = &'a BasicBlock<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_root<'a>(&'a self, id: usize) -> Option<&'a BlockRoot<'a>>
pub fn get_blk_root<'a>(&'a self, id: usize) -> Option<&'a BlockRoot<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_root(&self) -> usize
pub fn len_blk_root(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_root<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockRoot<'a>> + 'a
pub fn iter_blk_root<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockRoot<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_module<'a>(&'a self, id: usize) -> Option<&'a BlockModule<'a>>
pub fn get_blk_module<'a>(&'a self, id: usize) -> Option<&'a BlockModule<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_module(&self) -> usize
pub fn len_blk_module(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_module<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockModule<'a>> + 'a
pub fn iter_blk_module<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockModule<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_func<'a>(&'a self, id: usize) -> Option<&'a BlockFunc<'a>>
pub fn get_blk_func<'a>(&'a self, id: usize) -> Option<&'a BlockFunc<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_func(&self) -> usize
pub fn len_blk_func(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_func<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockFunc<'a>> + 'a
pub fn iter_blk_func<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockFunc<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_class<'a>(&'a self, id: usize) -> Option<&'a BlockClass<'a>>
pub fn get_blk_class<'a>(&'a self, id: usize) -> Option<&'a BlockClass<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_class(&self) -> usize
pub fn len_blk_class(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_class<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockClass<'a>> + 'a
pub fn iter_blk_class<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockClass<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_trait<'a>(&'a self, id: usize) -> Option<&'a BlockTrait<'a>>
pub fn get_blk_trait<'a>(&'a self, id: usize) -> Option<&'a BlockTrait<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_trait(&self) -> usize
pub fn len_blk_trait(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_trait<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockTrait<'a>> + 'a
pub fn iter_blk_trait<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockTrait<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_interface<'a>(
&'a self,
id: usize,
) -> Option<&'a BlockInterface<'a>>
pub fn get_blk_interface<'a>( &'a self, id: usize, ) -> Option<&'a BlockInterface<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_interface(&self) -> usize
pub fn len_blk_interface(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_interface<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockInterface<'a>> + 'a
pub fn iter_blk_interface<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockInterface<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_impl<'a>(&'a self, id: usize) -> Option<&'a BlockImpl<'a>>
pub fn get_blk_impl<'a>(&'a self, id: usize) -> Option<&'a BlockImpl<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_impl(&self) -> usize
pub fn len_blk_impl(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_impl<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockImpl<'a>> + 'a
pub fn iter_blk_impl<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockImpl<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_call<'a>(&'a self, id: usize) -> Option<&'a BlockCall<'a>>
pub fn get_blk_call<'a>(&'a self, id: usize) -> Option<&'a BlockCall<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_call(&self) -> usize
pub fn len_blk_call(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_call<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockCall<'a>> + 'a
pub fn iter_blk_call<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockCall<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_enum<'a>(&'a self, id: usize) -> Option<&'a BlockEnum<'a>>
pub fn get_blk_enum<'a>(&'a self, id: usize) -> Option<&'a BlockEnum<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_enum(&self) -> usize
pub fn len_blk_enum(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_enum<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockEnum<'a>> + 'a
pub fn iter_blk_enum<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockEnum<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_field<'a>(&'a self, id: usize) -> Option<&'a BlockField<'a>>
pub fn get_blk_field<'a>(&'a self, id: usize) -> Option<&'a BlockField<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_field(&self) -> usize
pub fn len_blk_field(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_field<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockField<'a>> + 'a
pub fn iter_blk_field<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockField<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_const<'a>(&'a self, id: usize) -> Option<&'a BlockConst<'a>>
pub fn get_blk_const<'a>(&'a self, id: usize) -> Option<&'a BlockConst<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_const(&self) -> usize
pub fn len_blk_const(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_const<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockConst<'a>> + 'a
pub fn iter_blk_const<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockConst<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_parameter<'a>(
&'a self,
id: usize,
) -> Option<&'a BlockParameter<'a>>
pub fn get_blk_parameter<'a>( &'a self, id: usize, ) -> Option<&'a BlockParameter<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_parameter(&self) -> usize
pub fn len_blk_parameter(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_parameter<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockParameter<'a>> + 'a
pub fn iter_blk_parameter<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockParameter<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_return<'a>(&'a self, id: usize) -> Option<&'a BlockReturn<'a>>
pub fn get_blk_return<'a>(&'a self, id: usize) -> Option<&'a BlockReturn<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_return(&self) -> usize
pub fn len_blk_return(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_return<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockReturn<'a>> + 'a
pub fn iter_blk_return<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockReturn<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Sourcepub fn get_blk_alias<'a>(&'a self, id: usize) -> Option<&'a BlockAlias<'a>>
pub fn get_blk_alias<'a>(&'a self, id: usize) -> Option<&'a BlockAlias<'a>>
Get item by ID from DashMap (O(1) concurrent lookup). SAFETY: The pointer was allocated from the bump arena and is valid for the arena’s lifetime.
Sourcepub fn len_blk_alias(&self) -> usize
pub fn len_blk_alias(&self) -> usize
Get count of items.
Sourcepub fn iter_blk_alias<'a>(
&'a self,
) -> impl Iterator<Item = &'a BlockAlias<'a>> + 'a
pub fn iter_blk_alias<'a>( &'a self, ) -> impl Iterator<Item = &'a BlockAlias<'a>> + 'a
Iterate over all items (for compatibility). SAFETY: All pointers are valid for the arena’s lifetime.
Trait Implementations§
Source§impl Debug for ArenaInner
impl Debug for ArenaInner
Source§impl Default for ArenaInner
impl Default for ArenaInner
impl Send for ArenaInner
impl Sync for ArenaInner
Auto Trait Implementations§
impl !Freeze for ArenaInner
impl !RefUnwindSafe for ArenaInner
impl Unpin for ArenaInner
impl UnwindSafe for ArenaInner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more