This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-27
Channels
- # beginners (3)
- # boot (8)
- # cljs-dev (10)
- # clojure (87)
- # clojure-art (6)
- # clojure-dev (13)
- # clojure-japan (8)
- # clojure-russia (60)
- # clojure-sg (2)
- # clojurescript (126)
- # clojurewerkz (1)
- # core-logic (10)
- # cursive (6)
- # datomic (30)
- # editors (10)
- # ldnclj (7)
- # off-topic (114)
- # onyx (7)
- # re-frame (7)
- # reagent (37)
so I’ve been reading through Compiler.java and trying to get a better feel for how everything works
I noticed in InvokeExpr.emitProto that we emit two calls to Util.classOf, rather than arranging to keep the result of the first call on the stack
and I’m wondering if it’d make sense to do something like https://github.com/MichaelBlume/clojure/commit/8c3fe instead
@michaelblume: have you thought about putting it in a local rather than keeping it on the stack? would probably require less stack juggling
that makes sense, I’d have to sort out how to create a local, but I think I can model that from the TryExpr code
@michaelblume: look at finallyLocal/retLocal in TryExpr, it's not too hard
(whitespace is a bit of a mess, clojure core does not really agree with my IDE)
@michaelblume: yeah that's what I was thinking of
@michaelblume: I don't think it will this patch will cause performance regressions (nor do i know if it will have benefits), but if it causes them, I'd say they would be on callsites that see the same type over and over again
because then we never get to the second classOf and we’re storing classes in a local for no reason?