Implement mono of crash

This commit is contained in:
Ayaz Hafiz 2022-11-22 15:44:06 -06:00
parent 72ff0cc800
commit c7ef1668d4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
10 changed files with 84 additions and 7 deletions

View file

@ -321,7 +321,7 @@ impl<'a> ParamMap<'a> {
}
Refcounting(_, _) => unreachable!("these have not been introduced yet"),
Ret(_) | Jump(_, _) | RuntimeError(_) => {
Ret(_) | Jump(_, _) | RuntimeError(_) | Crash(..) => {
// these are terminal, do nothing
}
}
@ -827,6 +827,11 @@ impl<'a> BorrowInfState<'a> {
Refcounting(_, _) => unreachable!("these have not been introduced yet"),
Crash(msg, _) => {
// Crash is a foreign call, so we must own the argument.
self.own_var(*msg);
}
Ret(_) | RuntimeError(_) => {
// these are terminal, do nothing
}
@ -1001,7 +1006,7 @@ fn call_info_stmt<'a>(arena: &'a Bump, stmt: &Stmt<'a>, info: &mut CallInfo<'a>)
Refcounting(_, _) => unreachable!("these have not been introduced yet"),
Ret(_) | Jump(_, _) | RuntimeError(_) => {
Ret(_) | Jump(_, _) | RuntimeError(_) | Crash(..) => {
// these are terminal, do nothing
}
}