Skip to content

Commit 1533608

Browse files
authored
Co-authored-by: Cédric Belmant <[email protected]>
1 parent 41fcdf2 commit 1533608

File tree

1 file changed

+5
-26
lines changed

1 file changed

+5
-26
lines changed

src/stage2/interpreter.jl

+5-26
Original file line numberDiff line numberDiff line change
@@ -289,34 +289,13 @@ function diffractor_finish(@specialize(finishfunc), state::InferenceState, inter
289289
end
290290
end
291291

292-
@static if VERSION v"1.12.0-DEV.1823"
293-
@static if VERSION v"1.13.0-DEV.126" || VERSION v"1.12.0-alpha1"
292+
@static if VERSION v"1.12-"
294293
CC.finishinfer!(state::InferenceState, interp::ADInterpreter, cycleid::Int) = diffractor_finish(CC.finishinfer!, state, interp, cycleid)
295-
else
296-
CC.finishinfer!(state::InferenceState, interp::ADInterpreter) = diffractor_finish(CC.finishinfer!, state, interp)
297-
end
298-
@static if VERSION v"1.12.0-DEV.1988"
299-
function CC.finish!(interp::ADInterpreter, caller::InferenceState, validation_world::UInt)
300-
Cthulhu.set_cthulhu_source!(caller.result)
301-
return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState, validation_world::UInt)
302-
end
303-
else
304-
function CC.finish!(interp::ADInterpreter, caller::InferenceState)
294+
function CC.finish!(interp::ADInterpreter, caller::InferenceState, validation_world::UInt, time_before::UInt64)
305295
Cthulhu.set_cthulhu_source!(caller.result)
306-
return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState)
296+
return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState, validation_world::UInt, time_before::UInt64)
307297
end
308-
end
309-
310-
elseif VERSION v"1.12.0-DEV.734"
311-
CC.finishinfer!(state::InferenceState, interp::ADInterpreter) = diffractor_finish(CC.finishinfer!, state, interp)
312-
function CC.finish!(interp::ADInterpreter, caller::InferenceState;
313-
can_discard_trees::Bool=false)
314-
Cthulhu.set_cthulhu_source!(caller.result)
315-
return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState;
316-
can_discard_trees)
317-
end
318-
319-
elseif VERSION v"1.11.0-DEV.737"
298+
elseif VERSION v"1.11-"
320299
CC.finish(state::InferenceState, interp::ADInterpreter) = diffractor_finish(CC.finish, state, interp)
321300
function CC.finish!(interp::ADInterpreter, caller::InferenceState)
322301
result = caller.result
@@ -332,7 +311,7 @@ function CC.transform_result_for_cache(::ADInterpreter, ::MethodInstance, ::Worl
332311
return result.src
333312
end
334313

335-
else # VERSION < v"1.11.0-DEV.737"
314+
else # VERSION < v"1.11-"
336315
CC.finish(state::InferenceState, interp::ADInterpreter) = diffractor_finish(CC.finish, state, interp)
337316
function CC.transform_result_for_cache(::ADInterpreter, ::MethodInstance, ::WorldRange,
338317
result::InferenceResult)

0 commit comments

Comments
 (0)