feat(hosted): lambda-lift expander bodies — alexandria with-gensyms expands correctly (cave#162/#163)Verified
ag-compile-lambda-impl builds the gensym DEFUN form first, then runs ag-lift-lambdas-for-repl on THAT (the defun head shields the top-level lambda — lifting the raw lambda-form rewrote it to (FUNCTION G) and broke every compile-lambda contract test; the suite caught it pre-push). Lifted gensym defuns emit into the arena first (ag-cli-emit-lifted; transient fn-table entries, persisted rel32s). Result: ALL 42 hosted-compile bails over alexandria macros.lisp are gone, and (macroexpand-1 '(with-gensyms (a b) ...)) returns the correct (LET ((A (GENSYM "A")) ...) ...) — expander bodies with (mapcar (lambda ...) ...) now compile AND run. The cave#163 __G85__ error was an artifact of the broken first attempt. Gates: --hosted 42/105, ALL 8 SHARDS PASSED. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By:
Claude Fable 5 <noreply@anthropic.com>