Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is JavaScriptCore framework on iOS 7 using JIT compilation?

Based on some googling it seems like JavaScript on ios is JIT compiled sometimes and sometimes not. How about the JavaScriptCore framework that got added in ios 7? Will I get JIT compilation if I use that in my app?

like image 860
user408952 Avatar asked Mar 09 '14 10:03

user408952


1 Answers

No, JavaScriptCore on iOS 7+ won't be able to JIT compile for you, because iOS disallows mapping writable/executable pages of memory as a hard rule, and that's a requirement for JIT. Only MobileSafari.app, Web.app and a handful of other system apps carry an entitlement that allows them to JIT compile. The new WKWebView in iOS 8 is rendered in a separate process that is allowed to JIT compile, so JavaScript in a WKWebView is faster than a UIWebView or plain JSContext.

like image 64
Tayschrenn Avatar answered Sep 28 '22 09:09

Tayschrenn