pub struct SsaContext {
pub current_versions: HashMap<String, SsaVersion>,
pub next_version: SsaVersion,
}
Expand description
Context for the SSA transformation.
Fields§
§current_versions: HashMap<String, SsaVersion>
The current versions of variables.
next_version: SsaVersion
The next version to assign.
Implementations§
Source§impl SsaContext
impl SsaContext
Sourcepub fn new_ssa_version_for(&mut self, location: &str) -> SsaVersion
pub fn new_ssa_version_for(&mut self, location: &str) -> SsaVersion
Creates a new SSA version for the given variable.
Sourcepub fn current_version_of(&self, location: &str) -> Option<SsaVersion>
pub fn current_version_of(&self, location: &str) -> Option<SsaVersion>
Returns the current version of the given variable.
Sourcepub fn current_version_of_or_new(&mut self, location: &str) -> SsaVersion
pub fn current_version_of_or_new(&mut self, location: &str) -> SsaVersion
Returns the current version of the given variable, or creates a new one if it doesn’t exist.
Trait Implementations§
Source§impl Clone for SsaContext
impl Clone for SsaContext
Source§fn clone(&self) -> SsaContext
fn clone(&self) -> SsaContext
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SsaContext
impl Debug for SsaContext
Source§impl Default for SsaContext
impl Default for SsaContext
Source§impl<'de> Deserialize<'de> for SsaContext
impl<'de> Deserialize<'de> for SsaContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SsaContext
impl RefUnwindSafe for SsaContext
impl Send for SsaContext
impl Sync for SsaContext
impl Unpin for SsaContext
impl UnwindSafe for SsaContext
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