5 ms·
This is a much bigger deal then people are giving credit for, because of the other thing that Apple uses LLVM for. It's the primary compiler for Objective-C, an
by InTheArena 12y ago
This is a much bigger deal then people are giving credit for, because of the other thing that Apple uses LLVM for. It's the primary compiler for Objective-C, and thus Cocoa (mac apps) and CocoaTouch (ios apps) as well. If apple has Javascript compiling on-the-fly at this speed, this also means that it would be pretty trivial to expose the objective-c runtime to javascript, and mix and match C & Javascript code.
This is going to be a very very big deal.
- overcyn 12y agoYou've been able to do that for awhile. http://opensource.apple.com/source/JavaScriptCore/JavaScriptCore-7537.65/API/JSValue.h http://opensource.apple.com/source/JavaScriptCore/JavaScript...
- alayne 12y agoYou can't get the JSContext of a UIWebView though, which is a big hole.
- tehno 12y agoYes you can on iOS7: http://stackoverflow.com/questions/19664206/access-the-javascriptcore-engine-of-a-uiwebview http://stackoverflow.com/questions/19664206/access-the-javas...
- alayne 12y agoI know, but that isn't a realistic option since it's not a public API and therefore not something you should use in a production application.
- suyash 12y agoYes, this is a private api - meaning not officially public so can't use it in production. I would love to have the new FTL JIT engine supported officially for the webview JS execution. It would bring UIWebView on iOS7 up to par with Android WebView on Android 4.4
- hsivonen 12y agoI doubt "it would be pretty trivial". The problems are probably in cross-language object life times and memory management--not in whether both generate machine instructions using LLVM machinery.