From 12c1abbf3a32db5a24bce2e5f23bd5026723d92c Mon Sep 17 00:00:00 2001 From: William Moses Date: Tue, 29 Oct 2024 14:16:04 -0400 Subject: [PATCH] Julia 1.12: WIP (#2020) * Julia 1.12: WIP * linetable * Update utils.jl * Update utils.jl --- src/utils.jl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 55dc69769e..9492dccdd6 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -213,8 +213,12 @@ function codegen_world_age_generator(world::UInt, source, self, ft::Type, tt::Ty # prepare a new code info new_ci = copy(ci) empty!(new_ci.code) - empty!(new_ci.codelocs) - resize!(new_ci.linetable, 1) # see note below + @static if isdefined(Core, :DebugInfo) + new_ci.debuginfo = Core.DebugInfo(:none) + else + empty!(new_ci.codelocs) + resize!(new_ci.linetable, 1) # see note below + end empty!(new_ci.ssaflags) new_ci.ssavaluetypes = 0 new_ci.min_world = min_world[] @@ -232,7 +236,10 @@ function codegen_world_age_generator(world::UInt, source, self, ft::Type, tt::Ty # return the codegen world age push!(new_ci.code, ReturnNode(world)) push!(new_ci.ssaflags, 0x00) # Julia's native compilation pipeline (and its verifier) expects `ssaflags` to be the same length as `code` - push!(new_ci.codelocs, 1) # see note below + @static if isdefined(Core, :DebugInfo) + else + push!(new_ci.codelocs, 1) # see note below + end new_ci.ssavaluetypes += 1 # NOTE: we keep the first entry of the original linetable, and use it for location info