Skip to content

Constant node fusion - #1067

Merged
borkdude merged 2 commits into
masterfrom
node-fusion
Jul 25, 2026
Merged

Constant node fusion#1067
borkdude merged 2 commits into
masterfrom
node-fusion

Conversation

@borkdude

Copy link
Copy Markdown
Collaborator

No description provided.

borkdude added 2 commits July 25, 2026 12:03
The existing fold tested the analyzed child with utils/constant?, which
answers for raw values. On CLJS and cljd analyze returns constants
unwrapped and the test worked; on the JVM it wraps them in ConstantNode,
so the fold never happened there. cond's :else clause expands to
(if :else expr nil), so every cond paid a runtime truthiness test.

const-node? also covers values that analyze returns unwrapped on the
JVM (a class, a symbol, a constant collection), which self-evaluate
through the Object impl of Eval.
@borkdude
borkdude merged commit d5b9c7d into master Jul 25, 2026
13 checks passed
@borkdude
borkdude deleted the node-fusion branch July 25, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant