Implement struct-by-reference for structs over 4 machine words

This commit is contained in:
Ayaz Hafiz 2023-06-12 16:39:20 -05:00
parent e1c874ac23
commit 47fb9fe6f2
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 83 additions and 23 deletions

View file

@ -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),