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

Why typed ir code of Base.code_typed(repeat, (String, Int)) looks like a infinite recursion invoke #57525

Open
songjhaha opened this issue Feb 25, 2025 · 1 comment
Labels
display and printing Aesthetics and correctness of printed representations of objects.

Comments

@songjhaha
Copy link

In Julia 1.10.8,the typed ir code of Base.code_typed(repeat, (String, Int)) looks like to invoke itself, which is confused.

julia> Base.code_typed(repeat, (String, Int))
1-element Vector{Any}:
 CodeInfo(
1%1 = invoke Base.repeat(s::String, r::Int64)::String
└──      return %1
) => String
@vtjnash
Copy link
Member

vtjnash commented Feb 25, 2025

It is a long-standing bug in the IRShow printing customization for :invoke which shows the specialization types, even if they do not apply to the arguments. This method is defined to be an invoke call to the less-specialized function, so the invoke is not the same method as the outer function

@vtjnash vtjnash added the display and printing Aesthetics and correctness of printed representations of objects. label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

No branches or pull requests

2 participants