New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step through preparation for kwarg calls #190
Conversation
Great! A related question, should we also step "out" of wrappers when exiting a frame, e.g. julia> f(x; y =3) = x + y;
julia> fr = JuliaInterpreter.maybe_step_through_wrapper!(JuliaInterpreter.enter_call(f, 2; y=3))
Frame for #f#5(y, ::Any, x) in Main at REPL[2]:1
1 1 1 ─ %1 = (+)(x, y)
2 1 └── return %1
#f#5 = #f#5
y = 3
= f
x = 2
caller: (::getfield(Main, Symbol("#kw##f")))(::Any, ::typeof(f), x) in Main
julia> frame, pc = JuliaInterpreter.debug_command(fr, :finish)
(Frame for (::getfield(Main, Symbol("#kw##f")))(::Any, ::typeof(f), x) in Main
⋮
14 0 6 ─ (Base.kwerr)(#temp#@_2, , x)
15 0 7 ┄ %15 = (#f#5)(y, , x)
16 0 └── return %15
#unused# = #kw##f()
#temp# = 3
= f
x = 2
y = 3, 16) Should the finish here step our of the kw wrapper and we then just end up returning completely to top level in this example. |
Yes please :) Although there probably should be some way to inspect all wrappers etc. |
I guess it can also be up to the frontend to call Edit: Thinking about it, I think it is fine for the JuliaInterpreter to not do too much magic stepping through and just let the user of JuliaInterpreter (like Debugger.jl) decide how fine grained the stepping should be. |
You can definitely do fine-grained stuff with But I'd be fine with moving the magic out of |
Personally, I don't mind since I would likely be using this myself. It is just in the situation where a frontend does not want the automatic wrapper stepping, one would have to reconstruct |
Yes, |
Test failures seem spurious, so if we decide we like this we could merge. Want to make the call, @KristofferC? |
Yes, but it also doesn't step to the next call. But sure, someone can do
|
I am tired of stepping through
NamedTuple
,pairs
,merge
, andCore.kwfunc
. This feels better.