Generate refcounting helper procedures for tag unions

This commit is contained in:
Brian Carroll 2022-01-02 13:58:36 +00:00
parent 2465fe8528
commit 5d7b4018b7
3 changed files with 296 additions and 6 deletions

View file

@ -32,6 +32,12 @@ enum HelperOp {
Eq,
}
impl HelperOp {
fn is_decref(&self) -> bool {
matches!(self, Self::DecRef(_))
}
}
#[derive(Debug)]
struct Specialization<'a> {
op: HelperOp,