Stop leaking stack space on function call

This commit is contained in:
Jef
2018-12-13 10:25:17 +01:00
parent 189996accd
commit 5b448ce3c7
2 changed files with 29 additions and 7 deletions

View File

@@ -225,8 +225,12 @@ pub fn translate(
// TODO: this implementation assumes that this function is locally defined.
pass_outgoing_args(&mut ctx, callee_ty.params.len() as u32);
call_direct(&mut ctx, function_index, callee_ty.returns.len() as u32);
call_direct(
&mut ctx,
function_index,
callee_ty.params.len() as u32,
callee_ty.returns.len() as u32,
);
}
_ => {
trap(&mut ctx);