mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge pull request #2795 from rtfeldman/i/2582
Deal with fastcc return-by-pointer convention correctly
This commit is contained in:
commit
b35cc6ac8c
2 changed files with 12 additions and 1 deletions
|
@ -3896,8 +3896,10 @@ fn make_exception_catching_wrapper<'a, 'ctx, 'env>(
|
|||
let argument_types = match RocReturn::from_layout(env, &return_layout) {
|
||||
RocReturn::Return => roc_function_type.get_param_types(),
|
||||
RocReturn::ByPointer => {
|
||||
// Our fastcc passes the return pointer as the last parameter.
|
||||
// Remove the return pointer since we now intend to return the result by value.
|
||||
let mut types = roc_function_type.get_param_types();
|
||||
types.remove(0);
|
||||
types.pop();
|
||||
|
||||
types
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue