Skip to content

Commit

Permalink
set codeinfo.isva/nargs for julia v1.12 (#93)
Browse files Browse the repository at this point in the history
* set codeinfo.isva/nargs for julia v1.12

* core.codeinfo
  • Loading branch information
chengchingwen authored Nov 5, 2024
1 parent def8bf3 commit 8bb69eb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ function __cacheget_generator__(world, source, self, cache, x, args #= for `retu
Expr(Symbol("scope-block"), Expr(:block, Expr(:meta, :inline), Expr(:return, body))))
ci = ccall(:jl_expand, Any, (Any, Any), expr, @__MODULE__)
ci.inlineable = true
if hasfield(Core.CodeInfo, :nargs)
ci.nargs = 4
ci.isva = true
end
if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-alpha", :codeinfonargs)
ci.nargs = 4
ci.isva = true
end
return ci
end

Expand Down

0 comments on commit 8bb69eb

Please sign in to comment.