std: restructure — std/ modules, namespace tail, std/xml.sx
allocators/fs/process/socket/log/trace/test move under modules/std/ (allocators.sx becomes std/mem.sx; the Allocator protocol moves into the std.sx prelude, impls stay in mem.sx). New std/xml.sx holds xml_escape as xml.escape. std.sx gains the carried namespace tail — flat-importing std.sx now also provides mem./xml./log. — with the remaining modules (fs/process/socket/json/cli/hash/test) deferred from the tail until the global last-wins maps are fully own-wins (pulling them into every closure collides bare names corpus-wide; they stay direct imports: modules/std/fs.sx etc.). log.sx's internal emit renamed log_emit (it clobbered consumer fns named emit program-wide). bundle.sx uses xml.escape via the carried alias. Consumer import paths swept mechanically; .ir snapshots recaptured for the larger std closure. m3te + game build unchanged.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Error return-trace formatting (ERR step E3.3). `library/modules/trace.sx`
|
||||
// Error return-trace formatting (ERR step E3.3). `library/modules/std/trace.sx`
|
||||
// reads the trace buffer (E3.1, populated by E3.2's raise/try push wiring) and
|
||||
// renders it. `trace.print_current()` writes the trace to stderr; the catch
|
||||
// handler sees the full chain because the absorption clear fires at handler
|
||||
@@ -9,7 +9,7 @@
|
||||
// snapshot shows the trace lines interleaved with the `print` (stdout) lines.
|
||||
|
||||
#import "modules/std.sx";
|
||||
trace :: #import "modules/trace.sx";
|
||||
trace :: #import "modules/std/trace.sx";
|
||||
|
||||
// Buffer length probe (the runtime symbol; public read API is the trace module).
|
||||
sx_trace_len :: () -> u32 #foreign;
|
||||
|
||||
Reference in New Issue
Block a user