pub struct FunctionPointerTracker { /* private fields */ }Expand description
Tracker for function pointers, closures, and higher-order functions
Implementations§
Source§impl FunctionPointerTracker
impl FunctionPointerTracker
Sourcepub fn analyze_file(&mut self, file_path: &Path, ast: &File) -> Result<()>
pub fn analyze_file(&mut self, file_path: &Path, ast: &File) -> Result<()>
Analyze a file for function pointers and closures
Sourcepub fn get_function_pointer_calls(&self) -> Vector<FunctionPointerCall>
pub fn get_function_pointer_calls(&self) -> Vector<FunctionPointerCall>
Get all function pointer calls that need resolution
Sourcepub fn resolve_pointer_targets(
&self,
pointer_id: &str,
) -> Option<Vector<FunctionId>>
pub fn resolve_pointer_targets( &self, pointer_id: &str, ) -> Option<Vector<FunctionId>>
Resolve a function pointer to its possible targets
Sourcepub fn might_be_called_through_pointer(&self, func_id: &FunctionId) -> bool
pub fn might_be_called_through_pointer(&self, func_id: &FunctionId) -> bool
Check if a function might be called through a function pointer
Sourcepub fn get_higher_order_calls(&self) -> Vector<HigherOrderFunctionCall>
pub fn get_higher_order_calls(&self) -> Vector<HigherOrderFunctionCall>
Get all higher-order function calls
Sourcepub fn get_statistics(&self) -> FunctionPointerStatistics
pub fn get_statistics(&self) -> FunctionPointerStatistics
Get statistics about function pointer usage
Sourcepub fn get_definitely_used_functions(&self) -> HashSet<FunctionId>
pub fn get_definitely_used_functions(&self) -> HashSet<FunctionId>
Get functions that are definitely used through function pointers
Trait Implementations§
Source§impl Clone for FunctionPointerTracker
impl Clone for FunctionPointerTracker
Source§fn clone(&self) -> FunctionPointerTracker
fn clone(&self) -> FunctionPointerTracker
Returns a duplicate 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 Debug for FunctionPointerTracker
impl Debug for FunctionPointerTracker
Auto Trait Implementations§
impl Freeze for FunctionPointerTracker
impl RefUnwindSafe for FunctionPointerTracker
impl Send for FunctionPointerTracker
impl Sync for FunctionPointerTracker
impl Unpin for FunctionPointerTracker
impl UnwindSafe for FunctionPointerTracker
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