diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin index 6c29c51e3..e9fd7a211 100644 --- a/core/mem/allocators.odin +++ b/core/mem/allocators.odin @@ -149,7 +149,7 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, scratch_allocator_init(s, DEFAULT_BACKING_SIZE); } -size := size; + size := size; switch mode { case .Alloc: @@ -673,7 +673,6 @@ dynamic_pool_alloc :: proc(using pool: ^Dynamic_Pool, bytes: int) -> rawptr { current_block = new_block; } - n := bytes; extra := alignment - (n % alignment); n += extra; diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin index 6c597fd34..6e1cacd81 100644 --- a/core/os/os_darwin.odin +++ b/core/os/os_darwin.odin @@ -503,7 +503,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) { } rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator); - + path_ptr := _unix_realpath(rel_cstr, nil); if path_ptr == nil { return "", Errno(get_last_error()); @@ -566,7 +566,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) { return ERROR_NONE; } -exit :: proc(code: int) -> ! { +exit :: proc "contextless" (code: int) -> ! { _unix_exit(code); } diff --git a/core/os/os_freebsd.odin b/core/os/os_freebsd.odin index baef08f14..137c6f864 100644 --- a/core/os/os_freebsd.odin +++ b/core/os/os_freebsd.odin @@ -421,7 +421,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) { return ERROR_NONE; } -exit :: proc(code: int) -> ! { +exit :: proc "contextless" (code: int) -> ! { _unix_exit(c.int(code)); } diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin index 2280f67c7..dd0914f40 100644 --- a/core/os/os_linux.odin +++ b/core/os/os_linux.odin @@ -590,7 +590,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) { return ERROR_NONE; } -exit :: proc(code: int) -> ! { +exit :: proc "contextless" (code: int) -> ! { _unix_exit(c.int(code)); } diff --git a/core/os/os_windows.odin b/core/os/os_windows.odin index c360bbca0..c8e4f8382 100644 --- a/core/os/os_windows.odin +++ b/core/os/os_windows.odin @@ -127,7 +127,7 @@ get_page_size :: proc() -> int { -exit :: proc(code: int) -> ! { +exit :: proc "contextless" (code: int) -> ! { win32.ExitProcess(win32.DWORD(code)); } diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 7e01146e5..8763b9b8b 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -496,4 +496,5 @@ default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code } print_byte('\n'); debug_trap(); + // trap(); } diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index 5aa1d2602..f5e404863 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -687,6 +687,7 @@ EXCEPTION_EXECUTE_HANDLER: LONG : 1; EXCEPTION_MAXIMUM_PARAMETERS :: 15; EXCEPTION_DATATYPE_MISALIGNMENT :: 0x80000002; +EXCEPTION_BREAKPOINT :: 0x80000003; EXCEPTION_ACCESS_VIOLATION :: 0xC0000005; EXCEPTION_ILLEGAL_INSTRUCTION :: 0xC000001D; EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C;