Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ function until_line!(interp::Interpreter, frame::Frame, line::Union{Nothing, Int
pc = frame.pc
initialline, initialfile = linenumber(frame, pc), getfile(frame, pc)
line === nothing && (line = initialline + 1)
line_final = line
pc = next_until!(interp, frame, istoplevel) do frame::Frame
return is_return(pc_expr(frame)) || (linenumber(frame) >= line && getfile(frame) == initialfile)
return is_return(pc_expr(frame)) || (linenumber(frame) >= line_final && getfile(frame) == initialfile)
end
(pc === nothing || isa(pc, BreakpointRef)) && return pc
maybe_step_through_kwprep!(interp, frame, istoplevel)
Expand Down
26 changes: 15 additions & 11 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,21 @@ else
is_breakpoint_marker(stmt) = stmt === __BREAK_POINT_MARKER__
end

@static if VERSION ≥ v"1.12.0-DEV.173"
function pushuniquefiles!(unique_files::Set{Symbol}, lt)
for edge in lt.edges
pushuniquefiles!(unique_files, edge)
end
linetable = lt.linetable
if linetable === nothing
push!(unique_files, Base.IRShow.debuginfo_file1(lt))
else
pushuniquefiles!(unique_files, linetable)
end
return unique_files
end
end

function FrameCode(scope, src::CodeInfo; generator=false, optimize=true)
if optimize
src, methodtables = optimize!(copy(src), scope)
Expand All @@ -196,17 +211,6 @@ function FrameCode(scope, src::CodeInfo; generator=false, optimize=true)
lt = linetable(src)
unique_files = Set{Symbol}()
@static if VERSION ≥ v"1.12.0-DEV.173"
function pushuniquefiles!(unique_files::Set{Symbol}, lt)
for edge in lt.edges
pushuniquefiles!(unique_files, edge)
end
linetable = lt.linetable
if linetable === nothing
push!(unique_files, Base.IRShow.debuginfo_file1(lt))
else
pushuniquefiles!(unique_files, linetable)
end
end
pushuniquefiles!(unique_files, lt)
else # VERSION < v"1.12.0-DEV.173"
for entry in lt
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ using Logging

@test isempty(detect_ambiguities(JuliaInterpreter, Base, Core))

if isdefined(Test, :detect_closure_boxes)
@test isempty(Test.detect_closure_boxes(JuliaInterpreter))
end

if !JuliaInterpreter.isdefinedglobal(@__MODULE__, :read_and_parse)
include("utils.jl")
end
Expand Down
Loading