From f83e65b82a6a41836743b558eaa75e1f84125784 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 21 May 2026 12:28:16 +0900 Subject: [PATCH] =?UTF-8?q?selfhost/cmd/ww:=20drop=20dead=20builddirmodule?= =?UTF-8?q?path=20(=CE=B3-3b)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unreferenced after γ-5 *arena cascade. Removes the helper body and its preceding doc comment; main.combined.ww auto-regenerated. Verified 132/132 incl. 993_ww_ww + 995_self_rebuild byte-identity. --- selfhost/cmd/ww/main.combined.ww | 18 ------------------ selfhost/cmd/ww/main.ww | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/selfhost/cmd/ww/main.combined.ww b/selfhost/cmd/ww/main.combined.ww index b00730cf..e789cc9a 100644 --- a/selfhost/cmd/ww/main.combined.ww +++ b/selfhost/cmd/ww/main.combined.ww @@ -3675,24 +3675,6 @@ fn arenadupcstr(src: *u8, plen: u64) *u8 = { return buf.ptr; }; -// builddirmodulepath — alloc /.ww, NUL-terminated. -fn builddirmodulepath(dir: *u8, dlen: u64, - base: *u8, blen: u64) *u8 = { - let need: u64 = dlen + 1u64 + blen + 3u64 + 1u64; - let buf: []u8 = alloc([], need)!; - let off: u64 = 0u64; - let i: u64 = 0u64; - for (i < dlen) { buf[off] = dir[i]; off += 1u64; i += 1u64; }; - buf[off] = 47u8; off += 1u64; // '/' - i = 0u64; - for (i < blen) { buf[off] = base[i]; off += 1u64; i += 1u64; }; - buf[off] = 46u8; off += 1u64; // '.' - buf[off] = 119u8; off += 1u64; // 'w' - buf[off] = 119u8; off += 1u64; // 'w' - buf[off] = 0u8; - return buf.ptr; -}; - // buildsearchpath — compose the colon-separated lookup path used by // resolvemodule's case (4). Order: "." : : /../../lib fn buildsearchpath(selfdir: *u8, incs: *u8) *u8 = { diff --git a/selfhost/cmd/ww/main.ww b/selfhost/cmd/ww/main.ww index f1fe7fb7..f9805843 100644 --- a/selfhost/cmd/ww/main.ww +++ b/selfhost/cmd/ww/main.ww @@ -992,24 +992,6 @@ fn arenadupcstr(src: *u8, plen: u64) *u8 = { return buf.ptr; }; -// builddirmodulepath — alloc /.ww, NUL-terminated. -fn builddirmodulepath(dir: *u8, dlen: u64, - base: *u8, blen: u64) *u8 = { - let need: u64 = dlen + 1u64 + blen + 3u64 + 1u64; - let buf: []u8 = alloc([], need)!; - let off: u64 = 0u64; - let i: u64 = 0u64; - for (i < dlen) { buf[off] = dir[i]; off += 1u64; i += 1u64; }; - buf[off] = 47u8; off += 1u64; // '/' - i = 0u64; - for (i < blen) { buf[off] = base[i]; off += 1u64; i += 1u64; }; - buf[off] = 46u8; off += 1u64; // '.' - buf[off] = 119u8; off += 1u64; // 'w' - buf[off] = 119u8; off += 1u64; // 'w' - buf[off] = 0u8; - return buf.ptr; -}; - // buildsearchpath — compose the colon-separated lookup path used by // resolvemodule's case (4). Order: "." : : /../../lib fn buildsearchpath(selfdir: *u8, incs: *u8) *u8 = {