std: full namespace tail — fs/process/socket/json/cli/hash/test

With 0115's own-wins globals landed, the remaining tail modules join
std.sx: every '#import "modules/std.sx"' now carries mem/xml/log/fs/
process/socket/json/cli/hash/test as namespaces (trace stays a direct
import).

Enablers in the same change:
- emit: dead-global elimination — a plain-data global no instruction
  references is not emitted, so tail modules' data (hash's 64-entry K
  table, OS/ARCH/POINTER_SIZE) stays out of binaries that don't use it.
  Comptime-backed globals keep their #run evaluation. 37 pinned IR
  snapshots regenerated (dead globals dropped + string renumbering from
  the larger module).
- 1055/1056 stop pinning the global error-tag ordinal (it shifts with
  program composition); they assert nonzero + tag identity + name.
- specs/readme/CLAUDE.md tail docs updated.
This commit is contained in:
agra
2026-06-11 10:49:39 +03:00
parent 0b13498e25
commit 330c3aeef7
47 changed files with 129030 additions and 28600 deletions

View File

@@ -43,7 +43,7 @@ main :: () -> s32 {
// ── F1 error (explicit tuple): right tag flows, no panic ──
c2, e2 := classify("bad");
print("F1 bad: err int = {}\n", cast(s64) e2); // 1
print("F1 bad: err nonzero = {}\n", cast(s64) e2 != 0); // true (ordinal is program-global, not pinned)
if e2 == error.Nope { print("F1 bad: is Nope (ok)\n"); } else { print("F1 bad: not Nope (WRONG)\n"); }
print("F1 bad: tag name = {}\n", error_tag_name(e2)); // Nope
@@ -59,7 +59,7 @@ main :: () -> s32 {
// ── F2 error (comptime-param, inline error path): right tag ──
c5, e5 := ct_pick(7, "x");
print("F2 err: err int = {}\n", cast(s64) e5); // 1
print("F2 err: err nonzero = {}\n", cast(s64) e5 != 0); // true (ordinal is program-global, not pinned)
if e5 == error.Nope { print("F2 err: is Nope (ok)\n"); } else { print("F2 err: not Nope (WRONG)\n"); }
return 0;