pub struct DependencyAnalyzer<'inst> { /* private fields */ }Expand description
Analyzes the dependencies between instructions.
Implementations§
Source§impl<'inst> DependencyAnalyzer<'inst>
impl<'inst> DependencyAnalyzer<'inst>
Sourcepub fn analyze(instructions: &'inst [Instruction]) -> Self
pub fn analyze(instructions: &'inst [Instruction]) -> Self
Sourcepub fn instructions(&self) -> &'inst [Instruction]
pub fn instructions(&self) -> &'inst [Instruction]
Sourcepub fn writers(&self) -> &HashMap<AddressingMode, BTreeSet<ProgramCounter>>
pub fn writers(&self) -> &HashMap<AddressingMode, BTreeSet<ProgramCounter>>
Answer the direct writers of registers and rolling records, indexed by target.
§Returns
The requested map.
Sourcepub fn readers(&self) -> &HashMap<AddressingMode, BTreeSet<ProgramCounter>>
pub fn readers(&self) -> &HashMap<AddressingMode, BTreeSet<ProgramCounter>>
Answer the direct readers of registers and rolling records, indexed by source.
§Returns
The requested map.
Sourcepub fn transitive_dependencies(
&self,
) -> Ref<'_, HashMap<AddressingMode, BTreeSet<ProgramCounter>>>
pub fn transitive_dependencies( &self, ) -> Ref<'_, HashMap<AddressingMode, BTreeSet<ProgramCounter>>>
Compute the transitive dependencies of registers and rolling records, as a map from registers to all instructions that contribute to them.
§Returns
The requested map.
Sourcepub fn transitive_dependents(
&self,
) -> Ref<'_, HashMap<AddressingMode, BTreeSet<ProgramCounter>>>
pub fn transitive_dependents( &self, ) -> Ref<'_, HashMap<AddressingMode, BTreeSet<ProgramCounter>>>
Compute the transitive dependents of registers and rolling records, as a map from registers to all instructions that consume from them.
§Returns
The requested map.
Trait Implementations§
Source§impl<'inst> Clone for DependencyAnalyzer<'inst>
impl<'inst> Clone for DependencyAnalyzer<'inst>
Source§fn clone(&self) -> DependencyAnalyzer<'inst>
fn clone(&self) -> DependencyAnalyzer<'inst>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'inst> Debug for DependencyAnalyzer<'inst>
impl<'inst> Debug for DependencyAnalyzer<'inst>
Source§impl InstructionVisitor<()> for DependencyAnalyzer<'_>
impl InstructionVisitor<()> for DependencyAnalyzer<'_>
Source§fn visit_roll_range(&mut self, inst: &RollRange) -> Result<(), ()>
fn visit_roll_range(&mut self, inst: &RollRange) -> Result<(), ()>
Visit a range roll instruction. Read more
Source§fn visit_roll_standard_dice(
&mut self,
inst: &RollStandardDice,
) -> Result<(), ()>
fn visit_roll_standard_dice( &mut self, inst: &RollStandardDice, ) -> Result<(), ()>
Visit a standard dice roll instruction. Read more
Source§fn visit_roll_custom_dice(&mut self, inst: &RollCustomDice) -> Result<(), ()>
fn visit_roll_custom_dice(&mut self, inst: &RollCustomDice) -> Result<(), ()>
Visit a custom dice roll instruction. Read more
Source§fn visit_drop_lowest(&mut self, inst: &DropLowest) -> Result<(), ()>
fn visit_drop_lowest(&mut self, inst: &DropLowest) -> Result<(), ()>
Visit a drop lowest instruction. Read more
Source§fn visit_drop_highest(&mut self, inst: &DropHighest) -> Result<(), ()>
fn visit_drop_highest(&mut self, inst: &DropHighest) -> Result<(), ()>
Visit a drop highest instruction. Read more
Source§fn visit_sum_rolling_record(
&mut self,
inst: &SumRollingRecord,
) -> Result<(), ()>
fn visit_sum_rolling_record( &mut self, inst: &SumRollingRecord, ) -> Result<(), ()>
Visit a sum rolling record instruction. Read more
Source§fn visit_add(&mut self, inst: &Add) -> Result<(), ()>
fn visit_add(&mut self, inst: &Add) -> Result<(), ()>
Visit an addition instruction. Read more
Source§fn visit_sub(&mut self, inst: &Sub) -> Result<(), ()>
fn visit_sub(&mut self, inst: &Sub) -> Result<(), ()>
Visit a subtraction instruction. Read more
Source§fn visit_mul(&mut self, inst: &Mul) -> Result<(), ()>
fn visit_mul(&mut self, inst: &Mul) -> Result<(), ()>
Visit a multiplication instruction. Read more
Source§impl<'inst> PartialEq for DependencyAnalyzer<'inst>
impl<'inst> PartialEq for DependencyAnalyzer<'inst>
impl<'inst> Eq for DependencyAnalyzer<'inst>
impl<'inst> StructuralPartialEq for DependencyAnalyzer<'inst>
Auto Trait Implementations§
impl<'inst> !Freeze for DependencyAnalyzer<'inst>
impl<'inst> !RefUnwindSafe for DependencyAnalyzer<'inst>
impl<'inst> Send for DependencyAnalyzer<'inst>
impl<'inst> !Sync for DependencyAnalyzer<'inst>
impl<'inst> Unpin for DependencyAnalyzer<'inst>
impl<'inst> UnwindSafe for DependencyAnalyzer<'inst>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more