Move &rest params into spec, eliminate 9 of 11 bootstrap patches

evaluator.sx:
- bind-lambda-params: shared &rest detection for call-lambda + continue-with-call
- *last-error-kont* mutable global for error diagnostics

transpiler.sx:
- *last-error-kont* in ml-mutable-globals

bootstrap.py: removed 9 patches (mutable globals ×5, make-env, &rest helper,
call_lambda replacement, cwc_lambda replacement). Only 3 platform-level
patches remain: make_raise_guard_frame injection, cek_run error capture,
JIT hook dispatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 14:37:38 +00:00
parent db1f7f1bfb
commit e33fbd29e7
3 changed files with 85 additions and 162 deletions

View File

@@ -268,7 +268,9 @@
(define ml-dynamic-globals (list "*render-check*" "*render-fn*"))
(define ml-mutable-globals (list "*strict*" "*prim-param-types*"))
(define
ml-mutable-globals
(list "*strict*" "*prim-param-types*" "*last-error-kont*"))
(define
ml-is-mutable-global?