Skip to main content

Crate catallaxy_runtime

Crate catallaxy_runtime 

Source
Expand description

Runtime object model for Catallaxy: NaN-boxed Values, class descriptors, heap object layouts, the three ownership states (owned, frozen, shared) and structural operations.

All unsafe code in the language implementation lives here and in catallaxy-gc.

Re-exports§

pub use class::class_of;
pub use class::Class;
pub use class::ObjKind;
pub use class::BUILTINS;
pub use mutator::note_external;
pub use mutator::panic;
pub use mutator::Handle;
pub use mutator::HandleScope;
pub use mutator::Local;
pub use mutator::Mutator;
pub use mutator::RtResult;
pub use mutator::Trap;
pub use ops::Interop;
pub use symbol::intern;
pub use symbol::Sym;
pub use value::Value;

Modules§

buf
Arrays of atomic words for containers whose readers do not lock (lists, and dicts read through their seqlock). Every slot is an AtomicU64, so a reader racing a writer sees some value that was stored there, never a torn one. A writer that outgrows a buffer copies it into a new one, publishes the new pointer with Release, and hands the old one to release, which frees it only once no other thread can be reading it.
class
Class descriptors.
dict
Insertion-ordered open-addressing hash table (the CPython 3.6+ layout): a dense entry array in insertion order plus a sparse index array.
mutator
Per-thread runtime context: identity, allocation, and the handle stack that roots values held by native code across calls back into the interpreter.
object
Heap object layouts and their GC hooks.
ops
Structural operations on values: equality, hashing, ordering, formatting, and arbitrary-precision integer arithmetic.
ownership
Ownership states at runtime: access checks, deep freeze, promotion to shared, and transfer of owned object graphs between threads.
symbol
Interned names (methods, fields). Symbols are process-wide and never freed.
value
NaN-boxed values.