Skip to main content

InterpreterProfile

Struct InterpreterProfile 

Source
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

Source

pub fn new( compiler_semantics: CompilerSemantics, engine_semantics: EngineSemantics, lowering_capabilities: LoweringCapabilities, ) -> InterpreterProfile

Source

pub fn current( lowering_capabilities: LoweringCapabilities, ) -> InterpreterProfile

The semantics this build lowers and executes.

Source

pub fn compiler_semantics(&self) -> CompilerSemantics

Source

pub fn engine_semantics(&self) -> EngineSemantics

Source

pub fn lowering_capabilities(&self) -> &LoweringCapabilities

Source

pub fn key_for(&self, definition_revision: DefinitionRevision) -> PlanKey

The key one definition revision has under this profile.

Source

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.

Source

pub fn admit_run(&self, bound: &PlanKey) -> RunAdmission

Whether this profile may advance a run bound to key.

Source

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

Source§

fn clone(&self) -> InterpreterProfile

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InterpreterProfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for InterpreterProfile

Source§

impl PartialEq for InterpreterProfile

Source§

fn eq(&self, other: &InterpreterProfile) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for InterpreterProfile

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.