Fix a variety of bugs with nil-receiver checks when targeting
non-Darwin ObjC runtimes: - Use the same logic the Darwin runtime does for inferring that a receiver is non-null and therefore doesn't require null checks. Previously we weren't skipping these for non-super dispatch. - Emit a null check when there's a consumed parameter so that we can destroy the argument if the call doesn't happen. This mostly involves extracting some common logic from the Darwin-runtime code. - Generate a zero aggregate by zeroing the same memory that was used in the method call instead of zeroing separate memory and then merging them with a phi. This uses less memory and avoids unnecessary copies. - Emit zero initialization, and generate zero values in phis, using the proper zero-value routines instead of assuming that the zero value of the result type has a bitwise-zero representation.
Loading
Please sign in to comment