Add a WebAssembly function translator.

The new FuncTranslator type can be used to translate binary WebAssembly
functions to Cretonne IL one at a time. It is independent of the
module-level parser also present in the cretonne-wasm crate.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-01 13:19:31 -07:00
parent c0f3eaafbc
commit 439a40e5e4
3 changed files with 327 additions and 9 deletions

View File

@@ -14,15 +14,18 @@
extern crate wasmparser;
extern crate cton_frontend;
#[macro_use(dbg)]
extern crate cretonne;
mod code_translator;
mod func_translator;
mod module_translator;
mod runtime;
mod sections_translator;
mod state;
mod translation_utils;
pub use func_translator::FuncTranslator;
pub use module_translator::{translate_module, TranslationResult};
pub use runtime::{FuncEnvironment, WasmRuntime, DummyRuntime, GlobalValue};
pub use translation_utils::{FunctionIndex, GlobalIndex, TableIndex, MemoryIndex, SignatureIndex,