add ir unknowninc instruction

This commit is contained in:
Folkert 2021-05-16 17:25:01 +02:00
parent c2108d4ecd
commit ebd62485df
7 changed files with 56 additions and 14 deletions

View file

@ -468,7 +468,16 @@ impl<'a> Context<'a> {
arguments,
});
&*self.arena.alloc(Stmt::Let(z, v, l, b))
let mut b = Stmt::Let(z, v, l, b);
if !ps[1].borrow {
b = Stmt::Refcounting(
ModifyRc::Inc(arguments[2], 2),
self.arena.alloc(b),
)
}
&*self.arena.alloc(b)
}
None => unreachable!(),
}