(
&self,
function: &BNFunction,
llil: &RegularLowLevelILFunction<A>,
)
| 203 | |
| 204 | impl FunctionCache { |
| 205 | pub fn function<A: Architecture>( |
| 206 | &self, |
| 207 | function: &BNFunction, |
| 208 | llil: &RegularLowLevelILFunction<A>, |
| 209 | ) -> Function { |
| 210 | let function_id = FunctionID::from(function); |
| 211 | match self.cache.get(&function_id) { |
| 212 | Some(function) => function.value().to_owned(), |
| 213 | None => { |
| 214 | let function = build_function(function, llil); |
| 215 | self.cache.insert(function_id, function.clone()); |
| 216 | function |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | #[derive(Clone, Debug, Default)] |
no test coverage detected