refactor: integrate compilation-owned identifier interning

This commit is contained in:
2026-10-24 23:47:00 +02:00
parent 0593786553
commit 675fa5049f
17 changed files with 626 additions and 389 deletions
+1 -3
View File
@@ -4,13 +4,11 @@ import "@std/hashmap"
InternError :: enum { out_of_space }
#! identifies a string only within its owning pool.
StringId :: alias u32
no_str :: maxval!(StringId)
#! global pool owned by main.hon; initialize before scanning and release with deinit.
strings StringPool := undefined
#! retains its allocator and owns interned copies; release all storage with deinit.
StringPool :: struct {
ids hashmap.StringHashMap(StringId) # string → id