Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust to upcoming julia#54341 #292

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/codegen/reverse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,17 @@ function diffract_ir!(ir, ci, meth, sparams::Core.SimpleVector, nargs::Int, N::I
if nc % 2 == 1
opaque_ci.slotnames = Symbol[Symbol("#self#"), :Δ]
opaque_ci.slotflags = UInt8[0, 0]
if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-alpha", :codeinfonargs)
opaque_ci.nargs = 2
opaque_ci.isva = false
end
else
opaque_ci.slotnames = [Symbol("#oc#"), ci.slotnames...]
opaque_ci.slotflags = UInt8[0, ci.slotflags...]
if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-alpha", :codeinfonargs)
opaque_ci.nargs = 1 + ci.nargs
opaque_ci.isva = ci.isva
end
end
@static if VERSION ≥ v"1.12.0-DEV.173"
opaque_ci.debuginfo = ci.debuginfo
Expand Down
5 changes: 5 additions & 0 deletions src/stage1/recurse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,10 @@ function optic_transform!(ci::CodeInfo, mi::MethodInstance, nargs::Int, N::Int)
ci.method_for_inference_limit_heuristics = meth
ci.edges = MethodInstance[mi]

if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-alpha", :codeinfonargs)
ci.nargs = 2
ci.isva = true
end

return ci
end
5 changes: 5 additions & 0 deletions src/stage1/recurse_fwd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ function fwd_transform!(ci::CodeInfo, mi::MethodInstance, nargs::Int, N::Int, E)
ci.method_for_inference_limit_heuristics = meth
ci.edges = MethodInstance[mi]

if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-alpha", :codeinfonargs)
ci.nargs = 2
ci.isva = true
end

return ci
end

Expand Down
Loading