Pass arguments.

This commit is contained in:
Sergey Pepyakin
2018-12-11 19:45:33 +01:00
parent 078486e080
commit 0e9ba8332f
3 changed files with 33 additions and 12 deletions

View File

@@ -219,15 +219,12 @@ pub fn translate(
}
Operator::Call { function_index } => {
let callee_ty = translation_ctx.func_type(function_index);
assert!(callee_ty.params.len() == 0, "is not supported");
assert!(callee_ty.returns.len() == 0, "is not supported");
// TODO: ensure that this function is locally defined
// We would like to support imported functions at some point
// TODO: pop arguments and move them in appropriate positions.
// only 6 for now.
pass_outgoing_args(&mut ctx, callee_ty.params.len() as u32);
call_direct(&mut ctx, function_index);
}
_ => {