cljs-dev

dnolen 2026-02-13T13:48:07.769989Z

@borkdude I re-assigned the async/await ticket back to you, I don't really care about the optimization stuff right now as it seems very unappealing to do it that way - compiler passes would be preferable. I like patch 3 - it just needs cleaning up. Then I will play with it, I think we need a more tests and I try to break it and we can determine if the behavior is actually broken or to be expected.

borkdude 2026-02-13T13:53:52.678539Z

sure, sounds good. I'll clean it up and will take the simplest possible initial approach. Exactly what I've been doing in squint. I played around with an ANF-macro that rewrites stuff like:

(inc (let [x 1] x))
to
(let [x 1] (inc x))
but I don't trust it enough yet.

dnolen 2026-02-13T13:49:33.799469Z

re: optimization, I before going down this path we should probably just rethink how we do IIFE, they should probably be something created at the analyzer level and then optimization can occur there as additional passes. It would also be ideal to handle IIFE uniformly at the compiler emissions rather than ad-hoc as it is right now.