toolchain: banner purge + WHY-only comment sweep (rule 8)
selfhost/, cmd/, internal/ join the tree-wide sweep: every section banner dies (91 selfhost + the cmd C-style dividers -> 0); narration and stale contracts deleted (pre-#22 bundler notes, retired single-PT_LOAD and no-archive claims, superseded ABI tables); every ref/harec/qbe cite, task cite, encoding/ELF contract, and rule-10 twin pointer kept; lost lifetime/rationale lines restored where the sweep over-cut (elf_globals ownership, kwtab linear-scan). Comment- only proven: all five wwstage tool binaries byte-identical across the sweep; test-commit, test-byteid (161+1399, 0 pinned-divergent), and test-bootstrap (fixed point + 991-995 byte-id) all exit 0. The read-through banked 66 latent-bug leads (checkpoint).
This commit is contained in:
@@ -1,24 +1,9 @@
|
||||
// selfhost/cmd/wcc/cgendecl.ww — split out of cgen.ww.
|
||||
//
|
||||
// Houses the top-level emission glue:
|
||||
// - cgfnparams: parameter spilling per SysV
|
||||
// - cgfn: fn body emit (TEXT/SUBQ patched after body), prologue
|
||||
// deferred via cgen.ww's cgoutstate so the frame size
|
||||
// reflects every emit-time localadd (#15/#26c)
|
||||
// - cgfile: file-level entry (the exported driver)
|
||||
//
|
||||
// Bundler pulls this in transitively via cgen.ww; consumers don't
|
||||
// need to `use cgendecl;` directly.
|
||||
|
||||
package wcc;
|
||||
|
||||
import os;
|
||||
import syntax;
|
||||
import strconv;
|
||||
|
||||
|
||||
// ---- function-level cgen ---------------------------------------------
|
||||
|
||||
fn cgfnparams(c: *cgen, params: *syntax.node) void = {
|
||||
let p: *syntax.node = params;
|
||||
// sret (#23): RDI is consumed by the hidden dest pointer
|
||||
@@ -580,8 +565,6 @@ fn cgfn(c: *cgen, fn_: *syntax.node) void = {
|
||||
};
|
||||
|
||||
if (c.lastwasreturn == 0) {
|
||||
// Run any registered defers in LIFO order before the
|
||||
// implicit return.
|
||||
rundefers(c);
|
||||
// Zero AX before the fall-through return — matches cstage,
|
||||
// which always emits this so void-returning fns don't leak
|
||||
@@ -629,8 +612,6 @@ fn cgfn(c: *cgen, fn_: *syntax.node) void = {
|
||||
cgout_flush();
|
||||
};
|
||||
|
||||
// ---- file-level entry ------------------------------------------------
|
||||
|
||||
export fn cgfile(c: *cgen, file: *syntax.node) void = {
|
||||
if (file == nil) { return; };
|
||||
c.strlits = nil;
|
||||
|
||||
Reference in New Issue
Block a user