Migrate clojure.core/set from a native shim to the kernel overlay tier
set was a native shim (apply jolt-hash-set (seq->list coll)). It is a pure composition, so the Clojure version (apply hash-set (seq coll)) lowers to the same code. The compiler uses set, but only off the emit path (the backend's bare-native-names def and type inference), so it can live in the kernel tier: compiling that tier never calls set, and by the time those callers run the tier is already bound. This is distinct from boolean, which the backend calls for every :if node on the emit path. Moving boolean even to the kernel tier deadlocks (compiling the tier that defines boolean needs boolean), so boolean stays native. Added a comment in predicates.ss recording that. Re-mint converges in 3 passes and the benchmark suite is unchanged within noise (collections 43.3 vs 43.1, binary-trees 367 vs 367, the rest flat).
This commit is contained in:
parent
3d0cbed3c5
commit
d77b4e6420
5 changed files with 310 additions and 298 deletions
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue