Code warntype should show print the unstable SSA values in red/yellow
If you have some code like
julia> function foo(x)
y = x[1]
sin(y)
end
foo (generic function with 1 method)
julia> code_warntype(foo, (Vector{Any},), optimize=true)
It would be useful if %17 was printed in red
I don't know the consequences of directly interpolating expression here but here is the first attempt at it. Any guiding information on coverage of IR statements in code changes made will be appreciated.
@gbaraldi Should line 19 be highlighted too ?
IMO, only the IR statement would have the red color, similar to how currently only ::Any is red %17 would be red as well. The whole line being red doesn't show the user what specifically is type unstable in that statement
I was checking a good first issue to start with, and I think this is solved already. Am I right?
@joseeloren Its partially solved and need tests. Also, I have commits on my local setup. I am struggling to make time, and I don't recollect if I have it all resolved. If you don't see any commits from me by coming weekend it's all yours.
In case you end up taking this up, the existing code is good enough for adding tests directly (I think it doesn't cover few node types yet and that can be next PR or next set of commits after passing tests for commits made so far).