selfhost/cmd/w6l: strip *arena cascade (γ-4)
amalloc has 0 callers post-γ-2; the *arena threaded through w6l's mklnk/resolvelib/cstrtostr/elfglobals/dcstrtostr and the lnk.a field are vestigial. Drop `import mem;` from sym/main/obj/dyn/dynout, remove lnk.a struct field, strip *arena from the five signatures, update 13 call sites. Drop a dead `let a: *arena = l.a;` in dynout. Comments at pass.ww/obj.ww/main.ww retidied to match post-strip reality. main.combined.ww auto-regenerated. Verified 132/132 incl. 992_w6l_ww + 996_dyn_ww + 995_self_rebuild byte-identity.
This commit is contained in:
@@ -12,7 +12,6 @@ package w6l;
|
||||
|
||||
import os;
|
||||
import rt;
|
||||
import mem;
|
||||
import strings;
|
||||
import sym;
|
||||
|
||||
@@ -107,7 +106,7 @@ fn dcstrlen(p: *u8) u64 = {
|
||||
return n;
|
||||
};
|
||||
|
||||
fn dcstrtostr(a: *arena, p: *u8) str = {
|
||||
fn dcstrtostr(p: *u8) str = {
|
||||
let n: u64 = dcstrlen(p);
|
||||
let view: str;
|
||||
view.ptr = p;
|
||||
@@ -295,7 +294,7 @@ export fn loadso(l: *lnk, path: *u8) i32 = {
|
||||
|
||||
// Build the lso. Exports are appended in dynsym order so
|
||||
// soprovides_v's first-match semantics match the C version.
|
||||
let so: *lso = alloc(lso { path = dcstrtostr(l.a, path), soname = dcstrtostr(l.a, sonamecs) })!;
|
||||
let so: *lso = alloc(lso { path = dcstrtostr(path), soname = dcstrtostr(sonamecs) })!;
|
||||
let tail: *lexport = nil;
|
||||
|
||||
let si: u64 = 1u64;
|
||||
@@ -347,9 +346,9 @@ export fn loadso(l: *lnk, path: *u8) i32 = {
|
||||
};
|
||||
|
||||
if (keep != 0) {
|
||||
let e: *lexport = alloc(lexport { name = dcstrtostr(l.a, nmp) })!;
|
||||
let e: *lexport = alloc(lexport { name = dcstrtostr(nmp) })!;
|
||||
if (vernamecs != nil) {
|
||||
e.version = dcstrtostr(l.a, vernamecs);
|
||||
e.version = dcstrtostr(vernamecs);
|
||||
};
|
||||
if (tail == nil) {
|
||||
so.exports = e;
|
||||
|
||||
Reference in New Issue
Block a user