Compiler research (#10)
adds self-hosted compiler is functionally: - The default compile path is the portable pipeline using jolt.analyzer (Clojure) → host-neutral IR → backend.janet. - The analyzer is itself Clojure, compiled by jolt for true self-hosting. - bootstrap-fixpoint passes (stage1 == stage2 == stage3): rebuilding the compiler on its own output. - clojure.core is now self-hosted in the overlay. - Stateful forms (defmacro/ns/deftype/defmulti/require/in-ns) are interpreted by design.
This commit is contained in:
parent
607779866e
commit
d3194aae59
68 changed files with 6590 additions and 2019 deletions
16
test/support/lazy-eval.janet
Normal file
16
test/support/lazy-eval.janet
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Worker: evaluate a Clojure equality check in a fresh Jolt ctx and print
|
||||
# @@RESULT true or @@RESULT false. Used by lazy-infinite-test under a wall-clock
|
||||
# deadline so infinite-seq hangs are caught as test failures.
|
||||
(use ../../src/jolt/api)
|
||||
(use ../../src/jolt/reader)
|
||||
|
||||
(def expected (get (dyn :args) 1))
|
||||
(def actual (get (dyn :args) 2))
|
||||
|
||||
(when (and expected actual)
|
||||
(def ctx (init {}))
|
||||
(def prog (string "(= " expected " " actual ")"))
|
||||
(def [ok val] (protect (eval-string ctx prog)))
|
||||
(if ok
|
||||
(printf "@@RESULT %q" val)
|
||||
(printf "@@ERROR %q" val)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue