@@ -195,17 +195,15 @@ fileline(lin::LineInfoNode) = String(lin.file), lin.line
195195fileline(lnn:: LineNumberNode ) = String(lnn. file), lnn. line
196196
197197if VERSION ≥ v" 1.12.0-DEV.173" # https://github.com/JuliaLang/julia/pull/52415
198- function linetable_scopes(m:: Method )
199- src = Base. uncompressed_ast(m)
198+ function linetable_scopes(src:: Core.CodeInfo , m)
200199 lts = [Vector{Base. Compiler. IRShow. LineInfoNode}() for _ = eachindex(src. code)]
201200 for pc = eachindex(src. code)
202201 Base. IRShow. append_scopes!(lts[pc], pc, src. debuginfo, m)
203202 end
204203 return lts
205204 end
206205else
207- function linetable_scopes(m:: Method )
208- src = Base. uncompressed_ast(m)
206+ function linetable_scopes(src:: Core.CodeInfo , _)
209207 lt, cl = src. linetable, src. codelocs
210208 lts = [Vector{Core. LineInfoNode}() for _ = eachindex(src. code)]
211209 for pc = eachindex(src. code)
222220 return lts
223221 end
224222end
225- @doc """
223+
224+ """
226225 scopes = linetable_scopes(m::Method)
227226
228227Return an array of "scopes" for each statement in the lowered code for `m`. If
@@ -237,7 +236,8 @@ The precise type of these entries varies with Julia version,
237236`Base.Compiler.IRShow.LineInfoNode` objects on Julia 1.12 and up, and
238237`Core.LineInfoNode` objects on earlier versions. These objects differ in some of
239238their fields. `:method`, `:file`, and `:line` are common to both types.
240- """ linetable_scopes
239+ """
240+ linetable_scopes(m:: Method ) = linetable_scopes(Base. uncompressed_ast(m), m)
241241
242242getmethod(m:: Method ) = m
243243getmethod(mi:: Core.MethodInstance ) = getmethod(mi. def)
0 commit comments