[wasm] Pass translation state along for before/after_translate_operator callbacks (#879)
This commit is contained in:
committed by
Benjamin Bouvier
parent
5ca13a70a5
commit
b5cb8556f6
@@ -207,9 +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()?;
|
||||
environ.before_translate_operator(&op, builder)?;
|
||||
environ.before_translate_operator(&op, builder, state)?;
|
||||
translate_operator(&op, builder, state, environ)?;
|
||||
environ.after_translate_operator(&op, builder)?;
|
||||
environ.after_translate_operator(&op, builder, state)?;
|
||||
}
|
||||
|
||||
// The final `End` operator left us in the exit block where we need to manually add a return
|
||||
|
||||
Reference in New Issue
Block a user