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
1212 return primal_call
1313 end
1414
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+
1523 nargs = length (arginfo. argtypes)- 1
1624 frule_preargtypes = Any[Const (ChainRulesCore. frule), Tuple{Nothing,Vararg{Any,nargs}}]
1725 frule_argtypes = append! (frule_preargtypes, arginfo. argtypes)
@@ -20,11 +28,6 @@ function fwd_abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize
2028 local frule_call:: Future{CallMeta}
2129 local result:: Future{CallMeta} = Future {CallMeta} ()
2230 function make_progress (_, sv)
23- if isa (primal_call[]. info, UnionSplitApplyCallInfo)
24- result[] = primal_call[]
25- return true
26- end
27-
2831 ready = false
2932 if ! @isdefined (frule_call)
3033 # 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