pub trait SSAStatement<Cfg: SSAConfig>: Clone {
// Required methods
fn variables_written(&self) -> HashSet<Cfg::Variable>;
fn new_phi_statement(name: &Cfg::Variable, env: &Cfg::Environment) -> Self;
fn is_phi_statement(&self) -> bool;
fn is_phi_statement_for(&self, var: &Cfg::Variable) -> bool;
fn ensure_phi_argument(&mut self, env: &Cfg::Environment);
fn insert_ssa_variables(
&mut self,
env: &mut Cfg::Environment,
) -> SSAResult<()>;
}Expand description
A statement in the language.
Required Methods§
Sourcefn variables_written(&self) -> HashSet<Cfg::Variable>
fn variables_written(&self) -> HashSet<Cfg::Variable>
Returns the set of variables written by statement.
Sourcefn new_phi_statement(name: &Cfg::Variable, env: &Cfg::Environment) -> Self
fn new_phi_statement(name: &Cfg::Variable, env: &Cfg::Environment) -> Self
Returns a new phi statement (with empty RHS) for the given variable.
Sourcefn is_phi_statement(&self) -> bool
fn is_phi_statement(&self) -> bool
Returns true iff the statement is a phi statement.
Sourcefn is_phi_statement_for(&self, var: &Cfg::Variable) -> bool
fn is_phi_statement_for(&self, var: &Cfg::Variable) -> bool
Returns true iff the statement is a phi statement for the given variable.
Sourcefn ensure_phi_argument(&mut self, env: &Cfg::Environment)
fn ensure_phi_argument(&mut self, env: &Cfg::Environment)
Ensure that the phi expression argument list of a phi statement contains the current version of the variable, according to the given environment.
Panics if the statement is not a phi statement.
Sourcefn insert_ssa_variables(&mut self, env: &mut Cfg::Environment) -> SSAResult<()>
fn insert_ssa_variables(&mut self, env: &mut Cfg::Environment) -> SSAResult<()>
Replace each variable occurring in the statement by the corresponding versioned SSA variable.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.