Skip to content

Commit ec584e4

Browse files
committed
1 parent f3b4c3d commit ec584e4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/utils.jl

+8-10
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@ and doesn't throw when there is no matching method.
3333
"""
3434
function whichtt(@nospecialize(tt))
3535
# TODO: provide explicit control over world age? In case we ever need to call "old" methods.
36-
@static if VERSION v"1.9.0-DEV.149"
37-
# branch on https://github.com/JuliaLang/julia/pull/44448
36+
@static if VERSION v"1.8-beta2"
37+
# branch on https://github.com/JuliaLang/julia/pull/44515
3838
# for now, actual code execution doesn't ever need to consider overlayed method table
39-
result = Core.Compiler._findsup(tt, nothing, get_world_counter())
40-
result === nothing && return nothing
41-
fresult = first(result)
42-
fresult === nothing && return nothing
43-
return fresult.method
39+
match, _ = Core.Compiler._findsup(tt, nothing, get_world_counter())
40+
match === nothing && return nothing
41+
return match.method
4442
else
4543
m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, get_world_counter())
4644
m === nothing && return nothing
@@ -405,11 +403,11 @@ function statementnumbers(framecode::FrameCode, line::Integer, file::Symbol)
405403
stmtidxs = Int[]
406404
stmtidx = 1
407405
while stmtidx <= length(locs)
408-
loc = locs[stmtidx]
406+
loc = locs[stmtidx]
409407
if loc in idxs
410408
push!(stmtidxs, stmtidx)
411409
stmtidx += 1
412-
# Skip continous statements that are on the same line
410+
# Skip continous statements that are on the same line
413411
while stmtidx <= length(locs) && loc == locs[stmtidx]
414412
stmtidx += 1
415413
end
@@ -423,7 +421,7 @@ function statementnumbers(framecode::FrameCode, line::Integer, file::Symbol)
423421

424422
# If the exact line number does not exist in the line table, take the one that is closest after that line
425423
# restricted to the line range of the current scope.
426-
scope = framecode.scope
424+
scope = framecode.scope
427425
range = scope isa Method ? compute_corrected_linerange(scope) : compute_linerange(framecode)
428426
if line in range
429427
closest = nothing

0 commit comments

Comments
 (0)