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
SIL Combiner: Some fixes and improvements for partial_apply/apply peephole
- We were bailing out if the partial_apply's substitutions
contained archetypes, but there was no inherent reason
to do this. After fixing an issue with opened existential
tracking, this started to work.
- We were also bailing out if the callee was not a static
function_ref. Again, there's no reason to do this, because
we also emit partial_apply to form closures from
class_method and witness_method calls.
- There was a bug in the code for extending lifetimes of
@in parameters. Even if a parameter was an input parameter
to the method and not an alloc_stack, we have to copy
it into a new alloc_stack, because there might be
multiple invocations of an apply for a single partial_apply.
- There was also a bug where we would proceed to apply the
peephole to @unowned_inner_pointer functions, which is wrong.
IRGen's lowering of partial_apply has special handling there
and the resulting function type has an @owned result.
0 commit comments