Add a contains
method to ResultsCursor
This commit is contained in:
parent
e6ec0d125e
commit
e2b9d6ebd6
1 changed files with 7 additions and 0 deletions
|
@ -65,6 +65,13 @@ where
|
|||
&self.state
|
||||
}
|
||||
|
||||
/// Returns `true` if the dataflow state at the current location contains the given element.
|
||||
///
|
||||
/// Shorthand for `self.get().contains(elem)`
|
||||
pub fn contains(&self, elem: A::Idx) -> bool {
|
||||
self.state.contains(elem)
|
||||
}
|
||||
|
||||
/// Resets the cursor to the start of the given basic block.
|
||||
pub fn seek_to_block_start(&mut self, block: BasicBlock) {
|
||||
self.state.overwrite(&self.results.borrow().entry_sets[block]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue