pub enum KernelOptLevel {
Release,
Diagnostic,
}Expand description
Optimization level for op-template kernel synthesis.
Release is the production default — closure-binding economy
elides slots for names nothing references. Diagnostic keeps
every magic-extern and result-binding-LHS slot allocated so
step-debug / cycle-replay introspection can see the values the
runtime would otherwise drop.
Naming: matches the rustc convention (opt-level=0..3) but
collapsed to two semantically-distinct positions; there’s no
useful middle ground between “DCE on” and “keep everything for
inspection.”
Variants§
Release
Production default. Closure-binding economy elides slots for unreferenced magic externs and result-binding LHSs. Writes to elided names silently no-op.
Diagnostic
Step-debug / cycle-replay mode. Force-allocate every magic
extern (body / count / ok) and every result-binding
LHS slot regardless of downstream reference. Runtime writes
always land; wires.get always answers.
Implementations§
Source§impl KernelOptLevel
impl KernelOptLevel
Sourcepub fn keep_unreferenced_slots(self) -> bool
pub fn keep_unreferenced_slots(self) -> bool
True when slot allocation should ignore the “is this name referenced?” check and force-allocate every candidate slot.
Sourcepub fn parse(s: &str) -> Result<Self, &str>
pub fn parse(s: &str) -> Result<Self, &str>
Parse from a CLI-style string. Returns Err(input) on an
unrecognised value so the caller can format its own
diagnostic.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Canonical CLI spelling for this level. Inverse of
Self::parse.
Trait Implementations§
Source§impl Clone for KernelOptLevel
impl Clone for KernelOptLevel
Source§fn clone(&self) -> KernelOptLevel
fn clone(&self) -> KernelOptLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KernelOptLevel
Source§impl Debug for KernelOptLevel
impl Debug for KernelOptLevel
Source§impl Default for KernelOptLevel
impl Default for KernelOptLevel
Source§fn default() -> KernelOptLevel
fn default() -> KernelOptLevel
impl Eq for KernelOptLevel
Source§impl Hash for KernelOptLevel
impl Hash for KernelOptLevel
Source§impl PartialEq for KernelOptLevel
impl PartialEq for KernelOptLevel
impl StructuralPartialEq for KernelOptLevel
Auto Trait Implementations§
impl Freeze for KernelOptLevel
impl RefUnwindSafe for KernelOptLevel
impl Send for KernelOptLevel
impl Sync for KernelOptLevel
impl Unpin for KernelOptLevel
impl UnsafeUnpin for KernelOptLevel
impl UnwindSafe for KernelOptLevel
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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