Showing 1 of 1 files from the diff.

@@ -24,44 +24,58 @@
Loading
24 24
        line = loc[2]
25 25
    end
26 26
27 +
    src = frame.framecode.src
28 +
27 29
    exprs = []
28 -
    for pc in frame.pc:length(frame.framecode.src.codelocs)
30 +
    for pc in frame.pc:length(src.codelocs)
29 31
        loc = JuliaInterpreter.whereis(frame, pc)
30 32
31 33
        if loc === nothing || loc[2] > line
32 34
            return exprs
33 35
        end
34 36
35 -
        expr = JuliaInterpreter.pc_expr(frame, pc)
37 +
        expr = JuliaInterpreter.pc_expr(src, pc)
36 38
        if Meta.isexpr(expr, :call)
37 39
            for i in 1:length(expr.args)
38 -
                val = try
39 -
                    JuliaInterpreter.@lookup(frame, expr.args[i])
40 -
                catch err
41 -
                    expr.args[i]
42 -
                end
43 -
                expr.args[i] = maybe_quote(val)
40 +
                expr.args[i] = maybe_quote(expr.args[i])
44 41
            end
45 -
            push!(exprs, (pc = pc, expr = prettify_expr(expr)))
42 +
            push!(exprs, (pc = pc, expr = string("%", pc, " = ", prettyprint_expr(expr, src))))
46 43
        elseif Meta.isexpr(expr, :(=))
47 44
            expr = expr.args[2]
48 -
            push!(exprs, (pc = pc, expr = prettify_expr(expr)))
45 +
            push!(exprs, (pc = pc, expr = prettyprint_expr(expr, src)))
49 46
        end
50 47
    end
51 48
    exprs
52 49
end
53 50
54 -
function prettify_expr(expr)
55 -
    if Meta.isexpr(expr, :call)
56 -
        fname = expr.args[1]
51 +
function prettyprint_expr(expr, src)
52 +
    io = IOBuffer()
53 +
    prettyprint_expr(io, expr, src)
54 +
    return String(take!(io))
55 +
end
57 56
58 -
        if Base.isoperator(Symbol(fname))
59 -
            join(string.(expr.args[2:end]), " $(fname) ")
60 -
        else
61 -
            string(fname, '(', join(expr.args[2:end], ", "), ')')
57 +
function prettyprint_expr(io, expr, src)
58 +
    if Meta.isexpr(expr, :call)
59 +
        for (i, ex) in enumerate(expr.args)
60 +
            if ex isa QuoteNode
61 +
                print(io, ex.value)
62 +
            elseif ex isa JuliaInterpreter.SlotNumber || ex isa Core.SlotNumber
63 +
                print(io, src.slotnames[ex.id])
64 +
            elseif ex isa JuliaInterpreter.SSAValue || ex isa Core.SSAValue
65 +
                print(io, '%', ex.id)
66 +
            else
67 +
                prettyprint_expr(io, ex, src)
68 +
            end
69 +
            if i == 1
70 +
                print(io, '(')
71 +
            elseif i == length(expr.args)
72 +
                print(io, ')')
73 +
            else
74 +
                print(io, ", ")
75 +
            end
62 76
        end
63 77
    else
64 -
        repr(expr)
78 +
        show(io, expr)
65 79
    end
66 80
end
67 81
Files Coverage
src 0.16%
Project Totals (6 files) 0.16%
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests
codecov-umbrella
Build #255677724 -
unittests

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading