aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-06-16 12:07:24 +0100
committergingerBill <bill@gingerbill.org>2021-06-16 12:07:24 +0100
commit41f2539484931cd73dfca36dcbdba01e954fc350 (patch)
treea76cd589c96065e2f2becb53004d564b0c6f5ff3 /core
parent8f57bb07991930f242ec4ab4d9fb3a851a4e9662 (diff)
Improve logic for diverging procedures by checking if it terminates
Diffstat (limited to 'core')
-rw-r--r--core/runtime/core.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin
index 8e71e1fa0..2dabbc90f 100644
--- a/core/runtime/core.odin
+++ b/core/runtime/core.odin
@@ -255,7 +255,7 @@ Source_Code_Location :: struct {
procedure: string,
}
-Assertion_Failure_Proc :: #type proc(prefix, message: string, loc: Source_Code_Location);
+Assertion_Failure_Proc :: #type proc(prefix, message: string, loc: Source_Code_Location) -> !;
// Allocation Stuff
Allocator_Mode :: enum byte {
@@ -483,7 +483,7 @@ __init_context :: proc "contextless" (c: ^Context) {
c.logger.data = nil;
}
-default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code_Location) {
+default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code_Location) -> ! {
print_caller_location(loc);
print_string(" ");
print_string(prefix);
@@ -492,6 +492,6 @@ default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code
print_string(message);
}
print_byte('\n');
- debug_trap();
- // trap();
+ // debug_trap();
+ trap();
}