4 ms·
The MacRuby guys are doing this as well. (AOT) They are also using LLVM incidentally. What I'm wondering about is how they do AOT for dynamic code. Do they hav
by maximilian 17y ago
The MacRuby guys are doing this as well. (AOT) They are also using LLVM incidentally.
What I'm wondering about is how they do AOT for dynamic code. Do they have every possible path for a data type compiled? This would seem silly..maybe LLVM has some clever ways about this?
- jsolson 17y agoNo. Your message sends all end up going to the same place where you pass in (a) the target of the send (b) and the message you were sending. This handles dispatch to wherever that's supposed to end up. Objective-C itself handles it this way using objc_msgSend. In fact... since MacRuby is built entirely on top of Cocoa primitives, it wouldn't surprise me if they've translated all Ruby messages into Objective-C messages and just use objc_msgSend for all of this sort of dispatch. For an interesting exploration of this particular call, check out this blog post: http://ridiculousfish.com/blog/archives/2005/08/01/objc_msgsend/ http://ridiculousfish.com/blog/archives/2005/08/01/objc_msgs...