pub struct SemanticProgram { /* private fields */ }Expand description
Immutable backend-neutral semantic SSA program.
Implementations§
Source§impl SemanticProgram
impl SemanticProgram
Sourcepub fn inputs(&self) -> &[ProgramValue]
pub fn inputs(&self) -> &[ProgramValue]
Borrow ordered external inputs.
Sourcepub fn outputs(&self) -> &[ProgramValue]
pub fn outputs(&self) -> &[ProgramValue]
Borrow ordered program outputs.
Sourcepub fn operations(
&self,
) -> impl ExactSizeIterator<Item = SemanticOperationView<'_>> + '_
pub fn operations( &self, ) -> impl ExactSizeIterator<Item = SemanticOperationView<'_>> + '_
Iterate over operations in semantic order.
Sourcepub fn value_metadata(
&self,
value: ProgramValue,
) -> Result<&ProgramValueMetadata, ProgramQueryError>
pub fn value_metadata( &self, value: ProgramValue, ) -> Result<&ProgramValueMetadata, ProgramQueryError>
Borrow metadata for a value owned by this program.
§Errors
Returns ProgramQueryError::ForeignValue for a foreign token.
Sourcepub fn shape_guards(&self) -> &[ShapeGuard]
pub fn shape_guards(&self) -> &[ShapeGuard]
Borrow all symbolic guards in semantic operation order.
Sourcepub const fn semantic_fingerprint(&self) -> SemanticFingerprint
pub const fn semantic_fingerprint(&self) -> SemanticFingerprint
Return the cached normalized structural fingerprint.
Sourcepub fn semantic_eq(&self, other: &Self) -> bool
pub fn semantic_eq(&self, other: &Self) -> bool
Compare exact normalized semantics after the compact fingerprint check.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SemanticProgram
impl !RefUnwindSafe for SemanticProgram
impl Send for SemanticProgram
impl Sync for SemanticProgram
impl Unpin for SemanticProgram
impl UnsafeUnpin for SemanticProgram
impl !UnwindSafe for SemanticProgram
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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