@@ -33,14 +33,12 @@ and doesn't throw when there is no matching method.
33
33
"""
34
34
function whichtt (@nospecialize (tt))
35
35
# 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
38
38
# 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
44
42
else
45
43
m = ccall (:jl_gf_invoke_lookup , Any, (Any, UInt), tt, get_world_counter ())
46
44
m === nothing && return nothing
@@ -405,11 +403,11 @@ function statementnumbers(framecode::FrameCode, line::Integer, file::Symbol)
405
403
stmtidxs = Int[]
406
404
stmtidx = 1
407
405
while stmtidx <= length (locs)
408
- loc = locs[stmtidx]
406
+ loc = locs[stmtidx]
409
407
if loc in idxs
410
408
push! (stmtidxs, stmtidx)
411
409
stmtidx += 1
412
- # Skip continous statements that are on the same line
410
+ # Skip continous statements that are on the same line
413
411
while stmtidx <= length (locs) && loc == locs[stmtidx]
414
412
stmtidx += 1
415
413
end
@@ -423,7 +421,7 @@ function statementnumbers(framecode::FrameCode, line::Integer, file::Symbol)
423
421
424
422
# If the exact line number does not exist in the line table, take the one that is closest after that line
425
423
# restricted to the line range of the current scope.
426
- scope = framecode. scope
424
+ scope = framecode. scope
427
425
range = scope isa Method ? compute_corrected_linerange (scope) : compute_linerange (framecode)
428
426
if line in range
429
427
closest = nothing
0 commit comments