Skip to content

Commit

Permalink
fix #474: ignored slotnames (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub committed Apr 15, 2021
1 parent e4226d7 commit 1103f82
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ callee: f_inner() in Main at none:1, breakpoint(error(s::AbstractString) in Base
julia> leaf(fr)
Frame for error(s::AbstractString) in Base at error.jl:33
1 33 1 ─ %1 = ($(QuoteNode(ErrorException)))(_2)
1 33 1 ─ %1 = ($(QuoteNode(ErrorException)))(s)
2* 33 │ %2 = Core.throw(%1)
3 33 └── return %2
s = "inner error"
Expand Down Expand Up @@ -156,11 +156,11 @@ julia> @interpret myfunction(1, 2)
julia> @interpret myfunction(5, 6)
(Frame for myfunction(x, y) in Main at none:1
3 4 │ %3 = _2 > 3
3 4 │ %3 = x > 3
4 4 └── goto #3 if not %3
b 5* 4 2 ─ nothing
6 4 └── goto #3
7 5 3 ┄ %7 = _5 + _4 + _2 + _3
7 5 3 ┄ %7 = a + b + x + y
x = 5
y = 6
Expand Down
4 changes: 2 additions & 2 deletions src/construct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ mymethod (generic function with 1 method)
julia> JuliaInterpreter.enter_call_expr(:(\$mymethod(1)))
Frame for mymethod(x) in Main at none:1
1* 1 1 ─ %1 = _2 + 1
1* 1 1 ─ %1 = x + 1
2 1 └── return %1
x = 1
Expand Down Expand Up @@ -659,7 +659,7 @@ mymethod (generic function with 1 method)
julia> JuliaInterpreter.enter_call(mymethod, 1)
Frame for mymethod(x) in Main at none:1
1* 1 1 ─ %1 = _2 + 1
1* 1 1 ─ %1 = x + 1
2 1 └── return %1
x = 1
Expand Down
3 changes: 2 additions & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ function framecode_lines(src::CodeInfo)
lines = String[]
src = replace_coretypes!(copy_codeinfo(src); rev=true)
reverse_lookup_globalref!(src.code)
io = IOContext(buf, :displaysize=>displaysize(stdout))
io = IOContext(buf, :displaysize => displaysize(stdout),
:SOURCE_SLOTNAMES => Base.sourceinfo_slotnames(src))
used = BitSet()
cfg = Core.Compiler.compute_basic_blocks(src.code)
for stmt in src.code
Expand Down

0 comments on commit 1103f82

Please sign in to comment.