cranelift-wasm hooks to instrument wasm operators (#861)

* cranelift-wasm hooks to instrument wasm operators
This commit is contained in:
Andy Wortman
2019-07-25 09:36:17 -07:00
committed by GitHub
parent feecd23967
commit b7a9d65458
4 changed files with 84 additions and 54 deletions

View File

@@ -207,7 +207,9 @@ fn parse_function_body<FE: FuncEnvironment + ?Sized>(
while !state.control_stack.is_empty() {
builder.set_srcloc(cur_srcloc(&reader));
let op = reader.read_operator()?;
translate_operator(op, builder, state, environ)?;
environ.before_translate_operator(&op, builder)?;
translate_operator(&op, builder, state, environ)?;
environ.after_translate_operator(&op, builder)?;
}
// The final `End` operator left us in the exit block where we need to manually add a return