[−][src]Struct yz_basic_block::Arena
Implementations
impl<S, C> Arena<S, C> where
BasicBlock<S, C, BbId>: ForeachTarget<JumpTarget = BbId>,
[src]
BasicBlock<S, C, BbId>: ForeachTarget<JumpTarget = BbId>,
pub fn check(&self) -> Result<(), OffendingIds>
[src]
Use this method to re-check all references in the Arena
after
modifications via Arena::bbs_mut
.
pub fn push(
&mut self,
bb: BasicBlock<S, C, BbId>
) -> Result<usize, (BasicBlock<S, C, BbId>, OffendingIds)>
[src]
&mut self,
bb: BasicBlock<S, C, BbId>
) -> Result<usize, (BasicBlock<S, C, BbId>, OffendingIds)>
Returns the ID of the newly appended BB if successful, or $bb & the invalid BbIds.
pub fn remove(
&mut self,
bbid: BbId
) -> Option<Result<(BasicBlock<S, C, BbId>, Vec<String>), OffendingIds>>
[src]
&mut self,
bbid: BbId
) -> Option<Result<(BasicBlock<S, C, BbId>, Vec<String>), OffendingIds>>
Removes a BB, fails if any references to it exist. If successful, returns the removed BB and all labels which referenced it. Otherwise, returns the offending BBs (which still reference it)
impl<S, C> Arena<S, C> where
S: ForeachTarget<JumpTarget = BbId>,
C: ForeachTarget<JumpTarget = BbId>,
[src]
S: ForeachTarget<JumpTarget = BbId>,
C: ForeachTarget<JumpTarget = BbId>,
impl<S, C> Arena<S, C>
[src]
pub fn new() -> Self
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn bbs(&self) -> &Map<BbId, BasicBlock<S, C, BbId>>
[src]
pub fn bbs_mut(&mut self) -> &mut Map<BbId, BasicBlock<S, C, BbId>>
[src]
pub fn labels(&self) -> &Map<String, BbId>
[src]
pub fn labels_of_bb(&self, bbid: BbId) -> impl Iterator<Item = &str>
[src]
pub fn label2bb(&self, label: &str) -> Option<(BbId, &BasicBlock<S, C, BbId>)>
[src]
pub fn set_label(
&mut self,
label: Label,
target: BbId,
overwrite: bool
) -> Result<Option<BbId>, SetBbLabelError>
[src]
&mut self,
label: Label,
target: BbId,
overwrite: bool
) -> Result<Option<BbId>, SetBbLabelError>
If this call replaced the current label->BB-ID association, then the old associated BBID is returned.
pub fn shrink_to_fit(&mut self)
[src]
Trait Implementations
impl<S: Debug, C: Debug> Debug for Arena<S, C>
[src]
impl<S, C> Default for Arena<S, C>
[src]
impl<S, C> ForeachTarget for Arena<S, C> where
BasicBlock<S, C, BbId>: ForeachTarget<JumpTarget = BbId>,
[src]
BasicBlock<S, C, BbId>: ForeachTarget<JumpTarget = BbId>,
type JumpTarget = BbId
fn foreach_target<F>(&self, f: F) where
F: FnMut(&Self::JumpTarget),
[src]
F: FnMut(&Self::JumpTarget),
fn foreach_target_mut<F>(&mut self, f: F) where
F: FnMut(&mut Self::JumpTarget),
[src]
F: FnMut(&mut Self::JumpTarget),
Auto Trait Implementations
impl<S, C> RefUnwindSafe for Arena<S, C> where
C: RefUnwindSafe,
S: RefUnwindSafe,
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, C> Send for Arena<S, C> where
C: Send,
S: Send,
C: Send,
S: Send,
impl<S, C> Sync for Arena<S, C> where
C: Sync,
S: Sync,
C: Sync,
S: Sync,
impl<S, C> Unpin for Arena<S, C> where
C: Unpin,
S: Unpin,
C: Unpin,
S: Unpin,
impl<S, C> UnwindSafe for Arena<S, C> where
C: RefUnwindSafe + UnwindSafe,
S: RefUnwindSafe + UnwindSafe,
C: RefUnwindSafe + UnwindSafe,
S: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<C, T> ForeachTarget for C where
T: ForeachTarget,
&'a C: for<'a> IntoIterator,
&'a mut C: for<'a> IntoIterator,
<&'a C as IntoIterator>::Item == &'a T,
<&'a mut C as IntoIterator>::Item == &'a mut T,
[src]
T: ForeachTarget,
&'a C: for<'a> IntoIterator,
&'a mut C: for<'a> IntoIterator,
<&'a C as IntoIterator>::Item == &'a T,
<&'a mut C as IntoIterator>::Item == &'a mut T,
type JumpTarget = <T as ForeachTarget>::JumpTarget
fn foreach_target<F>(&Self, F) where
F: FnMut(&<C as ForeachTarget>::JumpTarget),
[src]
F: FnMut(&<C as ForeachTarget>::JumpTarget),
fn foreach_target_mut<F>(&mut Self, F) where
F: FnMut(&mut <C as ForeachTarget>::JumpTarget),
[src]
F: FnMut(&mut <C as ForeachTarget>::JumpTarget),
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,