core: Stage 2 Task 2 tier 1 — compile syntax-quote + definterface/extend/proxy
First slice of moving stateful forms onto the compile path (jolt-eaa). - loader stateful-head?: drop syntax-quote (the analyzer's `handled` set already compiles it; routing it to the interpreter was redundant). - host_iface special-names: drop definterface/extend/proxy (stub macros expanding to def/nil — their expansions compile once unpunted). - letfn stays interpreted: its let* expansion needs letrec semantics (mutual recursion between the fns), which sequential compiled let* lacks — a later tier. Gate green: conformance 267x3, fallback-zero 31/5, bootstrap-fixpoint stage1==2==3, self-host, staged-bootstrap, clojure-test-suite >=4034/67, features 78/78, all unit + protocol/multimethod/macro specs.
This commit is contained in:
parent
8a9e386fa7
commit
0bffc5534f
2 changed files with 8 additions and 4 deletions
|
|
@ -81,8 +81,10 @@
|
||||||
"create-ns" "remove-ns" "find-ns" "all-ns" "the-ns" "resolve"
|
"create-ns" "remove-ns" "find-ns" "all-ns" "the-ns" "resolve"
|
||||||
"ns-resolve" "ns-aliases" "ns-imports" "ns-interns"
|
"ns-resolve" "ns-aliases" "ns-imports" "ns-interns"
|
||||||
"read-string" "macroexpand-1" "defonce" "ns" "in-ns" "require"
|
"read-string" "macroexpand-1" "defonce" "ns" "in-ns" "require"
|
||||||
"import" "use" "refer" "defrecord" "defprotocol" "definterface"
|
"import" "use" "refer" "defrecord" "defprotocol"
|
||||||
"reify" "proxy" "extend-type" "extend-protocol" "extend" "gen-class"
|
"reify" "extend-type" "extend-protocol" "gen-class"
|
||||||
|
# letfn stays: its let* expansion needs letrec semantics (mutual
|
||||||
|
# recursion between the fns), which compiled sequential let* lacks.
|
||||||
"monitor-enter" "monitor-exit" "binding" "letfn"]
|
"monitor-enter" "monitor-exit" "binding" "letfn"]
|
||||||
(put t n true))
|
(put t n true))
|
||||||
t))
|
t))
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,14 @@
|
||||||
# Stateful / context-modifying forms always interpret: they mutate the context
|
# Stateful / context-modifying forms always interpret: they mutate the context
|
||||||
# (namespaces, macros, types, multimethods, dynamic vars, …) in ways the compiler
|
# (namespaces, macros, types, multimethods, dynamic vars, …) in ways the compiler
|
||||||
# doesn't model. Kept here so the compile/interpret routing lives in one place,
|
# doesn't model. Kept here so the compile/interpret routing lives in one place,
|
||||||
# used by both load-ns and the public eval-one.
|
# used by both load-ns and the public eval-one. Shrinking toward the frozen
|
||||||
|
# host-coupled set (Stage 2 jolt-eaa): forms move off this list as they gain a
|
||||||
|
# compile path; syntax-quote already compiles via the analyzer's `handled` set.
|
||||||
(defn- stateful-head? [head-name]
|
(defn- stateful-head? [head-name]
|
||||||
(or (= head-name "defmacro") (= head-name "ns")
|
(or (= head-name "defmacro") (= head-name "ns")
|
||||||
(= head-name "deftype") (= head-name "defmulti") (= head-name "defmethod")
|
(= head-name "deftype") (= head-name "defmulti") (= head-name "defmethod")
|
||||||
(= head-name "require") (= head-name "in-ns")
|
(= head-name "require") (= head-name "in-ns")
|
||||||
(= head-name "syntax-quote") (= head-name "set!")
|
(= head-name "set!")
|
||||||
(= head-name "var") (= head-name ".") (= head-name "new")
|
(= head-name "var") (= head-name ".") (= head-name "new")
|
||||||
(= head-name "eval")))
|
(= head-name "eval")))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue