pub struct InterpreterProfile { /* private fields */ }Expand description
What one interpreter can lower and what it may advance.
A profile is a configuration of this build, not a second implementation: it declares which semantics this process acts as. Two profiles that declare the same semantics are interchangeable; one that declares an older version is how a compatible interpreter is expressed.
Implementations§
Source§impl InterpreterProfile
impl InterpreterProfile
pub fn new( compiler_semantics: CompilerSemantics, engine_semantics: EngineSemantics, lowering_capabilities: LoweringCapabilities, ) -> InterpreterProfile
Sourcepub fn current(
lowering_capabilities: LoweringCapabilities,
) -> InterpreterProfile
pub fn current( lowering_capabilities: LoweringCapabilities, ) -> InterpreterProfile
The semantics this build lowers and executes.
pub fn compiler_semantics(&self) -> CompilerSemantics
pub fn engine_semantics(&self) -> EngineSemantics
pub fn lowering_capabilities(&self) -> &LoweringCapabilities
Sourcepub fn key_for(&self, definition_revision: DefinitionRevision) -> PlanKey
pub fn key_for(&self, definition_revision: DefinitionRevision) -> PlanKey
The key one definition revision has under this profile.
Sourcepub fn lowerable(&self, key: &PlanKey) -> Result<(), LoweringRefusal>
pub fn lowerable(&self, key: &PlanKey) -> Result<(), LoweringRefusal>
Whether this profile can lower a plan for key.
Lowering is a function of the definition, the compiler semantics, and the declared capabilities. The engine semantics travels in the key so identities never alias, and decides run admission instead: an index is still the index of its definition, but the run bound to it may not be advanced here.
Sourcepub fn admit_run(&self, bound: &PlanKey) -> RunAdmission
pub fn admit_run(&self, bound: &PlanKey) -> RunAdmission
Whether this profile may advance a run bound to key.
Sourcepub fn admit_recorded(
&self,
recorded: &RecordedPlanKey,
identity: &PlanIdentity,
) -> RunAdmission
pub fn admit_recorded( &self, recorded: &RecordedPlanKey, identity: &PlanIdentity, ) -> RunAdmission
Whether this profile may advance a run from the binding a checkpoint
recorded, typed under identity’s lines. A record that cannot be typed
— including one declaring a line identity does not bind — is handed
off: an unprovable binding is never reinterpreted as this profile’s
semantics.
Trait Implementations§
Source§impl Clone for InterpreterProfile
impl Clone for InterpreterProfile
Source§fn clone(&self) -> InterpreterProfile
fn clone(&self) -> InterpreterProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InterpreterProfile
impl Debug for InterpreterProfile
impl Eq for InterpreterProfile
Source§impl PartialEq for InterpreterProfile
impl PartialEq for InterpreterProfile
impl StructuralPartialEq for InterpreterProfile
Auto Trait Implementations§
impl Forget for InterpreterProfile
impl Freeze for InterpreterProfile
impl Move for InterpreterProfile
impl RefUnwindSafe for InterpreterProfile
impl Send for InterpreterProfile
impl Sync for InterpreterProfile
impl Unpin for InterpreterProfile
impl UnsafeUnpin for InterpreterProfile
impl UnwindSafe for InterpreterProfile
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
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.