Make captures niche more private

This commit is contained in:
Ayaz Hafiz 2022-07-01 16:23:44 -04:00 committed by ayazhafiz
parent 71d612078a
commit 8855f269ba
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED
11 changed files with 140 additions and 96 deletions

View file

@ -8,7 +8,7 @@ use crate::ir::{
Call, CallSpecId, CallType, Expr, HostExposedLayouts, JoinPointId, ModifyRc, Proc, ProcLayout,
SelfRecursive, Stmt, UpdateModeId,
};
use crate::layout::{Builtin, LambdaName, Layout, UnionLayout};
use crate::layout::{Builtin, CapturesNiche, LambdaName, Layout, UnionLayout};
mod equality;
mod refcount;
@ -375,23 +375,23 @@ impl<'a> CodeGenHelp<'a> {
HelperOp::Inc => ProcLayout {
arguments: self.arena.alloc([*layout, self.layout_isize]),
result: LAYOUT_UNIT,
captures_niche: &[],
captures_niche: CapturesNiche::no_niche(),
},
HelperOp::Dec => ProcLayout {
arguments: self.arena.alloc([*layout]),
result: LAYOUT_UNIT,
captures_niche: &[],
captures_niche: CapturesNiche::no_niche(),
},
HelperOp::Reset => ProcLayout {
arguments: self.arena.alloc([*layout]),
result: *layout,
captures_niche: &[],
captures_niche: CapturesNiche::no_niche(),
},
HelperOp::DecRef(_) => unreachable!("No generated Proc for DecRef"),
HelperOp::Eq => ProcLayout {
arguments: self.arena.alloc([*layout, *layout]),
result: LAYOUT_BOOL,
captures_niche: &[],
captures_niche: CapturesNiche::no_niche(),
},
};