Struct ena::unify::UnificationTable
[−]
[src]
pub struct UnificationTable<K: UnifyKey> { /* fields omitted */ }
Table of unification keys and their values.
Methods
impl<K: UnifyKey> UnificationTable<K>
[src]
fn new() -> UnificationTable<K>
fn snapshot(&mut self) -> Snapshot<K>
Starts a new snapshot. Each snapshot must be either rolled back or committed in a "LIFO" (stack) order.
fn rollback_to(&mut self, snapshot: Snapshot<K>)
Reverses all changes since the last snapshot. Also removes any keys that have been created since then.
fn commit(&mut self, snapshot: Snapshot<K>)
Commits all changes since the last snapshot. Of course, they can still be undone if there is a snapshot further out.
fn new_key(&mut self, value: K::Value) -> K
fn unioned_keys(&mut self, key: K) -> UnionedKeys<K>
impl<'tcx, K> UnificationTable<K> where K: UnifyKey<Value=()>
[src]
//////////////////////////////////////////////////////////////////////// Base union-find algorithm, where we are just making setes
fn union(&mut self, a_id: K, b_id: K)
fn find(&mut self, id: K) -> K
fn unioned(&mut self, a_id: K, b_id: K) -> bool
impl<'tcx, K, V> UnificationTable<K> where K: Debug + UnifyKey<Value=V>, V: UnifyValue
[src]
//////////////////////////////////////////////////////////////////////// Code to handle keys which carry an optional value, like ints, floats---anything that doesn't have a subtyping relationship we need to worry about.