compile by default in the shipped runtime
The jolt binary now compiles each form to Janet bytecode by default (REPL, file, -e, -m, nrepl). The hybrid path keeps it correct — forms the compiler can't handle fall back to the interpreter — and it's validated at parity with the interpreter across the conformance suite (218/218) and the clojure-test-suite (3932 pass / 124 error vs 3913 / 125). JOLT_INTERPRET=1 forces the interpreter.
This commit is contained in:
parent
918e2798db
commit
62c5060093
1 changed files with 6 additions and 1 deletions
|
|
@ -11,7 +11,12 @@
|
|||
|
||||
(def jolt-version "0.1.0")
|
||||
|
||||
(def ctx (init))
|
||||
# Compile by default: the shipped runtime compiles each form to Janet bytecode
|
||||
# (hybrid — forms the compiler can't handle fall back to the interpreter, so the
|
||||
# result always matches the interpreter; see compiler.janet / loader/eval-toplevel).
|
||||
# Set JOLT_INTERPRET=1 to force the tree-walking interpreter (debugging / A-B).
|
||||
(def compile-default? (not (= "1" (os/getenv "JOLT_INTERPRET"))))
|
||||
(def ctx (init {:compile? compile-default?}))
|
||||
(ctx-set-current-ns ctx "user")
|
||||
|
||||
(defn read-line [prompt]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue