You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate dispatch function separately from original function
Instead of adding the logic to dispatch to the correct function to the
main singledispatch function itself, generate 2 separate functions: one
that compiles the logic of the undecorated function normally, and a
separate dispatch function that checks the first argument's type and
dispatches either to one of the registered implementations or the
fallback.
That makes it easier to generate code when the main singledispatch
function is a generator or some other kind of special function, as the
code generation can generate the main singledispatch function the same
way it would otherwise.
Because we're no longer changing how that main singledispatch function
is generated based on whether it's a singledispatch function, we don't
need to store whether the current function is a singledispatch function
in FuncInfo.
0 commit comments