From 9d449e5dae3ee99c4686b6c86c8bc7ca3688d576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belmant?= Date: Thu, 29 May 2025 21:19:29 +0000 Subject: [PATCH 1/2] Adjust to method table changes --- src/analysis/forward.jl | 2 +- src/stage2/abstractinterpret.jl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/analysis/forward.jl b/src/analysis/forward.jl index c9936b06..3ba2fe4f 100644 --- a/src/analysis/forward.jl +++ b/src/analysis/forward.jl @@ -100,4 +100,4 @@ end end -const frule_mt = methods(ChainRulesCore.frule).mt +const frule_mt = @static VERSION ≥ v"1.13.0-DEV.647" ? nothing : methods(ChainRulesCore.frule).mt diff --git a/src/stage2/abstractinterpret.jl b/src/stage2/abstractinterpret.jl index 537c7308..cf6a861b 100644 --- a/src/stage2/abstractinterpret.jl +++ b/src/stage2/abstractinterpret.jl @@ -7,6 +7,8 @@ using .CC: Const, isconstType, argtypes_to_type, tuple_tfunc, Const, using Core: PartialStruct using Base.Meta +get_fname(@nospecialize(fT::DataType)) = @static VERSION ≥ v"1.13.0-DEV.647" ? fT.name.singletonname : fT.name.mt.name + function CC.abstract_call_gf_by_type(interp::ADInterpreter, @nospecialize(f), arginfo::ArgInfo, si::StmtInfo, @nospecialize(atype), sv::InferenceState, max_methods::Int) (;argtypes) = arginfo @@ -30,7 +32,7 @@ function CC.abstract_call_gf_by_type(interp::ADInterpreter, @nospecialize(f), if rinterp.current_level == 1 clos = getfield_tfunc(call.info.rrule_rt, Const(2)) else - name = call.info.info.results.matches[1].method.sig.parameters[2].name.mt.name + name = get_fname(call.info.info.results.matches[1].method.sig.parameters[2]) clos = PrimClosure(name, rinterp.current_level - 1, 1, getfield_tfunc(call.info.rrule_rt, Const(2)), call.info, nothing) end end From 24b29a93613b3dd250f20eae243a7083aea36e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belmant?= Date: Thu, 29 May 2025 21:22:11 +0000 Subject: [PATCH 2/2] Bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index eafdfe58..4e44c3f4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Diffractor" uuid = "9f5e2b26-1114-432f-b630-d3fe2085c51c" -version = "0.2.10" +version = "0.2.11" authors = ["Keno Fischer and contributors"] [deps]