Commit df0080c
authored
In order to allow `Argument`s to be printed nicely.
> before
```julia
julia> code_typed((Float64,)) do x
sin(x)
end
1-element Vector{Any}:
CodeInfo(
1 ─ %1 = invoke Main.sin(_2::Float64)::Float64
└── return %1
) => Float64
julia> code_typed((Bool,Any,Any)) do c, x, y
z = c ? x : y
z
end
1-element Vector{Any}:
CodeInfo(
1 ─ goto #3 if not c
2 ─ goto #4
3 ─ nothing::Nothing
4 ┄ %4 = φ (#2 => _3, #3 => _4)::Any
└── return %4
) => Any
```
> after
```julia
julia> code_typed((Float64,)) do x
sin(x)
end
1-element Vector{Any}:
CodeInfo(
1 ─ %1 = invoke Main.sin(x::Float64)::Float64
└── return %1
) => Float64
julia> code_typed((Bool,Any,Any)) do c, x, y
z = c ? x : y
z
end
1-element Vector{Any}:
CodeInfo(
1 ─ goto #3 if not c
2 ─ goto #4
3 ─ nothing::Nothing
4 ┄ %4 = φ (#2 => x, #3 => y)::Any
└── return %4
) => Any
```
1 parent 4170090 commit df0080c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments