align with new @hide syntax

This commit is contained in:
2026-08-10 22:48:38 +02:00
parent 8de7ec341e
commit 891dc6516e
13 changed files with 150 additions and 94 deletions
+6 -3
View File
@@ -132,7 +132,8 @@ put proc(
}
}
hide normalize proc(hash usize) usize {
@hide
normalize proc(hash usize) usize {
# mapping both 0 and 1 to 1 is safe because equality resolves
# collisions (since hash and key must both be equal).
if (hash == 0) return 1
@@ -141,7 +142,8 @@ hide normalize proc(hash usize) usize {
#! FNV-1a hash implementation.
#! note: vulnerable to collision attacks.
hide str_hash proc(key []u8) usize {
@hide
str_hash proc(key []u8) usize {
hash u32 := 2166136261 # offset basis
prime u32 := 16777619
@@ -153,4 +155,5 @@ hide str_hash proc(key []u8) usize {
return usize(hash)
}
hide str_eql proc(a, b []u8) bool { return mem.eql(a, b) }
@hide
str_eql proc(a, b []u8) bool { return mem.eql(a, b) }