File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ function fwd_abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize
12
12
return primal_call
13
13
end
14
14
15
+ if f === Core. _apply_iterate
16
+ @assert ! isready (primal_call) || ! isa (primal_call[]. info, FRuleCallInfo)
17
+ # For performance and to avoid inlining getting confused about the lack
18
+ # of UnionSplitApplyCallInfo, special case apply to skip the frule check.
19
+ # Note that the we still check the frule of the actually applied function.
20
+ return primal_call
21
+ end
22
+
15
23
nargs = length (arginfo. argtypes)- 1
16
24
frule_preargtypes = Any[Const (ChainRulesCore. frule), Tuple{Nothing,Vararg{Any,nargs}}]
17
25
frule_argtypes = append! (frule_preargtypes, arginfo. argtypes)
@@ -20,11 +28,6 @@ function fwd_abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize
20
28
local frule_call:: Future{CallMeta}
21
29
local result:: Future{CallMeta} = Future {CallMeta} ()
22
30
function make_progress (_, sv)
23
- if isa (primal_call[]. info, UnionSplitApplyCallInfo)
24
- result[] = primal_call[]
25
- return true
26
- end
27
-
28
31
ready = false
29
32
if ! @isdefined (frule_call)
30
33
# Here we simply check for the frule existance - we don't want to do a full
You can’t perform that action at this time.
0 commit comments