diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 505a517e1bf98..304a5e78a13e1 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -330,7 +330,7 @@ function ir_inline_linetable!(linetable::Vector{LineInfoNode}, inlinee_ir::IRCod # Append the linetable of the inlined function to our line table topline::Int32 = linetable_offset + Int32(1) coverage_by_path = JLOptions().code_coverage == 3 - push!(linetable, LineInfoNode(inlinee_def.module, inlinee, inlinee_def.file, inlinee_def.line, inlined_at)) + push!(linetable, LineInfoNode(inlinee_def.module, inlinee_def.name, inlinee_def.file, inlinee_def.line, inlined_at)) oldlinetable = inlinee_ir.linetable extra_coverage_line = zero(Int32) for oldline in eachindex(oldlinetable) diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 77e1fd02de8d0..92e6b0dd5f666 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -1015,7 +1015,7 @@ function typeinf_ext(interp::AbstractInterpreter, mi::MethodInstance) tree.slotflags = fill(IR_FLAG_NULL, nargs) tree.ssavaluetypes = 1 tree.codelocs = Int32[1] - tree.linetable = LineInfoNode[LineInfoNode(method.module, mi, method.file, method.line, Int32(0))] + tree.linetable = LineInfoNode[LineInfoNode(method.module, method.name, method.file, method.line, Int32(0))] tree.ssaflags = UInt8[0] set_inlineable!(tree, true) tree.parent = mi diff --git a/test/stacktraces.jl b/test/stacktraces.jl index 590abb90c590f..882114e71d833 100644 --- a/test/stacktraces.jl +++ b/test/stacktraces.jl @@ -91,9 +91,16 @@ trace = (try; f(3); catch; stacktrace(catch_backtrace()); end)[1:3] can_inline = Bool(Base.JLOptions().can_inline) for (frame, func, inlined) in zip(trace, [g,h,f], (can_inline, can_inline, false)) @test frame.func === typeof(func).name.mt.name - @test frame.linfo.def.module === which(func, (Any,)).module - @test frame.linfo.def === which(func, (Any,)) - @test frame.linfo.specTypes === Tuple{typeof(func), Int} + # broken until #50082 can be addressed + if inlined + @test frame.linfo.def.module === which(func, (Any,)).module broken=true + @test frame.linfo.def === which(func, (Any,)) broken=true + @test frame.linfo.specTypes === Tuple{typeof(func), Int} broken=true + else + @test frame.linfo.def.module === which(func, (Any,)).module + @test frame.linfo.def === which(func, (Any,)) + @test frame.linfo.specTypes === Tuple{typeof(func), Int} + end # line @test frame.file === Symbol(@__FILE__) @test !frame.from_c