mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Minimize mem.zero use
This commit is contained in:
@@ -71,10 +71,6 @@ compare :: inline proc "contextless" (a, b: []byte) -> int {
|
||||
return compare_byte_ptrs(&a[0], &b[0], min(len(a), len(b)));
|
||||
}
|
||||
compare_byte_ptrs :: proc "contextless" (a, b: ^byte, n: int) -> int #no_bounds_check {
|
||||
ptr_idx :: proc(ptr: $P/^$T, n: int) -> T {
|
||||
return ptr_offset(ptr, n)^;
|
||||
}
|
||||
|
||||
x := slice_ptr(a, n);
|
||||
y := slice_ptr(b, n);
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ Proc_Tag :: enum {
|
||||
Bounds_Check,
|
||||
No_Bounds_Check,
|
||||
Require_Results,
|
||||
No_Context,
|
||||
}
|
||||
Proc_Tags :: distinct bit_set[Proc_Tag; u32];
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ pos_compare :: proc(lhs, rhs: Pos) -> int {
|
||||
return strings.compare(lhs.file, rhs.file);
|
||||
}
|
||||
|
||||
using Kind :: enum i32 {
|
||||
using Kind :: enum u16 {
|
||||
Invalid,
|
||||
EOF,
|
||||
Comment,
|
||||
|
||||
Reference in New Issue
Block a user