Pass the wasmparser::Operator by value, simplifying the code.

This commit is contained in:
Dan Gohman
2018-03-09 14:30:26 -08:00
parent 8df9fe6c87
commit 55d0efcb14
2 changed files with 6 additions and 6 deletions

View File

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