-fnext-runtime vs. -fgnu-runtime smackdown, #2, objc_msg_lookup
With typed selectors so badly slammed in the last post you would think the GNU runtime interface is down on the mat bleeding from the head, ok, it is, but it's still conscious and heroically regains it's strength in a Hulk like fashion, rising up to smash the NeXT runtime interface squarely in the face.
objc_msg_lookup and objc_msg_lookup_super are really good, well thought out functions.
When you're trying to bootstrap your own Objective-C runtime on a new system, these functions are invaluable, they can be easily written in C and recompiled anywhere. No assembly required. Beautiful, I love it. And even better, if it's in C and available to the compiler it can be inlined.
My proposal;
- Make gcc default to objc_msg_lookup, no flags for it
- Add a new compiler flag, -fobjc-enable-msgsend which uses objc_msgSend and it's variants instead of objc_msg_lookup.
Yes, gcc does default to objc_msg_lookup right now, but with that you get all sorts of other ugliness which do not befit objc_msg_lookup's superior design.
Smackdown results;
-fgnu-runtime: 1
-fnext-runtime:1

0 Comments:
Post a Comment
<< Home