Port Zig's std.hash.Wyhash to C (same secret constants, CONDOM=0 mum)
and replace ipHashCombine (boost golden ratio) with Wyhash in ipHashKey.
This aligns the C InternPool's hashing strategy with upstream Zig, which
uses Wyhash for all key hashing including NamespaceType keys.
Tests verify C and Zig Wyhash produce identical results for all standard
test vectors, streaming in various chunk sizes, autoHash equivalence for
u32/u64, and a large 8KB buffer.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Port module-level analysis infrastructure from upstream Zig to create
InternPool entries that match the Zig compiler's output. This is the
first step toward closing the IP gap for neghf2.zig (corpus test 4).
- Add Nav struct to intern_pool.h with ipCreateDeclNav/ipGetNav/
ipResetNavs/ipNavCount management functions
- Add IP_KEY_PTR_NAV to InternPool (hash, equality, typeOf)
- Add SemaNamespace struct to sema.h for declaration grouping
- Port createFileRootStruct, scanNamespace from PerThread.zig
- Port ensureFileAnalyzed for recursive import resolution
- Add resolveModuleDeclImports: creates type_struct + type_pointer +
ptr_nav entries for import declarations, matching upstream order
- Add internPtrConst and internNavPtr helpers (from analyzeNavRefInner)
The C sema now creates entries [124-129] matching the Zig compiler:
type_struct(neghf2), type_struct(common), type_pointer(*const type),
ptr_nav(common), type_struct(std), ptr_nav(std). The remaining ~870
entries will be added in subsequent commits.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consolidate the two separate test modules (test_mod via
lib/std/zig/zig0_test.zig + astgen_test_mod via stage0_test_root.zig)
into a single test module rooted at stage0_test_root.zig.
The zig0_test.zig bridge approach ran std's parser/tokenizer tests with
C comparison enabled, but the stage0/ test files already do the same
C-vs-Zig comparison directly via @cImport. The only "lost" tests are an
unnamed root test block and a Zig-only fuzz test — no zig0 coverage lost.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>