5 ms·
Adobe is using LLVM. There is no runtime. +1 http://www.adobe.com/devnet/logged_in/abansod_iphone.html http://www.adobe.com/devnet/logged_in/abansod_iphone.h
by wallflower 17y ago
Adobe is using LLVM.
There is no runtime.
+1
http://www.adobe.com/devnet/logged_in/abansod_iphone.html http://www.adobe.com/devnet/logged_in/abansod_iphone.html
- xal 17y agoThat's some amazing work. Adobe must have dedicated the A-Team to that task.
- moe 17y agoNever understimate Adobe. Despite their misguided stabs towards DRM (oh god when will they learn) they have some good engineering there. PDF, Photoshop, Flash, despite all their flaws and sometimes dubious origins, wouldn't have dominated their respective markets for decades if there wasn't also at least a bit of quality engineering in each. ;-)
- deleted 17y ago[deleted]
- ed 17y agoI don't know why parent is being modded down. Adobe has some fucking mind-blowing engineers, especially on their core teams. Advanced technology labs is putting out parc-quality work in the field of graphics.
- bonaldi 17y ago"There is no runtime" Ah, so they got Flash on the phone by taking away the bit that makes it suck bells. Good job, Adobe. Amazing what you can do when Apple forces you to not to be craptacular.
- stcredzero 17y agoThank goodness they aren't as bad a case as AT&T. I'm still waiting for some Apple-y goodness to rub off on them.
- iron_ball 17y agoDoes that mean you'd like Flash content to run as non-VM-boxed binaries on your PC? Or did I misunderstand what you meant?
- bonaldi 17y agoIt just means that I loathe the Flash runtime on the Mac: it's slow, kills the CPU and as a result sends the fans spinning. This is one reason (beside the business ones) why it was never going to get on the iPhone.
- whatusername 17y agoRight -- and next you're going to tell us that each and every website that uses flash - you're going to install an application for on your mac.
- siong1987 17y agoLol. And, LLVM is mainly sponsored by Apple. Pwnd.
- jimboyoungblood 17y agoWe 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...
- adatta02 17y agoso couldn't you then take this and then target AS3 to say native x86 code, bypassing the Flash VM entirely?
- ed 17y agoThis is essentially what AVM2 does already, only it's JIT rather than AOT.
- johnnybgoode 17y agoThat explains how they deal with your code, but what are they doing for the Flash Player bits? All of that wasn't written in ActionScript, right? For example, if your app needs to play a video, where is the video player coming from? If it's Adobe's own, doesn't that mean Flash-equivalent bits are going to be in every compiled app? In that case, and this would be consistent with what they're saying, the main reason for this AOT compilation instead of JIT is apparently to comply with Apple's legal terms.
- robc 17y agoLooking at some of the apps Adobe are showcasing - it appears they're all around 10mb, which suggests they're including all the runtime bits in there.
- ed 17y agoThey're probably using a similar strategy to Alchemy: map AS3 library calls to a Flash framework implemented in the target language. (In Alchemy's case Scott Petersen implemented a C VM in AS3, linked with the C std lib.) Most likely the entire framework is being bundled with every release, without regard to dependency.
- johnnybgoode 17y agoThanks robc and ed. In that case, I don't think this is as impressive from a technical perspective as some people thought. Again, this AOT compiler is not what made Flash apps technically possible on the iPhone; Adobe could've used this same bundling technique with the JIT compiler. It looks like they've done this just to satisfy Apple's terms.