MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / register_unwind_info

Method register_unwind_info

crates/wasmtime/src/runtime/code_memory.rs:572–595  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

570 }
571
572 unsafe fn register_unwind_info(&mut self) -> Result<()> {
573 if self.unwind.len() == 0 {
574 return Ok(());
575 }
576 #[cfg(has_host_compiler_backend)]
577 {
578 let text = self.text();
579 let unwind_info = &self.mmap[self.unwind.clone()];
580 let registration = unsafe {
581 crate::runtime::vm::UnwindRegistration::new(
582 text.as_ptr(),
583 unwind_info.as_ptr(),
584 unwind_info.len(),
585 )
586 .context("failed to create unwind info registration")?
587 };
588 self.unwind_registration = Some(registration);
589 return Ok(());
590 }
591 #[cfg(not(has_host_compiler_backend))]
592 {
593 bail!("should not have unwind info for non-native backend")
594 }
595 }
596
597 #[cfg(feature = "debug-builtins")]
598 fn register_debug_image(&mut self) -> Result<()> {

Callers 1

publishMethod · 0.80

Calls 7

OkFunction · 0.85
newFunction · 0.50
lenMethod · 0.45
textMethod · 0.45
cloneMethod · 0.45
contextMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected