Skip to content

Commit 0b5a05a

Browse files
authored
switch to using Cthulhu.InferredSource(::InferenceState) (#265)
* switch to using `Cthulhu.InferredSource(::InferenceState)` * update Cthulhu compat bound
1 parent 425605f commit 0b5a05a

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ AbstractDifferentiation = "0.5"
2020
ChainRules = "1.44.6"
2121
ChainRulesCore = "1.20"
2222
Combinatorics = "1"
23-
Cthulhu = "2"
23+
Cthulhu = "2.9.6"
2424
OffsetArrays = "1"
2525
PrecompileTools = "1"
2626
StaticArrays = "1"

src/Diffractor.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export ∂⃖, gradient
77

88
const CC = Core.Compiler
99

10-
const GENERATORS = Expr[]
11-
1210
@static if VERSION v"1.11.0-DEV.1498"
1311
import .CC: get_inference_world
1412
using Base: get_world_counter

src/stage2/interpreter.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,7 @@ end
287287
function CC.finish(state::InferenceState, interp::ADInterpreter)
288288
res = @invoke CC.finish(state::InferenceState, interp::AbstractInterpreter)
289289
key = CC.any(state.result.overridden_by_const) ? state.result : state.linfo
290-
interp.unopt[interp.current_level][key] = Cthulhu.InferredSource(
291-
copy(state.src),
292-
copy(state.stmt_info),
293-
state.ipo_effects,
294-
state.result.result)
290+
interp.unopt[interp.current_level][key] = Cthulhu.InferredSource(state)
295291
return res
296292
end
297293

0 commit comments

Comments
 (0)