News for hackers. Stuff that matters.
Re:Flash Professional CS5 will build native iPhone and iPod ... by wallflower on Monday October 05, 2009 @03:01PM (#862485)
Adobe is using LLVM.

There is no runtime.

+1

http://www.adobe.com/devnet/logged_in/abansod_iphone.html

Re:Flash Professional CS5 will build native iPhone and iPod ... by jimboyoungblood on Monday October 05, 2009 @04:31PM (#862708)
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.

Re:Flash Professional CS5 will build native iPhone and iPod ... by maximilian on Monday October 05, 2009 @09:40PM (#863298)
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?

Re:Flash Professional CS5 will build native iPhone and iPod ... by jsolson on Tuesday October 06, 2009 @11:04AM (#864280)
No. 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_msgs...

Re:Flash Professional CS5 will build native iPhone and iPod ... by xal on Monday October 05, 2009 @03:29PM (#862560)
That's some amazing work. Adobe must have dedicated the A-Team to that task.
Re:Flash Professional CS5 will build native iPhone and iPod ... by moe on Monday October 05, 2009 @11:38PM (#863458)
Never 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. ;-)

Re:Flash Professional CS5 will build native iPhone and iPod ... by ed on Tuesday October 06, 2009 @01:10AM (#863567)
I 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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by bonaldi on Monday October 05, 2009 @04:18PM (#862673)
"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.

Re:Flash Professional CS5 will build native iPhone and iPod ... by iron_ball on Monday October 05, 2009 @05:28PM (#862837)
Does that mean you'd like Flash content to run as non-VM-boxed binaries on your PC? Or did I misunderstand what you meant?
Re:Flash Professional CS5 will build native iPhone and iPod ... by bonaldi on Monday October 05, 2009 @05:33PM (#862852)
It 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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by whatusername on Tuesday October 06, 2009 @03:11AM (#863706)
Right -- 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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by stcredzero on Monday October 05, 2009 @04:33PM (#862715)
Thank 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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by johnnybgoode on Monday October 05, 2009 @08:19PM (#863187)
That 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.

Re:Flash Professional CS5 will build native iPhone and iPod ... by robc on Tuesday October 06, 2009 @12:59AM (#863557)
Looking 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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by ed on Tuesday October 06, 2009 @01:22AM (#863587)
They'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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by johnnybgoode on Tuesday October 06, 2009 @02:27AM (#863667)
Thanks 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.
Re:Flash Professional CS5 will build native iPhone and iPod ... by adatta02 on Monday October 05, 2009 @07:19PM (#863064)
so couldn't you then take this and then target AS3 to say native x86 code, bypassing the Flash VM entirely?
Re:Flash Professional CS5 will build native iPhone and iPod ... by ed on Tuesday October 06, 2009 @01:00AM (#863559)
This is essentially what AVM2 does already, only it's JIT rather than AOT.
Re:Flash Professional CS5 will build native iPhone and iPod ... by siong1987 on Monday October 05, 2009 @04:21PM (#862683)
Lol. And, LLVM is mainly sponsored by Apple. Pwnd.