Adapt to nightly linetable changes #122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Core.Compiler.LineInfoNode
was removed in JuliaLang/julia#52415 but kept inCore
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
insideIRTools
to prevent future breaking changes. But this can create a breakage for people usingIR(lines::Vector{LineInfoNode})
constructor so we may not want to include it yet or add conversions.Closes #121