ur5us has quit [Ping timeout: 245 seconds]
ur5us has joined #jruby
nirvdrum has joined #jruby
nirvdrum has quit [Ping timeout: 268 seconds]
nirvdrum has joined #jruby
nirvdrum has quit [Ping timeout: 268 seconds]
sagax has quit [Ping timeout: 272 seconds]
ur5us has quit [Ping timeout: 260 seconds]
sagax has joined #jruby
nirvdrum has joined #jruby
nirvdrum has quit [Ping timeout: 268 seconds]
nirvdrum has joined #jruby
ur5us has joined #jruby
nirvdrum has quit [Ping timeout: 240 seconds]
nirvdrum has joined #jruby
ur5us has quit [Ping timeout: 240 seconds]
nirvdrum has quit [Ping timeout: 268 seconds]
rusk has joined #jruby
rusk has quit [Read error: Connection reset by peer]
rusk has joined #jruby
nirvdrum has joined #jruby
<kares[m]> looking into the final piece of not clearing $! ... seems to get ugly quick as the scope changes
<kares[m]> got it working but I am not sure if its the right way or whether everything was taking care of
<kares[m]> will get you guys to review a draft PR
nirvdrum has quit [Ping timeout: 265 seconds]
shellac has joined #jruby
<kares[m]> so now I am a bit confused why the interpreter is failing trying to read a (temp) local variable ...
lucasb has joined #jruby
nirvdrum has joined #jruby
snickers has joined #jruby
snickers has quit [Ping timeout: 246 seconds]
<enebo[m]> kares: seems likely somehow that variable get is happening on wrong interp context
<enebo[m]> not really sure why...I will have to study what changed here....also this was not passing before so how did this error manifest before?
<kares[m]> only tried to add an instruction to restore $! ... where I needed to cross a single IRBuilder boundary
<kares[m]> before the change there's no error but $! leaks (is not nil when it should be)
<kares[m]> the attempted fix resolved it for my script, but went that piece of code is "inside" the spec it throws AIOoBE
<enebo[m]> ah yeah this won't work
<enebo[m]> you are asking for a temp from the parent method which the current context will not have
<kares[m]> thought it might be messy to cross the boundary
<kares[m]> not even sure if the attempted fix is the right direction, wdyt?
<enebo[m]> yeah internally in JIT or in interp temps are either java locals or an array of temps in the current interp method
<enebo[m]> so this patch added a case for if we did not know the restore variable to ask it's parent for it
<enebo[m]> I think the scenario you are trying to fix is we are in a soft scope (e.g. closure) and something wants $! at that point but it is unset. Is that right?
<enebo[m]> If I described what you were trying to do I think one other problem is that $! is a down stack value and the parent would only restore an older value (which may be right or not in this case)
<enebo[m]> I believe one path to solving this is that activeRescueBlock is not empty in all cases where we encounter non-local returns (or potential non-local because at build time this might not be one [e.g. lambda]).
<kares[m]> yes in a closure that is being passed to another scope (method) - the closure does a return
<kares[m]> (an early return happens in the original scope)
<kares[m]> and the important thing is this is happening from within a rescue
<kares[m]> so `$!` should be restored. haven't looked how MRI handles these but I guess it will be a different codebase compared to JRuby's IR
nirvdrum has quit [Ping timeout: 265 seconds]
<kares[m]> I think I get what you mean - there's an internal ensure generated that we could tackle
<kares[m]> or not
<kares[m]> all the alternatives I could come up with aren't feeling right
<kares[m]> activeRescueBlock won't be empty at the scope where the closure gets defined
<kares[m]> but than I call another method which yields and thus the non-local return executes
<kares[m]> at that point there's no info that I should have restored $! (due coming from a rescue) down the stack ...
<enebo[m]> we need to push $! at all possible rescue levels as it comes down I think
<enebo[m]> This arguably is the most complicated part of IR Building
<enebo[m]> In part because we duplicate a lot of code
nirvdrum has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
<kares[m]> enebo: get that and it should be handled for most cases except this specific non-local return
<kares[m]> seems to me like there is no easy way around this, but I am fine to be proven wrong eventually ;)
rusk has quit [Remote host closed the connection]
slyphon has joined #jruby
<enebo[m]> kares: I am just speculating as well.
shellac has joined #jruby
slyphon has quit [Quit: I REGRET NOTHiiiiiiiiiinnnngggg….]
snickers has joined #jruby
subbu is now known as subbu|lunch
shellac has quit [Quit: Computer has gone to sleep.]
<headius[m]> Yo
subbu|lunch is now known as subbu
ur5us has joined #jruby
jeremyevans has quit [Ping timeout: 265 seconds]
daniel_jruby_que has joined #jruby
nirvdrum has quit [Ping timeout: 240 seconds]
nirvdrum has joined #jruby
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has quit [Ping timeout: 245 seconds]