pub struct CompileLedger { /* private fields */ }Expand description
The compile accounting of one program tree: how many programs have
been built for it, on any engine, over its lifetime. A root compile
mints a ledger, and every program built on the tree’s behalf
records into the same one: each for body, each engine variant of
a body, and each constant expression a traversal source or
predicate compiles at open. A host reads it before and after an
operation to verify the program-invariance property (for_traversal.md §5.1):
compiling builds one program per body, and activation builds none.
Two trees never share a ledger, whatever thread or process runs
them; two kernels over one program do. A compile charged to a
ledger a host already holds is requested through
CompileOptions::ledger.
The ledger also holds every native cone the interpreter planned and
left on the interpreter because the cone could not be built
(ConeFallback, engines.md §2.1), and every comprehension compiled
outside pragma strict that reads a name nothing binds
(UnresolvedNameWarning, comprehension_forms.md §5 V3).
Implementations§
Source§impl CompileLedger
impl CompileLedger
Sourcepub fn new() -> Arc<Self> ⓘ
pub fn new() -> Arc<Self> ⓘ
A fresh ledger with nothing recorded, shared as every holder keeps it.
Sourcepub fn cone_fallbacks(&self) -> Vec<ConeFallback>
pub fn cone_fallbacks(&self) -> Vec<ConeFallback>
The native cones left on the interpreter so far, in the order they were planned, across every program of the tree.
Sourcepub fn unresolved_names(&self) -> Vec<UnresolvedNameWarning>
pub fn unresolved_names(&self) -> Vec<UnresolvedNameWarning>
The comprehension statements compiled outside pragma strict
that read names nothing binds, in the order they compiled, across
every program of the tree, each statement once.
Trait Implementations§
Source§impl Debug for CompileLedger
impl Debug for CompileLedger
Auto Trait Implementations§
impl !Freeze for CompileLedger
impl RefUnwindSafe for CompileLedger
impl Send for CompileLedger
impl Sync for CompileLedger
impl Unpin for CompileLedger
impl UnsafeUnpin for CompileLedger
impl UnwindSafe for CompileLedger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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