Eliminate Stmt::RuntimeError in favor of crash

This commit is contained in:
Ayaz Hafiz 2022-11-22 18:08:33 -06:00
parent a2f2a18a76
commit 803d7e30e3
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
14 changed files with 115 additions and 130 deletions

View file

@ -41,9 +41,9 @@ use crate::llvm::{
},
};
use super::convert::zig_with_overflow_roc_dec;
use super::{build::throw_internal_exception, convert::zig_with_overflow_roc_dec};
use super::{
build::{load_symbol, load_symbol_and_layout, throw_exception, Env, Scope},
build::{load_symbol, load_symbol_and_layout, Env, Scope},
convert::zig_dec_type,
};
@ -1557,7 +1557,7 @@ fn throw_on_overflow<'a, 'ctx, 'env>(
bd.position_at_end(throw_block);
throw_exception(env, parent, message);
throw_internal_exception(env, parent, message);
bd.position_at_end(then_block);
@ -2003,7 +2003,7 @@ fn int_neg_raise_on_overflow<'a, 'ctx, 'env>(
builder.position_at_end(then_block);
throw_exception(
throw_internal_exception(
env,
parent,
"integer negation overflowed because its argument is the minimum value",
@ -2034,7 +2034,7 @@ fn int_abs_raise_on_overflow<'a, 'ctx, 'env>(
builder.position_at_end(then_block);
throw_exception(
throw_internal_exception(
env,
parent,
"integer absolute overflowed because its argument is the minimum value",