mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +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
|
@ -67,6 +67,11 @@ impl TargetInfo {
|
|||
}
|
||||
}
|
||||
|
||||
pub const fn max_by_value_size(&self) -> usize {
|
||||
// Pass values larger than 4 machine words by reference.
|
||||
self.ptr_size() * 4
|
||||
}
|
||||
|
||||
pub const fn ptr_alignment_bytes(&self) -> usize {
|
||||
self.architecture.ptr_alignment_bytes()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue