[][src]Struct spaik::nkgc::Arena

pub struct Arena<'a> { /* fields omitted */ }

Come and fight in the arena!

Implementations

impl<'a> Arena<'a>[src]

pub fn new<'b>(memsz: usize) -> Arena<'b>[src]

pub fn print_state(&self)[src]

pub fn minimize(&mut self)[src]

pub fn dup(&mut self) -> Result<(), Error>[src]

pub fn put<T>(&mut self, v: T) -> PV where
    T: Fissile
[src]

pub fn clz_expand(&mut self, idx: usize) -> Result<(), Error>[src]

pub fn dump_stack(&self)[src]

pub fn forbid_reordering(&mut self)[src]

pub fn allow_reordering(&mut self)[src]

pub fn stats(&self) -> GCStats[src]

TODO: make used, sz, and num_atoms atomic. Then create a begin_profile(t, sz) method that spawns a thread which will save GCStats every t seconds until it reaches sz samples. stop_profile() -> Vec retrieves the stats.

  You'll have to figure out how to make atomic variables
  work across the FFI.

pub fn push_sym(&mut self, v: SymID)[src]

pub fn push_env(&mut self, v: PV) -> usize[src]

pub fn get_env(&self, idx: usize) -> PV[src]

pub fn set_env(&mut self, idx: usize, v: PV)[src]

pub fn push(&mut self, v: PV)[src]

pub fn push_spv(&mut self, v: SPV<'a>)[src]

pub fn popn(&mut self, n: usize)[src]

pub fn stack_mut(&mut self) -> &mut Vec<PV>[src]

pub fn list(&mut self, n: u32)[src]

pub fn make_extref(&mut self, v: PV) -> SPV<'a>[src]

pub fn get_ext(&self, id: u32) -> PV[src]

pub unsafe fn drop_ext(&mut self, id: u32)[src]

Drop an external reference

Arguments

  • id : Reference ID

Safety

Using the reference after it has been dropped is UB.

pub fn pop_spv(&mut self) -> Result<SPV<'a>, Error>[src]

pub fn pop(&mut self) -> Result<PV, Error>[src]

pub fn top(&self) -> PV[src]

pub fn peek(&self) -> Result<PV, RuntimeError>[src]

pub fn untag_ast(&mut self, v: PV)[src]

pub fn push_ast(&mut self, v: &Value) -> PV[src]

pub fn append(&mut self, n: u32) -> Result<(), RuntimeError>[src]

pub fn cons(&mut self)[src]

pub unsafe fn cons_unchecked(&mut self)[src]

Pop two elements off the stack and cons them together.

Safety

This function requires at least two values to be placed on the stack before it is called. If this requirement is not met the function will cause a buffer underflow read.

pub fn tag(&mut self, item: *mut NkAtom, tag: Source)[src]

pub fn get_tag(&self, item: *mut NkAtom) -> Option<&Source>[src]

pub fn untag(&mut self, item: *mut NkAtom)[src]

pub fn push_new<T: Fissile>(&mut self, v: T)[src]

pub fn collect(&mut self)[src]

pub fn full_collection(&mut self)[src]

Perform a full GC collection, this may finish a currently ongoing collection and start a new one afterwards.

pub fn ignore_and_sweep(&mut self)[src]

Remove all allocated objects

Trait Implementations

impl<'a> Debug for Arena<'a>[src]

impl Default for Arena<'_>[src]

impl Drop for Arena<'_>[src]

impl SymDB for Arena<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Arena<'a>[src]

impl<'a> !Send for Arena<'a>[src]

impl<'a> !Sync for Arena<'a>[src]

impl<'a> Unpin for Arena<'a>[src]

impl<'a> !UnwindSafe for Arena<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.