Bladeren bron

Minor fixes

gingerBill 4 jaren geleden
bovenliggende
commit
359ae29d98

+ 1 - 2
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;

+ 2 - 2
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);
 }
 

+ 1 - 1
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));
 }
 

+ 1 - 1
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));
 }
 

+ 1 - 1
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));
 }
 

+ 1 - 0
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();
 }

+ 1 - 0
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;