Impl GenKill for old dataflow framework's GenKillSet

This impl is temporary and will be removed along with the old dataflow
framework. It allows us to reuse the transfer function of new dataflow
analyses when defining old ones
This commit is contained in:
Dylan MacKenzie 2020-02-12 13:33:43 -08:00
parent 2ed25f0697
commit fc5c2956b1

View file

@ -395,5 +395,16 @@ impl<T: Idx> GenKill<T> for BitSet<T> {
}
}
// For compatibility with old framework
impl<T: Idx> GenKill<T> for crate::dataflow::GenKillSet<T> {
fn gen(&mut self, elem: T) {
self.gen(elem);
}
fn kill(&mut self, elem: T) {
self.kill(elem);
}
}
#[cfg(test)]
mod tests;