Skip to content

Commit 1103f82

Browse files
authored
fix #474: ignored slotnames (#475)
1 parent e4226d7 commit 1103f82

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/src/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ callee: f_inner() in Main at none:1, breakpoint(error(s::AbstractString) in Base
118118
119119
julia> leaf(fr)
120120
Frame for error(s::AbstractString) in Base at error.jl:33
121-
1 33 1 ─ %1 = ($(QuoteNode(ErrorException)))(_2)
121+
1 33 1 ─ %1 = ($(QuoteNode(ErrorException)))(s)
122122
2* 33 │ %2 = Core.throw(%1)
123123
3 33 └── return %2
124124
s = "inner error"
@@ -156,11 +156,11 @@ julia> @interpret myfunction(1, 2)
156156
julia> @interpret myfunction(5, 6)
157157
(Frame for myfunction(x, y) in Main at none:1
158158
159-
3 4 │ %3 = _2 > 3
159+
3 4 │ %3 = x > 3
160160
4 4 └── goto #3 if not %3
161161
b 5* 4 2 ─ nothing
162162
6 4 └── goto #3
163-
7 5 3 ┄ %7 = _5 + _4 + _2 + _3
163+
7 5 3 ┄ %7 = a + b + x + y
164164
165165
x = 5
166166
y = 6

src/construct.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ mymethod (generic function with 1 method)
616616
617617
julia> JuliaInterpreter.enter_call_expr(:(\$mymethod(1)))
618618
Frame for mymethod(x) in Main at none:1
619-
1* 1 1 ─ %1 = _2 + 1
619+
1* 1 1 ─ %1 = x + 1
620620
2 1 └── return %1
621621
x = 1
622622
@@ -659,7 +659,7 @@ mymethod (generic function with 1 method)
659659
660660
julia> JuliaInterpreter.enter_call(mymethod, 1)
661661
Frame for mymethod(x) in Main at none:1
662-
1* 1 1 ─ %1 = _2 + 1
662+
1* 1 1 ─ %1 = x + 1
663663
2 1 └── return %1
664664
x = 1
665665

src/utils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ function framecode_lines(src::CodeInfo)
444444
lines = String[]
445445
src = replace_coretypes!(copy_codeinfo(src); rev=true)
446446
reverse_lookup_globalref!(src.code)
447-
io = IOContext(buf, :displaysize=>displaysize(stdout))
447+
io = IOContext(buf, :displaysize => displaysize(stdout),
448+
:SOURCE_SLOTNAMES => Base.sourceinfo_slotnames(src))
448449
used = BitSet()
449450
cfg = Core.Compiler.compute_basic_blocks(src.code)
450451
for stmt in src.code

0 commit comments

Comments
 (0)