Skip to content
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

Adapt to nightly linetable changes #122

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Adapt to nightly linetable changes #122

merged 2 commits into from
Apr 23, 2024

Conversation

Pangoraw
Copy link
Collaborator

@Pangoraw Pangoraw commented Apr 6, 2024

Core.Compiler.LineInfoNode was removed in JuliaLang/julia#52415 but kept in Core for serializer compatibility reasons (see https://github.com/JuliaLang/julia/blob/e07c0f1ddbfc89ad1ac4dda7246d8ed5d0d57c19/base/boot.jl#L491).

Adaptation for IRTools is relatively straightforward in the sense that IRTools operates on untyped IR which does not contains inlined statements.

However, IRTools contains an inlining pass but it did not account for linetable information previously. In this change, I have made the choice to use the source line for all inlined statements. This can be further improved in the future by supporting stacked debuginfos.

Note

The second commit (cc97588) moves the definition of LineInfoNode inside IRTools to prevent future breaking changes. But this can create a breakage for people using IR(lines::Vector{LineInfoNode}) constructor so we may not want to include it yet or add conversions.

Closes #121

@oxinabox
Copy link
Member

oxinabox commented Apr 8, 2024

  • CI on 1.6 is broken because of this change and needs a fix.
  • CI on 1 is broken for unrelated reasons (which might be hiding that it is broken on 1)

`Core.Compiler.LineInfoNode` was removed in JuliaLang/julia#52415
but kept in `Core` for serializer compatibility reasons (see
https://github.com/JuliaLang/julia/blob/e07c0f1ddbfc89ad1ac4dda7246d8ed5d0d57c19/base/boot.jl#L491).

Linetable representation in Julia IR has been changed to be more compact.
This commit updates IRTools to decode and generate valid debug information according to these changes.

Adaptation for IRTools is relatively straightforward in the sense that
IRTools operates on untyped IR which does not contains inline
statements.

However, IRTools contains an inlining pass but it did not account for
linetable information previously. In this change, I have made the choice
to use the same line for all inlined statements. This can be further
improved in the future.
@CarloLucibello CarloLucibello merged commit 6f6296d into master Apr 23, 2024
8 checks passed
@Pangoraw Pangoraw deleted the pb/lineinfonode branch April 24, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeInfo's field inferred will be removed in upcoming Julia version
3 participants