mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-14 06:35:40 +00:00
Remove a hack in parser.
This commit is contained in:
parent
aaabbf169c
commit
6f97ebd5f7
@ -288,18 +288,10 @@ pub fn read_module<
|
|||||||
fcg.feed_local(ty, count as usize)?;
|
fcg.feed_local(ty, count as usize)?;
|
||||||
}
|
}
|
||||||
fcg.begin_body()?;
|
fcg.begin_body()?;
|
||||||
let mut last_is_return = false;
|
|
||||||
for op in item.get_operators_reader()? {
|
for op in item.get_operators_reader()? {
|
||||||
let op = op?;
|
let op = op?;
|
||||||
last_is_return = match op {
|
|
||||||
Operator::Return => true,
|
|
||||||
_ => false,
|
|
||||||
};
|
|
||||||
fcg.feed_opcode(op)?;
|
fcg.feed_opcode(op)?;
|
||||||
}
|
}
|
||||||
if !last_is_return {
|
|
||||||
fcg.feed_opcode(Operator::Return)?;
|
|
||||||
}
|
|
||||||
fcg.finalize()?;
|
fcg.finalize()?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user