Fix types SoA usage in solve

This commit is contained in:
Ayaz Hafiz 2022-11-09 09:11:56 -06:00
parent 6b5f632364
commit a2e90c3709
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
6 changed files with 30 additions and 16 deletions

View file

@ -586,6 +586,13 @@ impl Types {
(tags, payload_slices)
}
/// # Safety
///
/// May only be called if `var` is known to represent the type at `index`.
pub unsafe fn set_variable(&mut self, index: Index<TypeTag>, var: Variable) {
self.tags[index.index()] = TypeTag::Variable(var);
}
fn reserve_type_tags(&mut self, length: usize) -> Slice<TypeTag> {
use std::iter::repeat;