3 ms·
Does this actually apply only for Objective C or can other programming languages benefit as well?
by miohtama 5y ago
Does this actually apply only for Objective C or can other programming languages benefit as well?
- icodestuff 5y agoAnything that calls into ObjC benefits as well, and if you built another programming language that used a very similar mechanism, presumably you could also use it.
- saagarjha 5y agoThe functionality seems to be general-purpose, with the branch target being hinted at by providing the location of the branch and the input registers that can be used to calculate the address. However, based on how this is implemented it looks like there is only one place you can use this and Apple is going to use it for objc_msgSend, although its use in WebKit might mean that JavaScriptCore has uses planned as well.
- flohofwoe 5y agoAFAIK all language bindings for the macOS system APIs go through the ObjC runtime library and call objc_msgSend() to invoke object or class methods (not sure about Swift though).