pub struct Arena { /* private fields */ }Implementations§
Source§impl Arena
impl Arena
pub fn new() -> Self
pub fn push(&mut self, entry: ArenaEntry) -> u32
pub fn push_symbol(&mut self, symbol: ArenaSymbol) -> u32
pub fn get(&self, index: u32) -> &ArenaEntry
pub fn is_stable_index(index: u32) -> bool
pub fn is_yard_index_in_region(&self, index: u32, mark: u32) -> bool
pub fn is_handoff_index_in_region(&self, index: u32, mark: u32) -> bool
pub fn is_young_index_in_region(&self, index: u32, mark: u32) -> bool
pub fn young_len(&self) -> usize
pub fn yard_len(&self) -> usize
pub fn handoff_len(&self) -> usize
pub fn stable_len(&self) -> usize
pub fn usage(&self) -> ArenaUsage
pub fn peak_usage(&self) -> ArenaUsage
pub fn is_frame_local_index( &self, index: u32, arena_mark: u32, yard_mark: u32, handoff_mark: u32, ) -> bool
pub fn with_alloc_space<T>( &mut self, space: AllocSpace, f: impl FnOnce(&mut Arena) -> T, ) -> T
pub fn push_i64(&mut self, val: i64) -> u32
pub fn push_string(&mut self, s: &str) -> u32
pub fn push_boxed(&mut self, val: NanValue) -> u32
pub fn push_record(&mut self, type_id: u32, fields: Vec<NanValue>) -> u32
pub fn push_variant( &mut self, type_id: u32, variant_id: u16, fields: Vec<NanValue>, ) -> u32
pub fn push_list(&mut self, items: Vec<NanValue>) -> u32
pub fn push_map(&mut self, map: PersistentMap) -> u32
pub fn push_tuple(&mut self, items: Vec<NanValue>) -> u32
pub fn push_vector(&mut self, items: Vec<NanValue>) -> u32
pub fn push_fn(&mut self, f: Rc<FunctionValue>) -> u32
pub fn push_builtin(&mut self, name: &str) -> u32
pub fn push_nullary_variant_symbol(&mut self, ctor_id: u32) -> u32
pub fn get_i64(&self, index: u32) -> i64
pub fn get_string(&self, index: u32) -> &str
pub fn get_string_value(&self, value: NanValue) -> NanString<'_>
pub fn get_boxed(&self, index: u32) -> NanValue
pub fn get_record(&self, index: u32) -> (u32, &[NanValue])
pub fn get_variant(&self, index: u32) -> (u32, u16, &[NanValue])
pub fn get_list(&self, index: u32) -> &ArenaList
pub fn get_tuple(&self, index: u32) -> &[NanValue]
pub fn get_vector(&self, index: u32) -> &[NanValue]
pub fn vector_ref_value(&self, value: NanValue) -> &[NanValue]
pub fn clone_vector_value(&self, value: NanValue) -> Vec<NanValue>
pub fn get_map(&self, index: u32) -> &PersistentMap
pub fn map_ref_value(&self, map: NanValue) -> &PersistentMap
pub fn clone_map_value(&self, map: NanValue) -> PersistentMap
pub fn get_fn(&self, index: u32) -> &FunctionValue
pub fn get_fn_rc(&self, index: u32) -> &Rc<FunctionValue>
pub fn get_builtin(&self, index: u32) -> &str
pub fn get_namespace(&self, index: u32) -> (&str, &[(Rc<str>, NanValue)])
pub fn get_nullary_variant_ctor(&self, index: u32) -> u32
pub fn register_record_type( &mut self, name: &str, field_names: Vec<String>, ) -> u32
pub fn register_sum_type( &mut self, name: &str, variant_names: Vec<String>, ) -> u32
pub fn register_variant_name( &mut self, type_id: u32, variant_name: String, ) -> u16
pub fn get_type_name(&self, type_id: u32) -> &str
pub fn type_count(&self) -> u32
pub fn get_field_names(&self, type_id: u32) -> &[String]
pub fn get_variant_name(&self, type_id: u32, variant_id: u16) -> &str
pub fn find_type_id(&self, name: &str) -> Option<u32>
pub fn find_variant_id(&self, type_id: u32, variant_name: &str) -> Option<u16>
pub fn find_ctor_id(&self, type_id: u32, variant_id: u16) -> Option<u32>
pub fn get_ctor_parts(&self, ctor_id: u32) -> (u32, u16)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Source§impl Arena
impl Arena
pub fn push_list_prepend(&mut self, head: NanValue, tail: NanValue) -> u32
pub fn push_list_append(&mut self, list: NanValue, value: NanValue) -> u32
pub fn push_list_concat(&mut self, left: NanValue, right: NanValue) -> u32
pub fn list_len_value(&self, list: NanValue) -> usize
pub fn list_is_empty_value(&self, list: NanValue) -> bool
pub fn list_get_value( &self, list: NanValue, position: usize, ) -> Option<NanValue>
pub fn list_to_vec_value(&self, list: NanValue) -> Vec<NanValue>
pub fn list_len(&self, index: u32) -> usize
pub fn list_is_empty(&self, index: u32) -> bool
pub fn list_get(&self, index: u32, position: usize) -> Option<NanValue>
pub fn list_to_vec(&self, index: u32) -> Vec<NanValue>
pub fn list_uncons(&mut self, list: NanValue) -> Option<(NanValue, NanValue)>
Source§impl Arena
impl Arena
pub fn truncate_to(&mut self, mark: u32)
pub fn collect_young_from_roots(&mut self, mark: u32, roots: &mut [NanValue])
pub fn truncate_yard_to(&mut self, mark: u32)
pub fn truncate_handoff_to(&mut self, mark: u32)
pub fn evacuate_frame_to_yard( &mut self, young_mark: u32, yard_mark: u32, handoff_mark: u32, roots: &mut [NanValue], ) -> (bool, bool)
pub fn evacuate_frame_to_handoff( &mut self, young_mark: u32, yard_mark: u32, handoff_mark: u32, roots: &mut [NanValue], ) -> (bool, bool)
Sourcepub fn flatten_deep_list(&mut self, value: NanValue) -> NanValue
pub fn flatten_deep_list(&mut self, value: NanValue) -> NanValue
Flatten a deep list (Prepend/Concat chain) into a single Flat entry.
Returns the original value unchanged if not a deep list.
Uses the existing iterative list_to_vec — no recursion, no stack overflow.
pub fn promote_young_roots_to_yard(&mut self, mark: u32, roots: &mut [NanValue])
pub fn promote_young_roots_to_handoff( &mut self, mark: u32, roots: &mut [NanValue], )
pub fn promote_roots_to_stable(&mut self, roots: &mut [NanValue])
pub fn collect_yard_from_roots(&mut self, mark: u32, roots: &mut [NanValue])
pub fn collect_stable_from_roots(&mut self, roots: &mut [NanValue])
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arena
impl RefUnwindSafe for Arena
impl !Send for Arena
impl !Sync for Arena
impl Unpin for Arena
impl UnsafeUnpin for Arena
impl UnwindSafe for Arena
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
Mutably borrows from an owned value. Read more