rename Unreachable -> Rethrow

This commit is contained in:
Folkert 2021-01-07 20:19:12 +01:00
parent 9dd02ea090
commit e005dbde4c
5 changed files with 15 additions and 20 deletions

View file

@ -1494,9 +1494,9 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
call,
layout,
pass,
fail: roc_mono::ir::Stmt::Unreachable,
fail: roc_mono::ir::Stmt::Rethrow,
} => {
// when the fail case is just Unreachable, there is no cleanup work to do
// when the fail case is just Rethrow, there is no cleanup work to do
// so we can just treat this invoke as a normal call
let stmt =
roc_mono::ir::Stmt::Let(*symbol, Expr::Call(call.clone()), layout.clone(), pass);
@ -1561,7 +1561,7 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
}
},
Unreachable => {
Rethrow => {
cxa_rethrow_exception(env);
// used in exception handling