[Development] V8 on iOS

Thiago Macieira thiago.macieira at intel.com
Mon Apr 2 16:25:04 CEST 2012


On segunda-feira, 2 de abril de 2012 16.17.35, Ian wrote:
> Hmmm, so from what I understand, there may be a bytecode backend for V8 at
> some point (for platforms like MIPS for example), but that work hasn't

MIPS has opted instead to write an assembler backend.

The effort would have to be for yet other platforms, like SPARC or PowerPC.

Or, if someone finally decides that writing assembly directly is a bad idea 
since you have nothing to compare against.

> begun in any way other than "maybe some time in the future", and even if it
> was decided to implement that, it's quite some time off.
> 
> AFAIK Apple blocks what they find out about, and lets the rest pass until
> someone complains or something bad happens. The big problems here are using
> private APIs (they do static analysis, so there are ways around that), and
> altering the application's provision (if they notice they will probably
> block on that regardless of how it's been changed). They don't appear to
> analyse the app at runtime, so I'm not sure how they would know about a 3rd
> party JIT ( apart from the provisioning). I'm not sure which actual JIT
> they use for their own stuff, but I'm pretty sure it's not available
> outside of their webkit implementation.

If a JIT works on bytecode, that's ok. The bytecode doesn't need to be 
interpreted.

A JIT producing machine instructions would either need to be emulated (which 
V8 can do), or make the memory writable and use mprotect for that.

> Guess the next step will be getting V8 to run at all on iOS (and finding a
> way of testing it without a platform plugin)...

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120402/497b58e3/attachment.sig>


More information about the Development mailing list