From 6f97ebd5f7b83d92af2cbeb2a42b32448877e297 Mon Sep 17 00:00:00 2001 From: losfair Date: Thu, 21 Feb 2019 21:12:58 +0800 Subject: [PATCH] Remove a hack in parser. --- lib/dynasm-backend/src/parse.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/dynasm-backend/src/parse.rs b/lib/dynasm-backend/src/parse.rs index 51b17417f..daa84a139 100644 --- a/lib/dynasm-backend/src/parse.rs +++ b/lib/dynasm-backend/src/parse.rs @@ -288,18 +288,10 @@ pub fn read_module< fcg.feed_local(ty, count as usize)?; } fcg.begin_body()?; - let mut last_is_return = false; for op in item.get_operators_reader()? { let op = op?; - last_is_return = match op { - Operator::Return => true, - _ => false, - }; fcg.feed_opcode(op)?; } - if !last_is_return { - fcg.feed_opcode(Operator::Return)?; - } fcg.finalize()?; } }