runtime: handle traps on Windows x32. (#1740)

This commit is contained in:
whitequark
2020-05-21 20:07:05 +00:00
committed by GitHub
parent 036c8ec8c5
commit 26ee986c2f
3 changed files with 33 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
//! Stub unwind registry for Windows x32.
use anyhow::{bail, Result};
use cranelift_codegen::isa::{unwind::UnwindInfo, TargetIsa};
pub struct UnwindRegistry {}
impl UnwindRegistry {
pub fn new(_base_address: usize) -> Self {
Self {}
}
pub fn register(&mut self, _func_start: u32, _func_len: u32, _info: &UnwindInfo) -> Result<()> {
bail!("winx32 has no unwind registry")
}
pub fn publish(&mut self, _isa: &dyn TargetIsa) -> Result<()> {
Ok(())
}
}