Re-bootstrap compiler + render after IO registry and Step 5 changes
Compiler (lib/compiler.sx): - Fix emit-op return type: 8 definition form cases (defstyle, defhandler, defpage, etc.) and the perform case now return nil explicitly via (do (emit-op em N) nil) instead of bare emit-op which transpiled to unit-returning OCaml. - compile_match PREAMBLE: return Nil instead of unit (was ignore). - Added init wrapper to PREAMBLE (needed by compile-module). - All 41 compiler functions re-transpiled cleanly. Render (bootstrap_render.py): re-transpiled, no changes. Runtime: restored keyword_p predicate (needed by defio-parse-kwargs! in the transpiled evaluator). 2608/2608 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,7 @@ let abs v = prim_call "abs" [v]
|
||||
let min a b = prim_call "min" [a; b]
|
||||
let max a b = prim_call "max" [a; b]
|
||||
let set_nth_b lst idx v = prim_call "set-nth!" [lst; idx; v]
|
||||
let init lst = prim_call "init" [lst]
|
||||
|
||||
(* skip_annotations: strips :keyword value pairs from a list (type annotations) *)
|
||||
let rec skip_annotations items =
|
||||
@@ -76,7 +77,8 @@ let rec skip_annotations items =
|
||||
Falls back to CEK evaluation at runtime. *)
|
||||
let compile_match em args scope tail_p =
|
||||
let fn = Sx_ref.eval_expr (Symbol "compile-match") (Env (Sx_types.make_env ())) in
|
||||
ignore (Sx_ref.cek_call fn (List [em; args; scope; tail_p]))
|
||||
ignore (Sx_ref.cek_call fn (List [em; args; scope; tail_p]));
|
||||
Nil
|
||||
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user