mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-19 18:19:46 +00:00
Implement struct-by-reference for structs over 4 machine words
This commit is contained in:
parent
e1c874ac23
commit
47fb9fe6f2
5 changed files with 83 additions and 23 deletions
|
@ -2617,6 +2617,11 @@ impl<'a> LayoutRepr<'a> {
|
|||
}
|
||||
}
|
||||
LayoutRepr::Union(UnionLayout::NonRecursive(_)) => true,
|
||||
LayoutRepr::Struct(_) => {
|
||||
// TODO: write tests for this!
|
||||
self.stack_size(interner, target_info) as usize > target_info.max_by_value_size()
|
||||
}
|
||||
|
||||
LayoutRepr::LambdaSet(lambda_set) => interner
|
||||
.get_repr(lambda_set.runtime_representation())
|
||||
.is_passed_by_reference(interner, target_info),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue