Move all os specific stuff for the runtime to one file

This commit is contained in:
gingerBill
2020-09-15 12:19:56 +01:00
parent 17b3c2ed4c
commit 9d91c46cb4
5 changed files with 272 additions and 151 deletions
+15
View File
@@ -522,6 +522,21 @@ init_global_temporary_allocator :: proc(data: []byte, backup_allocator := contex
}
default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code_Location) {
fd := os_stderr();
print_caller_location(fd, loc);
print_string(fd, " ");
print_string(fd, prefix);
if len(message) > 0 {
print_string(fd, ": ");
print_string(fd, message);
}
print_byte(fd, '\n');
debug_trap();
}
@builtin
copy_slice :: proc "contextless" (dst, src: $T/[]$E) -> int {