GUEST: step 2 — lib/guest/prefix.sx prefix-rename macro (partial)
lib/guest/prefix.sx defines a single (defmacro prefix-rename PREFIX ENTRIES) form that takes a prefix string and a quoted list of entries. Each entry is either a bare symbol (same-name alias: cl-foo = foo) or a 2-element list (alias target) for renames (cl-mod = modulo). Ported lib/common-lisp/runtime.sx: 47 hand-written (define cl-X Y) lines across 13 contiguous groups now collapse into prefix-rename calls. Loaded lib/guest/prefix.sx in the conformance preamble so the macro is available when runtime.sx is parsed. Verification: cl scoreboard 518/518, up from a stale baseline of 309/309 — Phase 2 (evaluator, +182) and Phase 6 (stdlib, +27) had under-counted historical results, not affected by this change. No regressions; baseline updated to reflect true counts. PARTIAL — pending second consumer. lua/runtime.sx (the brief's specified second consumer) has zero pure same-name aliases — every lua- definition wraps custom logic. Step left [partial — pending lua] until a consumer fits, or the second-consumer choice is revisited (js/runtime.sx has 2 candidates: isFinite/isNaN). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ run_suite() {
|
||||
local name="$1" load_files="$2" pass_var="$3" fail_var="$4" failures_var="$5"
|
||||
local TMP; TMP=$(mktemp)
|
||||
{
|
||||
printf '(epoch 1)\n(load "spec/stdlib.sx")\n'
|
||||
printf '(epoch 1)\n(load "spec/stdlib.sx")\n(load "lib/guest/prefix.sx")\n'
|
||||
local i=2
|
||||
for f in $load_files; do
|
||||
printf '(epoch %d)\n(load "%s")\n' "$i" "$f"
|
||||
|
||||
Reference in New Issue
Block a user