refactor: compiler.sx imports only std/list.sx, not the whole std barrel

compiler.sx needs only `List` (string is a builtin), so import the std/list.sx
part-file instead of std.sx. Its standalone transitive footprint drops from
~16k to ~50 lines of IR. Enabled by core.sx now self-declaring its libc, so
list.sx → core.sx resolves without the std assembly.

Regenerates 40 .ir snapshots: compiler.sx sits in the std import graph
(std → cli → build → compiler), so narrowing its import shifts the
registration order in every std program, renumbering LLVM symbol suffixes
(@foo.N → @foo.N+1) and adding a redundant `declare void @out` (LLVM dedups
it). Verified the diffs are purely that — no .exit/.stdout/.stderr changed, no
instruction/type/constant changed — and the full suite is green (817/0).
This commit is contained in:
agra
2026-06-26 09:16:38 +03:00
parent 22d5060439
commit 8d23aad4b9
41 changed files with 83285 additions and 83150 deletions

View File

@@ -7,7 +7,13 @@
// driver (a callback registered via `set_post_link_callback`), which always runs
// on the comptime VM (`core.invokeByFuncId`) — the VM, unlike the legacy
// interpreter, can allocate/grow the `List`s the driver builds (issue 0141).
#import "modules/std.sx";
//
// Only `List` is needed here (`string` is a builtin), so import just the List
// part-file, not the whole std barrel — keeps compiler.sx's transitive graph
// small (its standalone import drops from ~16k to ~50 lines of IR). Works
// because core.sx self-declares its `libc`, so list.sx → core.sx resolves
// standalone.
#import "modules/std/list.sx";
// The C companion object files for this build (`#import c { #source ... }`,
// compiled to `.o`) and the `#library` link names. The sx driver passes them to