Skip to content

Commit

Permalink
Julia 1.12: WIP (#2020)
Browse files Browse the repository at this point in the history
* Julia 1.12: WIP

* linetable

* Update utils.jl

* Update utils.jl
  • Loading branch information
wsmoses authored Oct 29, 2024
1 parent 2bde982 commit 12c1abb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand All @@ -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
Expand Down

0 comments on commit 12c1abb

Please sign in to comment.