Allow jump tables in wasmtime.

This commit is contained in:
Yury Delendik
2019-07-02 11:54:11 -05:00
committed by Dan Gohman
parent fb9d6061e4
commit 210e959333
7 changed files with 103 additions and 29 deletions

View File

@@ -62,11 +62,11 @@ pub fn emit_functions(
.expect("Missing enable_verifier setting");
for (i, _function_relocs) in relocations.iter() {
let body = compilation.get(i);
let body = &compilation.get(i).body;
let func_index = module.func_index(i);
let string_name = format!("_wasm_function_{}", func_index.index());
obj.define(string_name, body.to_vec())
obj.define(string_name, body.clone())
.map_err(|err| format!("{}", err))?;
}