mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-22 15:37:51 +00:00
Add extra zero init for IR
This commit is contained in:
+5
-5
@@ -639,8 +639,7 @@ __print_type :: proc(fd: os.Handle, ti: ^Type_Info) {
|
||||
case uint: os.write_string(fd, "uint");
|
||||
case uintptr: os.write_string(fd, "uintptr");
|
||||
case:
|
||||
if info.signed do os.write_byte(fd, 'i');
|
||||
else do os.write_byte(fd, 'u');
|
||||
os.write_byte(fd, info.signed ? 'i' : 'u');
|
||||
__print_u64(fd, u64(8*ti.size));
|
||||
}
|
||||
case Type_Info_Rune:
|
||||
@@ -785,8 +784,8 @@ assert :: proc "contextless" (condition: bool, message := "", using loc := #call
|
||||
if len(message) > 0 {
|
||||
os.write_string(fd, ": ");
|
||||
os.write_string(fd, message);
|
||||
os.write_byte(fd, '\n');
|
||||
}
|
||||
os.write_byte(fd, '\n');
|
||||
__debug_trap();
|
||||
}
|
||||
return condition;
|
||||
@@ -799,8 +798,8 @@ panic :: proc "contextless" (message := "", using loc := #caller_location) {
|
||||
if len(message) > 0 {
|
||||
os.write_string(fd, ": ");
|
||||
os.write_string(fd, message);
|
||||
os.write_byte(fd, '\n');
|
||||
}
|
||||
os.write_byte(fd, '\n');
|
||||
__debug_trap();
|
||||
}
|
||||
|
||||
@@ -1230,7 +1229,8 @@ __dynamic_map_set :: proc(h: __Map_Header, key: __Map_Key, value: rawptr, loc :=
|
||||
|
||||
|
||||
__dynamic_map_grow :: proc(using h: __Map_Header, loc := #caller_location) {
|
||||
new_count := max(2*m.entries.cap + 8, __INITIAL_MAP_CAP);
|
||||
// TODO(bill): Determine an efficient growing rate
|
||||
new_count := max(4*m.entries.cap + 7, __INITIAL_MAP_CAP);
|
||||
__dynamic_map_rehash(h, new_count, loc);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -165,8 +165,7 @@ write_type :: proc(buf: ^String_Buffer, ti: ^Type_Info) {
|
||||
case uint: write_string(buf, "uint");
|
||||
case uintptr: write_string(buf, "uintptr");
|
||||
case:
|
||||
if info.signed do write_byte(buf, 'i');
|
||||
else do write_byte(buf, 'u');
|
||||
write_byte(buf, info.signed ? 'i' : 'u');
|
||||
write_i64(buf, i64(8*ti.size), 10);
|
||||
}
|
||||
case Type_Info_Rune:
|
||||
|
||||
Reference in New Issue
Block a user