also sort by stack size

This commit is contained in:
Folkert 2021-08-07 13:08:55 +02:00
parent 3ca2140b69
commit c09acb255c
2 changed files with 34 additions and 11 deletions

View file

@ -926,6 +926,16 @@ impl RecordFields {
field_types_start,
}
}
#[inline(always)]
pub fn unsorted_iterator<'a>(
&'a self,
subs: &'a Subs,
ext: Variable,
) -> impl Iterator<Item = (&Lowercase, RecordField<Variable>)> + 'a {
let (it, _) = crate::types::gather_fields_unsorted_iter(subs, *self, ext);
it
}
/// Get a sorted iterator over the fields of this record type
///