mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Merge pull request #2083 from rtfeldman/layout-soa
Layout Struct of Arrays
This commit is contained in:
commit
8eb74da0f3
4 changed files with 911 additions and 4 deletions
|
@ -2367,7 +2367,7 @@ fn layout_from_tag_union<'a>(
|
|||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
fn ext_var_is_empty_record(subs: &Subs, ext_var: Variable) -> bool {
|
||||
pub fn ext_var_is_empty_record(subs: &Subs, ext_var: Variable) -> bool {
|
||||
// the ext_var is empty
|
||||
let fields = roc_types::types::gather_fields(subs, RecordFields::empty(), ext_var);
|
||||
|
||||
|
@ -2375,13 +2375,13 @@ fn ext_var_is_empty_record(subs: &Subs, ext_var: Variable) -> bool {
|
|||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
fn ext_var_is_empty_record(_subs: &Subs, _ext_var: Variable) -> bool {
|
||||
pub fn ext_var_is_empty_record(_subs: &Subs, _ext_var: Variable) -> bool {
|
||||
// This should only ever be used in debug_assert! macros
|
||||
unreachable!();
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
fn ext_var_is_empty_tag_union(subs: &Subs, ext_var: Variable) -> bool {
|
||||
pub fn ext_var_is_empty_tag_union(subs: &Subs, ext_var: Variable) -> bool {
|
||||
// the ext_var is empty
|
||||
let mut ext_fields = std::vec::Vec::new();
|
||||
match roc_types::pretty_print::chase_ext_tag_union(subs, ext_var, &mut ext_fields) {
|
||||
|
@ -2391,7 +2391,7 @@ fn ext_var_is_empty_tag_union(subs: &Subs, ext_var: Variable) -> bool {
|
|||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
fn ext_var_is_empty_tag_union(_: &Subs, _: Variable) -> bool {
|
||||
pub fn ext_var_is_empty_tag_union(_: &Subs, _: Variable) -> bool {
|
||||
// This should only ever be used in debug_assert! macros
|
||||
unreachable!();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue