Higher-order forms (map, filter, reduce, some, every?, for-each, map-indexed) now evaluate their arguments via CEK frames instead of nested trampoline(eval-expr(...)) calls. Added HoSetupFrame — staged evaluation of HO form arguments. When all args are evaluated, ho-setup-dispatch sets up the iteration frame. This keeps a single linear CEK continuation chain instead of spawning nested CEK instances. 14 nested eval-expr calls eliminated (39 → 25 remaining). The remaining 25 are in delegate functions (sf-letrec, sf-scope, parse-keyword-args, qq-expand, etc.) called infrequently. All tests unchanged: JS 747/747, Full 864/870, Python 679/679. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
370 KiB
370 KiB