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

Use original method name in line table #11

Closed
Keno opened this issue Nov 29, 2022 · 1 comment · Fixed by JuliaLang/julia#47750
Closed

Use original method name in line table #11

Keno opened this issue Nov 29, 2022 · 1 comment · Fixed by JuliaLang/julia#47750

Comments

@Keno
Copy link
Member

Keno commented Nov 29, 2022

I would prefer if the line table showed the original method name rather than the generated type name of the overlay pass. Would make backtraces much more readable.

julia> (@code_lowered pass(sin, 1))
CodeInfo(
1 ─       (getfield)(fargs, 1)
│   %2  = (getfield)(fargs, 2)
│   @ math.jl:1489 within `##SinTable#296`
│         xf = (#self#)(Base.Math.float, %2)
│   @ math.jl:1490 within `##SinTable#296`
│   %4  = (#self#)(Base.Math.:(===), %2, xf)
└──       goto #3 if not %4
2 ─ %6  = Base.Math.sin
│   %7  = (#self#)(Core.tuple, %2)
│   %8  = (#self#)(Base.Math.MethodError, %6, %7)
│         (#self#)(Base.Math.throw, %8)
└──       goto #3
    @ math.jl:1491 within `##SinTable#296`
3 ┄ %11 = (#self#)(Base.Math.sin, xf)
└──       return %11
)

julia> (@code_lowered pass(sin, 1)).linetable
3-element Vector{Any}:
 Core.LineInfoNode(Base.Math, Symbol("##SinTable#296"), Symbol("math.jl"), 1489, 0)
 Core.LineInfoNode(Base.Math, Symbol("##SinTable#296"), Symbol("math.jl"), 1490, 0)
 Core.LineInfoNode(Base.Math, Symbol("##SinTable#296"), Symbol("math.jl"), 1491, 0)
@Keno
Copy link
Member Author

Keno commented Nov 29, 2022

This might need some adjustments in base, I'm not entirely sure.

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 a pull request may close this issue.

1 participant