Refactor the compilation and instantiation pipeline.

wasmtime-execute is now wasmtime-jit. Move `JITCode` and the TargetIsa
into a new `Compiler` type. `InstancePlus` is no more, with trampoline
functionality now handled by `Compiler`.
This commit is contained in:
Dan Gohman
2019-01-03 06:59:46 -08:00
parent 450a279e18
commit 7592c99f3b
46 changed files with 1225 additions and 1073 deletions

View File

@@ -9,7 +9,7 @@ cargo-fuzz = true
[dependencies]
wasmtime-environ = { path = "../lib/environ" }
wasmtime-execute = { path = "../lib/execute" }
wasmtime-jit = { path = "../lib/jit" }
cranelift-codegen = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-native = "0.26.0"

View File

@@ -6,7 +6,7 @@ extern crate cranelift_codegen;
extern crate cranelift_native;
extern crate wasmparser;
extern crate wasmtime_environ;
extern crate wasmtime_execute;
extern crate wasmtime_jit;
use cranelift_codegen::settings;
use wasmparser::validate;
@@ -28,9 +28,8 @@ fuzz_target!(|data: &[u8]| {
Err(_) => return,
};
let imports_resolver = |_env: &str, _function: &str| None;
let _exec =
match wasmtime_execute::compile_and_link_module(&*isa, &translation, imports_resolver) {
Ok(x) => x,
Err(_) => return,
};
let _exec = match wasmtime_jit::compile_and_link_module(&*isa, &translation, imports_resolver) {
Ok(x) => x,
Err(_) => return,
};
});