First pass update erasure IR

This commit is contained in:
Ayaz Hafiz 2023-07-02 12:38:09 -05:00
parent 7ea85e44d2
commit dc56a0ffef
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 128 additions and 151 deletions

View file

@ -1413,7 +1413,7 @@ impl<'a> ClosureDataKind<'a> {
pub fn data_layout(&self) -> InLayout<'a> {
match self {
Self::LambdaSet(lambda_set) => lambda_set.full_layout,
Self::Erased => Layout::OPAQUE_PTR,
Self::Erased => Layout::ERASED,
}
}
}
@ -2603,14 +2603,6 @@ impl<'a> Layout<'a> {
}
}
/// Index into an [Erased layout][Layout::ERASED].
#[repr(u8)]
pub(crate) enum ErasedIndex {
Value = 0,
Callee = 1,
RefCounter = 2,
}
impl<'a> LayoutRepr<'a> {
pub const UNIT: Self = LayoutRepr::struct_(&[]);
pub const BOOL: Self = LayoutRepr::Builtin(Builtin::Bool);