Replace hand-written evaluator with bootstrapped spec, emit flat Python
- evaluator.py: replace 1200 lines of hand-written eval with thin shim that re-exports from bootstrapped sx_ref.py - bootstrap_py.py: emit all fn-bodied defines as `def` (not `lambda`), flatten tail-position if/cond/case/when to if/elif with returns, fix &rest handling in _emit_define_as_def - platform_py.py: EvalError imports from evaluator.py so catches work - __init__.py: remove SX_USE_REF conditional, always use bootstrapped - tests/run.py: reset render_active after render tests for isolation - Removes setrecursionlimit(5000) hack — no longer needed with flat code Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -771,6 +771,15 @@ def main():
|
||||
print(f"# --- {spec_name} ---")
|
||||
eval_file(spec["file"], env)
|
||||
|
||||
# Reset render state after render tests to avoid leaking
|
||||
# into subsequent specs (bootstrapped evaluator checks render_active)
|
||||
if spec_name == "render":
|
||||
try:
|
||||
from shared.sx.ref.sx_ref import set_render_active_b
|
||||
set_render_active_b(False)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Summary
|
||||
print()
|
||||
print(f"1..{test_num}")
|
||||
|
||||
Reference in New Issue
Block a user