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

@@ -2596,8 +2596,9 @@ main :: () -> s32 {
```
modules/std.sx the prelude — print/format, string ops (concat, substr,
path_join, ...), List(T), Context + push, the Allocator
protocol; plus the namespace tail:
mem / xml / log :: #import "modules/std/<m>.sx"
protocol; plus the namespace tail: mem / xml / log /
fs / process / socket / json / cli / hash / test ::
#import "modules/std/<m>.sx"
modules/std/ mem.sx (CAllocator, GPA, Arena, TrackingAllocator),
fs.sx, process.sx, socket.sx, json.sx, cli.sx, hash.sx,
xml.sx, log.sx, trace.sx, test.sx
@@ -2612,9 +2613,9 @@ modules/gpu/, modules/ui/ GPU protocol + retained UI toolkit
```
`#import "modules/std.sx"` gives every prelude name bare, plus `mem.GPA`,
`xml.escape`, `log.warn`, ... through the carried namespace tail (see
Namespace Alias Carry). The remaining `std/` modules are imported directly
(`#import "modules/std/json.sx"`) until they join the tail.
`json.parse`, `fs.exists`, `hash.sha256_hex`, `log.warn`, ... through the
carried namespace tail (see Namespace Alias Carry). Direct file imports
(`#import "modules/std/json.sx"`) remain available for bare access.
---