merge vm_refactor_trap_handling into vm_refactor

This commit is contained in:
Lachlan Sneff
2019-01-21 13:53:33 -08:00
19 changed files with 563 additions and 194 deletions

View File

@ -13,9 +13,7 @@ pub mod import;
pub mod instance;
pub mod memory;
pub mod module;
mod recovery;
mod sig_registry;
mod sighandler;
pub mod structures;
mod sys;
pub mod table;
@ -31,9 +29,10 @@ pub use self::instance::Instance;
pub use self::module::Module;
use std::rc::Rc;
/// Compile a WebAssembly module using the provided compiler.
/// Compile a webassembly module using the provided compiler.
pub fn compile(wasm: &[u8], compiler: &dyn backend::Compiler) -> CompileResult<module::Module> {
let token = backend::Token::generate();
compiler
.compile(wasm)
.compile(wasm, token)
.map(|inner| module::Module::new(Rc::new(inner)))
}