selfhost/cmd/{w6a,w6l}: migrate 10 amalloc sites to alloc(T{...})!
Phase 0 batch 2. Sites: w6a/parse.ww (asym, aprog, aoperand ×2), w6l/main.ww (lnk), w6l/obj.ww (defent, armember, lobj, lrel ×2). obj.ww's hdrsize *u8 buffer at line 344 + 7 other runtime-N byte buffers across the three files (path bufs, n+1 cstr copies, cap realloc) stay deferred to #8. Verified via 991_w6a_ww + 992_w6l_ww + 995_self_rebuild + 996_dyn_ww byte-identity. make test 132/132.
This commit is contained in:
@@ -20,8 +20,7 @@ def BASE: u64 = 4194304u64; // 0x400000
|
||||
def CODE_VA_OFF: u64 = 4096u64; // .text starts at base + 0x1000
|
||||
|
||||
fn mklnk(a: *arena) *lnk = {
|
||||
let l: *lnk = amalloc(a, 144u64): *lnk;
|
||||
l.a = a;
|
||||
let l: *lnk = alloc(lnk { a = a })!;
|
||||
return l;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user