MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / cached_function

Function cached_function

plugins/warp/src/cache.rs:71–87  ·  view source on GitHub ↗
(
    function: &BNFunction,
    llil: &RegularLowLevelILFunction<A>,
)

Source from the content-addressed store, hash-verified

69}
70
71pub fn cached_function<A: Architecture>(
72 function: &BNFunction,
73 llil: &RegularLowLevelILFunction<A>,
74) -> Function {
75 let view = function.view();
76 let view_id = ViewID::from(view.as_ref());
77 let function_cache = FUNCTION_CACHE.get_or_init(Default::default);
78 match function_cache.get(&view_id) {
79 Some(cache) => cache.function(function, llil),
80 None => {
81 let cache = FunctionCache::default();
82 let function = cache.function(function, llil);
83 function_cache.insert(view_id, cache);
84 function
85 }
86 }
87}
88
89pub fn cached_call_site_constraints(function: &BNFunction) -> HashSet<FunctionConstraint> {
90 let view = function.view();

Callers 3

actionMethod · 0.85
actionMethod · 0.85
data_from_viewFunction · 0.85

Calls 5

viewMethod · 0.45
as_refMethod · 0.45
getMethod · 0.45
functionMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected