mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-24 17:29:26 +00:00
Reset the value stack correctly when entering the 'else' side of an if-else.
This commit is contained in:
@ -1818,6 +1818,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
|
||||
|
||||
self.builder.position_at_end(*if_else_block);
|
||||
self.state.reachable = true;
|
||||
|
||||
if let ControlFrame::IfElse { else_phis, .. } = self.state.frame_at_depth(0)? {
|
||||
// Push our own 'else' phi nodes to the stack.
|
||||
for phi in else_phis.clone().iter() {
|
||||
self.state.push1(phi.as_basic_value());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Operator::End => {
|
||||
|
Reference in New Issue
Block a user