Fork me on GitHub
#clojure-dev
<
2015-09-18
>
alexmiller16:09:25

@bronsa: I just added a cause/approach to http://dev.clojure.org/jira/browse/CLJ-1809 - can you tell me if I am saying the right words there?

bronsa16:09:22

@alexmiller: it matches my understanding of the issue, yes

alexmiller16:09:04

fm.locals here is any local in the Java method we are producing bytecode for, right?

bronsa16:09:42

not exactly, just locals that are declared in clojure code

bronsa16:09:36

locals introduced during analysis are left out, that's why the bug happened: try/finally blocks introduce a local variable without adding it to fm.locals

bronsa16:09:36

IOW the jvm locals count for a fn method is not the same as the number of local variables in its clojure code

alexmiller16:09:58

I'm trying to connect "try/finally blocks introduce a local variable without adding it to fm.locals" with the ticket cause / approach

alexmiller16:09:20

is that where the indexing error becomes a problem?

bronsa16:09:13

@alexmiller: as I said in the first comment of that ticket, I really don't 100% understand the issue, Rich/somebody else with more knowledge of the direct linking stuff needs to take a look at that

alexmiller16:09:14

I guess that will be me (taking a look, not being more knowledgable :)

bronsa16:09:04

@alexmiller: yes b/c if all the locals in fm.locals are traversed and dec'd, not taking into account "constructed" locals, it's possible that two locals end up with the same idx

alexmiller16:09:49

I assume let is another things that constructs locals - why is that not an issue too

alexmiller16:09:17

I'm just starting to look at this, sorry for all the dumb questions

bronsa16:09:45

@alexmiller: true locals (those introduced by loop/let/letfn/fn args) are constructed via registerLocal and put into fm.locals, locals needed for compilation purposes just get their id reserved via a call to getAndIncLocalNum()

alexmiller16:09:33

thanks, this is helpful in diving further...

alexmiller17:09:11

cfleming: not urgent, but curious if you saw my message at https://groups.google.com/d/msg/clojure-dev/v58AOZaS1Bo/5E_OwZpcCwAJ about socket repl and had any thoughts

alexmiller17:09:24

@cfleming not urgent, but curious if you saw my message at https://groups.google.com/d/msg/clojure-dev/v58AOZaS1Bo/5E_OwZpcCwAJ about socket repl and had any thoughts

alexmiller20:09:49

@bronsa: I'm wondering whether reducing maxlocals is a good idea in that block. seems like that's only ok if there are only arg locals.

bronsa20:09:55

@alexmiller maxlocal is never used anyway

alexmiller20:09:21

ah, yeah. but it do you agree it seems incorrect to decrement it?

cfleming21:09:30

@alexmiller: I did but have been busy, sorry - will reply when I get a chance. Helping out at ClojureBridge Auckland right now!

bronsa22:09:24

@alexmiller yeah i agree it's wrong