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
I was looking through your changes and found myself looking at the message forwarding. The current code can be simplified with the new forwarding interface, which moves slot maintenance into the runtime. If you use __objc_msg_forward2 as the forwarding hook, things are more efficient with the new runtime. The v2 ABI now has a single global version for whether caching is safe, rather than a per-method one (methods are sufficiently rare that it’s fine to invalidate all method caches when they change – at some point I’ll rewrite the LLVM pass that I had that did automatic method caching for loops, let me know if you have any workloads I can use for benchmarking…).
This test shows the new interface (which is actually the very old interface, because that one was already the right shape):
Oh, and the comment on _NSWeakLoad is slightly wrong: There’s a third condition, this hook is used only for classes that implement their own retain / release / autorelease and don’t claim to be ARC compatible. It’s mostly dead code, so you might want to log a warning that a weak reference was used to a class that is not ARC-safe when this is reached.
David
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: