This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-01
Channels
- # announcements (7)
- # babashka (41)
- # beginners (117)
- # cider (3)
- # clj-kondo (145)
- # cljdoc (25)
- # cljs-dev (19)
- # clojure (197)
- # clojure-dev (14)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (11)
- # clojure-uk (21)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # code-reviews (4)
- # cursive (87)
- # data-science (11)
- # datomic (29)
- # duct (2)
- # emacs (10)
- # graalvm (1)
- # lumo (13)
- # malli (2)
- # nrepl (5)
- # off-topic (25)
- # onyx (1)
- # pathom (6)
- # reagent (20)
- # reitit (4)
- # rewrite-clj (7)
- # shadow-cljs (114)
- # spacemacs (16)
there's some situations where some more complex form of local indexing is required e.g within loops/try blocks and Compiler. java doesn't do that
so if you don't hoist in those contexts you'd get multiple locals reusing the same slot
but it's doable otherwise, the mutabilify in compiler. java doesn't make it trivial tho
there are also potential performance implications of hoisting loops that at some point made it easier for C2 to inline stuff, but not sure if that's still a thing in modern jvms
but as far as I remember from looking at the commit history the hoisting was introduced to fix the (accidental?) local slot reuse in the buggy cases, not due to this perf implication
there was a bug recently where this was still happening and the workaround was to lift more contexts
prob a better question for #cljs-dev (but I suspect the answer is no)