5 ms·
We created a new compiler front end that allowed LLVM to understand ActionScript 3 and used its existing ARM back end to output native ARM assembly code. We cal
by jimboyoungblood 17y ago
We created a new compiler front end that allowed LLVM to understand ActionScript 3 and used its existing ARM back end to output native ARM assembly code. We call this Ahead of Time (AOT) compilation—in contrast to the way Adobe Flash Player and Adobe AIR function on the desktop using Just in Time (JIT) compilation.
"AOT Compilation"?! Amazing!! They should patent this!
but yeah, sounds pretty cool.
- maximilian 17y agoThe 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...