-
Notifications
You must be signed in to change notification settings - Fork 35
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
changes to adapt to compressed line table format #606
Conversation
30bc00f
to
3d7aec7
Compare
3d7aec7
to
4c194db
Compare
4c194db
to
9a1e6dc
Compare
9bef527
to
cb420bb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #606 +/- ##
==========================================
- Coverage 85.13% 84.11% -1.02%
==========================================
Files 12 12
Lines 2610 2644 +34
==========================================
+ Hits 2222 2224 +2
- Misses 388 420 +32 ☔ View full report in Codecov by Sentry. |
10a6e5e
to
28dd37c
Compare
It looks like this "optimization" introduces a very bad interaction with the new lineinfo format: JuliaInterpreter.jl/src/optimize.jl Lines 76 to 92 in 28dd37c
julia> using JuliaInterpreter
julia> fnone1() = nothing;
julia> let m = only(methods(fnone1))
JuliaInterpreter.FrameCode(m, JuliaInterpreter.get_source(m); optimize=true).src.debuginfo
end
Core.DebugInfo(Symbol("REPL[2]"), nothing, svec(), "\x01\0\0\0\0\0\0\0\0\0\0\0\x01\x01\0")
julia> fnone2() = nothing;
julia> let m = only(methods(fnone2))
JuliaInterpreter.FrameCode(m, JuliaInterpreter.get_source(m); optimize=true).src.debuginfo
end
Core.DebugInfo(Symbol("REPL[4]"), nothing, svec(), "") |
cb9b79a
to
16b332c
Compare
src/utils.jl
Outdated
@static if VERSION ≥ v"1.12.0-DEV.173" | ||
# TODO: decode the linetable at this frame efficiently by reimplementing this here | ||
# TODO: get the contextual name from the parent, rather than returning "n/a" (which breaks Cthulhu) | ||
return Base.IRShow.buildLineInfoNode(lt, :var"n/a", i)[1] # ignore all inlining / macro expansion / etc :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this commit -- do we now store some macro expansion context within debuginfo
?
6a07c3e
to
fa51fb1
Compare
fa51fb1
to
ebc743a
Compare
end | ||
return lastline | ||
end | ||
function codelocs(arg, i::Integer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For statementnumbers
to function in v1.12, there's a need for a tool that can rebuild the full codelocs
object from Core.DebugInfo
, similar to what we could do just by looking at src.codelocs
previously. Or, we may have to overhaul the statementnumbers
algorithm.
This PR is obviously not finished yet, but I want to push ahead with it as is to avoid holding up progress on other packages in the ecosystem. We can tackle the specific issues that I've identified so far later on (likely when Jameson returns). |
This contains some of the updates needed to keep working with the optimized debuginfo format (JuliaLang/julia#52415). This is a draft, since someone needs integrate this to maintain support for old versions, where the old code is mostly marked here with my initials (jwn) and my initials should be removed entirely and instead the implementation in those places fixed.