Struct falcon::il::RefProgramLocation
[−]
[src]
pub struct RefProgramLocation<'p> { /* fields omitted */ }
A location applied to a Program
.
Methods
impl<'p> RefProgramLocation<'p>
[src]
pub fn new(
function: &'p Function,
function_location: RefFunctionLocation<'p>
) -> RefProgramLocation<'p>
[src]
function: &'p Function,
function_location: RefFunctionLocation<'p>
) -> RefProgramLocation<'p>
Create a new RefProgramLocation
in the given Program
.
pub fn from_address(
program: &'p Program,
address: u64
) -> Option<RefProgramLocation<'p>>
[src]
program: &'p Program,
address: u64
) -> Option<RefProgramLocation<'p>>
Create a new RefProgramLocation
in the given Program
by finding the
first Instruction
with the given address.
pub fn from_function(function: &Function) -> Option<RefProgramLocation>
[src]
Create a new RefProgramLocation
in the given Program
by finding the
first Instruction
in the given function.
pub fn function(&self) -> &Function
[src]
Get the function for this RefProgramLocation
.
pub fn function_location(&self) -> &RefFunctionLocation
[src]
Get the RefFunctionLocation
for this RefProgramLocation
pub fn block(&self) -> Option<&Block>
[src]
If this RefProgramLocation
references a Block
, get that Block
.
pub fn instruction(&self) -> Option<&Instruction>
[src]
If this RefProgramLocation
references an Instruction
, get that
Instruction
.
pub fn edge(&self) -> Option<&Edge>
[src]
If this RefProgramLocation
references an Edge
, get that Edge
pub fn address(&self) -> Option<u64>
[src]
If this RefProgramLocation
is referencing an Instruction
which has
an address set, return that address.
pub fn migrate<'m>(
&self,
program: &'m Program
) -> Result<RefProgramLocation<'m>>
[src]
&self,
program: &'m Program
) -> Result<RefProgramLocation<'m>>
Apply this RefProgramLocation
to another Program
.
This works by locating the location in the other Program
based on
Function
, Block
, and Instruction
indices.
pub fn forward(&self) -> Result<Vec<RefProgramLocation<'p>>>
[src]
Advance the RefProgramLocation
forward.
This does not follow targets of Operation::Brc
.
pub fn backward(&self) -> Result<Vec<RefProgramLocation<'p>>>
[src]
Advance the RefProgramLocation
backward.
This does not follow targets of Operation::Brc
.
Trait Implementations
impl<'p> Clone for RefProgramLocation<'p>
[src]
fn clone(&self) -> RefProgramLocation<'p>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'p> Debug for RefProgramLocation<'p>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'p> Eq for RefProgramLocation<'p>
[src]
impl<'p> Hash for RefProgramLocation<'p>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'p> Ord for RefProgramLocation<'p>
[src]
fn cmp(&self, __arg_0: &RefProgramLocation<'p>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<'p> PartialEq for RefProgramLocation<'p>
[src]
fn eq(&self, __arg_0: &RefProgramLocation<'p>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RefProgramLocation<'p>) -> bool
[src]
This method tests for !=
.
impl<'p> PartialOrd for RefProgramLocation<'p>
[src]
fn partial_cmp(&self, __arg_0: &RefProgramLocation<'p>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &RefProgramLocation<'p>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &RefProgramLocation<'p>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &RefProgramLocation<'p>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &RefProgramLocation<'p>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'f> Display for RefProgramLocation<'f>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'p> From<RefProgramLocation<'p>> for ProgramLocation
[src]
fn from(program_location: RefProgramLocation) -> ProgramLocation
[src]
Performs the conversion.