Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't assume that method1 is always in a thunk #891

Merged
merged 1 commit into from
Feb 12, 2025
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
4 changes: 3 additions & 1 deletion src/lowered.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ function methods_by_execution!(@nospecialize(recurse), methodinfo, docexprs, fra
end
end
end
pc = next_or_nothing!(frame)
@assert length(stmt.args) == 1
pc = mode !== :sigs ? step_expr!(recurse, frame, stmt, true) :
next_or_nothing!(frame)
else
pc, pc3 = ret
# Get the line number from the body
Expand Down
1 change: 1 addition & 0 deletions test/backedges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ do_test("Backedges") && @testset "Backedges" begin
laststmt = src.code[end]
@assert isa(laststmt, Core.ReturnNode)
to_skip = isa(laststmt.val, Revise.JuliaInterpreter.SSAValue) ? 2 : 1
# Revise.LoweredCodeUtils.print_with_code(stdout, src, isrequired)
@test sum(isrequired) == length(src.code)-count(e->isexpr(e, :latestworld), src.code)-to_skip # skips the `return` at the end (and its argument)

src = """
Expand Down
Loading