3c7f1aa02791d7810dafd12b0cb3b8f9aba2ae6b
dirname/basename ported verbatim from ref/hare/path/posix.ha:17,37, re-routing Hare's byte scanning to bytes.rtrim/rindex. Additive to the c2-stack buffer core; no harness/Makefile/module-const changes. Work-var renamed path->p to avoid Hare's param-shadowing `let path = toutf8(path)`: ww's cgen N_LET prepends the new local into the name-keyed localfind chain BEFORE the init is emitted, so the shadow-init reads the fresh uninit slot — a silent miscompile, both-wrong-identical, filed #152 and fixed independently next. drew ruled path->p a permanent acceptable spelling (internal work-var, not API surface; avoids a param-shadow footgun; not a rule-7 workaround). WHY-comment + #152 pointer at both sites. Tests: 10-row dirname/basename table (posix.ha:51-71 verbatim) — root, no-sep, empty, trailing-sep, multi-sep all covered, expecteds traced. C-first: cstage @test green; the str-view-vs-literal rows are #146-deferred (wwstage byte-id, rides #125). Gate: all 324 passed, byte-id 990-997 green, w6c/w6c_ww unchanged (lib-only additive).
wcc/cgen: #148 slice-global by-value call-arg — name(SB) base for global slice ident, not (BP) garbage (cstage)
wcc/cgen: #145 slice-copy-assign LHS s.arr[lo:hi]=bs — N_SLICE-LHS arm, runtime byte-copy loop, esz via type table (both stages)
lib/path: #138 c2-stack buffer port — buffer/push/appendnorm/appendlit/string/isroot/set + dot/dotdot, cstage @test
Description
No description provided
Languages
C
89.4%
Python
7.2%
Makefile
2.3%
Shell
0.8%
Assembly
0.3%