Integrate Lightbeam (#51)

* Integrate lightbeam
This commit is contained in:
Jef
2019-04-05 21:42:54 +02:00
committed by Dan Gohman
parent a1c123c3dd
commit 9bf6d73210
14 changed files with 351 additions and 85 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.functions[i];
let body = compilation.get(i);
let func_index = module.func_index(i);
let string_name = format!("_wasm_function_{}", func_index.index());
obj.define(string_name, body.clone())
obj.define(string_name, body.to_vec())
.map_err(|err| format!("{}", err))?;
}