mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-19 03:41:22 +00:00
Cleanup cranelift validation
This commit is contained in:
@ -156,9 +156,8 @@ impl<
|
|||||||
compiler_config: CompilerConfig,
|
compiler_config: CompilerConfig,
|
||||||
_: Token,
|
_: Token,
|
||||||
) -> CompileResult<ModuleInner> {
|
) -> CompileResult<ModuleInner> {
|
||||||
let res = validate(wasm);
|
if requires_pre_validation(MCG::backend_id()) {
|
||||||
if let Err(e) = res {
|
validate(wasm)?;
|
||||||
return Err(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut mcg = MCG::new();
|
let mut mcg = MCG::new();
|
||||||
@ -191,6 +190,14 @@ impl<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn requires_pre_validation(backend: Backend) -> bool {
|
||||||
|
match backend {
|
||||||
|
Backend::Cranelift => true,
|
||||||
|
Backend::LLVM => false,
|
||||||
|
Backend::Singlepass => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct EventSink<'a, 'b> {
|
pub struct EventSink<'a, 'b> {
|
||||||
buffer: SmallVec<[Event<'a, 'b>; 2]>,
|
buffer: SmallVec<[Event<'a, 'b>; 2]>,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user