Struct cwe_checker_lib::intermediate_representation::Sub
source · pub struct Sub {
pub name: String,
pub blocks: Vec<Term<Blk>>,
pub calling_convention: Option<String>,
}
Expand description
A Sub
or subroutine represents a function with a given name and a list of basic blocks belonging to it.
Subroutines are single-entry,
i.e. calling a subroutine will execute the first block in the list of basic blocks.
A subroutine may have multiple exits, which are identified by Jmp::Return
instructions.
Fields§
§name: String
The name of the subroutine
blocks: Vec<Term<Blk>>
The basic blocks belonging to the subroutine. The first block is also the entry point of the subroutine.
calling_convention: Option<String>
The calling convention used to call if known
Trait Implementations§
source§impl<'de> Deserialize<'de> for Sub
impl<'de> Deserialize<'de> for Sub
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Sub
impl StructuralEq for Sub
impl StructuralPartialEq for Sub
Auto Trait Implementations§
impl RefUnwindSafe for Sub
impl Send for Sub
impl Sync for Sub
impl Unpin for Sub
impl UnwindSafe for Sub
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.