Returns the address of a finalized function. The pointer remains valid until either [`JITModule::free_memory`] is called or in the future some way of deallocating this individual function is used.
(&self, func_id: FuncId)
| 263 | /// The pointer remains valid until either [`JITModule::free_memory`] is called or in the future |
| 264 | /// some way of deallocating this individual function is used. |
| 265 | pub fn get_finalized_function(&self, func_id: FuncId) -> *const u8 { |
| 266 | let info = &self.compiled_functions[func_id]; |
| 267 | assert!( |
| 268 | !self.functions_to_finalize.iter().any(|x| *x == func_id), |
| 269 | "function not yet finalized" |
| 270 | ); |
| 271 | info.as_ref() |
| 272 | .expect("function must be compiled before it can be finalized") |
| 273 | .ptr() |
| 274 | } |
| 275 | |
| 276 | /// Returns the address and size of a finalized data object. |
| 277 | /// |