Noticed in https://github.com/JuliaLang/julia/issues/43023: Since v1.8.0-DEV.267, the nargs argument of replace_code_newstyle! has changed its semantics, being offset by one. I.e. it now requires
diff --git a/src/reflection/utils.jl b/src/reflection/utils.jl
index f5dc511..66bacf6 100644
--- a/src/reflection/utils.jl
+++ b/src/reflection/utils.jl
@@ -134,7 +134,7 @@ function splicearg!(ir::IR)
end
function update!(ci::CodeInfo, ir::Core.Compiler.IRCode)
- Core.Compiler.replace_code_newstyle!(ci, ir, length(ir.argtypes)-1)
+ Core.Compiler.replace_code_newstyle!(ci, ir, length(ir.argtypes))
ci.inferred = false
ci.ssavaluetypes = length(ci.code)
slots!(ci)
(That obviously needs to be put inside an if VERSION check.)
Noticed in https://github.com/JuliaLang/julia/issues/43023: Since
v1.8.0-DEV.267
, thenargs
argument ofreplace_code_newstyle!
has changed its semantics, being offset by one. I.e. it now requires(That obviously needs to be put inside an
if VERSION
check.)