fibers: rename ABI variant .pure -> .naked
"pure" universally means side-effect-free (GCC __attribute__((pure)), FP purity, D's pure) — the opposite of a register-clobbering context switch. The concept is "naked": no compiler-generated prologue/epilogue, body is raw asm that emits its own ret. That is the established term everywhere (LLVM's naked function attribute — which we literally emit — plus Zig callconv(.naked), Rust #[naked], GCC/Clang __attribute__ ((naked))). Rename the keyword + everything keyed off it so concept, surface, field, and the emitted LLVM attribute all agree. - ast.zig: ABI enum variant pure -> naked (+ doc). - parser: accept abi(.naked); error text updated. - IR Function.is_pure -> is_naked; type_resolver/decl/generic/pack/ emit_llvm references updated; diagnostics say abi(.naked). - examples 1800-1803 renamed *-pure-* -> *-naked-* (source + expected/ snapshots; .ir/.exit/.stdout/.stderr are byte-identical — the emitted IR is unchanged, only the keyword spelling differs). - docs (PLAN-FIBERS, CHECKPOINT-FIBERS, PLAN-POST-METATYPE, the design roadmap, the compiler-API checkpoint/design) updated; the naming rationale now records why .naked over .pure. No semantic change — pure cosmetics. Suite green (725/0).
This commit is contained in:
@@ -396,10 +396,10 @@ grounding) are explicit steps, not buried.
|
||||
capability:** name minted results by the instantiation's mangled name + input
|
||||
validation.
|
||||
4. **`abi(.naked)`** — *correction:* `CallConv` was renamed `ABI` and **already carries
|
||||
`.pure`** (ast.zig:142, "pure/naked, no prologue/epilogue") during the compiler-API
|
||||
stream — so this is NOT "extend the enum." `.pure` is an **inert label today**:
|
||||
`.naked`** (ast.zig:142, "naked, no prologue/epilogue") during the compiler-API
|
||||
stream — so this is NOT "extend the enum." `.naked` is an **inert label today**:
|
||||
`type_resolver.zig:237` maps it to `.default` CC and emit_llvm emits **no** naked
|
||||
attribute. The net-new work is making `.pure` actually emit LLVM `naked` + skip
|
||||
attribute. The net-new work is making `.naked` actually emit LLVM `naked` + skip
|
||||
prologue/epilogue lowering. Gates A2.
|
||||
5. **Per-fiber `context` root + push-stack storage** — *correction:* `context` is
|
||||
**already an implicit `*Context` parameter** (comptime_vm.zig:392, lower.zig:257
|
||||
|
||||
Reference in New Issue
Block a user