Fork me on GitHub
#clojure-dev
<
2019-11-01
>
hiredman00:11:10

No kidding, I thought it just made it easier to maintain the expression semantics

bronsa00:11:28

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

bronsa00:11:54

so if you don't hoist in those contexts you'd get multiple locals reusing the same slot

bronsa00:11:28

but it's doable otherwise, the mutabilify in compiler. java doesn't make it trivial tho

bronsa00:11:17

I got kinda there in 2015 but gave up

bronsa00:11:57

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

bronsa00:11:51

but again the hoisting patch using methods would have the same characteristics here

bronsa00:11:18

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

bronsa00:11:35

there was a bug recently where this was still happening and the workaround was to lift more contexts

mpenet08:11:51

clojurescript has no requiring-resolve ? is that something not feasible?

dominicm15:11:17

I asked, not easily

dominicm15:11:45

I ended up having to add a code based api for my use case to allow for it

alexmiller13:11:18

prob a better question for #cljs-dev (but I suspect the answer is no)