SoA Types get variable emplacement (!)

We're now reaching the steady state we want to be closert to - when a
type is translated to a variable, emplace the variable we created for it
in the type index, so that types are never converted again!
This commit is contained in:
Ayaz Hafiz 2022-11-09 14:56:34 -06:00
parent d93147dd25
commit 5564796927
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 110 additions and 86 deletions

View file

@ -771,7 +771,7 @@ fn could_be_a_tag_union(types: &Types, constraints: &mut Constraints, typ: TypeO
Ok(typ_index) => {
let typ_cell = &mut constraints.types[typ_index.index()];
!matches!(
types[*typ_cell.get_mut()],
types[*typ_cell.get_mut()].get(),
TypeTag::Apply { .. } | TypeTag::Function(..) | TypeTag::Record(..)
)
}