(&self, store: &mut StoreOpaque, index: EntityIndex)
| 334 | } |
| 335 | |
| 336 | fn debug_export(&self, store: &mut StoreOpaque, index: EntityIndex) -> Option<Extern> { |
| 337 | if !store.engine().tunables().debug_guest { |
| 338 | return None; |
| 339 | } |
| 340 | |
| 341 | let env_module = self._module(store).env_module(); |
| 342 | if !env_module.is_valid(index) { |
| 343 | return None; |
| 344 | } |
| 345 | let store_id = store.id(); |
| 346 | let (instance, registry) = store.instance_and_module_registry_mut(self.id()); |
| 347 | // SAFETY: the `store` and `registry` are associated with |
| 348 | // this instance as we fetched the instance directly from |
| 349 | // the store above. |
| 350 | let export = unsafe { instance.get_export_by_index_mut(registry, store_id, index) }; |
| 351 | Some(Extern::from_wasmtime_export(export, store.engine())) |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | impl<'a, T> StoreContext<'a, T> { |
no test coverage detected