4 ms·
Hopefully they will allow you to ship a browser that contains a JIT. Apple doesn't currently allow that, so most browsers perform pretty much the same on iOS.
by nobodysfool 12y ago
Hopefully they will allow you to ship a browser that contains a JIT. Apple doesn't currently allow that, so most browsers perform pretty much the same on iOS.
- JohnTHaller 12y agoApple doesn't allow you to ship a browser with its own JS engine full stop, let alone JIT. So every browser on iOS is just a fancy UI over the hobbled Safari engine with no Nitro. So there's Safari on iOS which is full speed, and then every other browser on iOS which is hobbled speed. This is by design and unlikely to change.
- e15ctr0n 12y agoThis is the very reason why Mozilla refuses to release a Firefox version for iOS[1]. Mozilla would like to ship Firefox with its own rendering engine, Gecko, while Apple policy dictates that all browsers on iOS are required to use WebKit[2]. [1] http://www.cnet.com/news/mozilla-says-no-plans-to-return-to-ios/ http://www.cnet.com/news/mozilla-says-no-plans-to-return-to-... [2] http://thenextweb.com/apple/2013/04/04/will-chrome-for-ios-be-able-to-use-googles-new-browser-rendering-engine-blink/ http://thenextweb.com/apple/2013/04/04/will-chrome-for-ios-b...
- anon1385 12y agoDoesn't that apply to FirefoxOS as well? You can't write a JIT in Javascript. So for example Google wouldn't be able to port Chrome with V8 to FirefoxOS, as far as I know.
- e15ctr0n 12y agoFirefox OS apps are written in HTML5, Javascript and CSS for which there is full-blown support by the rendering engine and the Javascript engine.
- comex 12y agoThat doesn't actually rebut the point. After all, Firefox OS's browser doesn't include a HTML renderer and JavaScript engine written in JavaScript; it outsources this functionality to a sandboxed mode of the underlying C++ engine. If you want to use a different engine, it has to be written in JavaScript, which is of course completely impractical for performance reasons.
- jgon 12y agoFirefox OS takes the view that the system you are writing to is the browser. It is the OS you are running. From that world-view, writing a JIT would mean writing a compiler that outputs asm.js and then executing that outputted code. So if Google modified V8 to have different backend they could definitely run it on Firefox OS. This would be the same process they would need to do to port it to another system, ie modify the JIT to output different types of machine instructions to execute. It just so happens that in this case the machine the instructions are for is the Javascript VM. Apple's case, if I understand, is different, because you cannot generate code at runtime and hence you cannot compile something "just in time". Nothing about Firefox OS disallows this, and so the two situations are not comparable
- Someone 12y agoAFAIK, iOS JavaScript has eval(), so you are free to run Firefox on iOS in the browser in the same way you can run Chrome on Firefox OS or Linux on iOS (http://bellard.org/jslinux/ http://bellard.org/jslinux/ boots in 10.4 seconds on my iPad).
- jgon 12y agoWell it's not really the same. Firefox OS is literally the OS. Demanding that Chrome be allowed to run their C++ code would be like demanding that Google makes it so that Firefox OS can be installed on Android phones, replacing the Android system. They don't do that, instead they offer up to developers the same facilities to write their apps that they reserve for their own apps. GMail for Android is written using the same language and APIs that you can use for your own application. Firefox OS is providing the same thing. They don't allow you to just replace the OS, which in this case is the browser, but all applications, including their own are written with the same APIs available to you the developer. They aren't writing some of their own apps in C++ and then demanding everyone else write in Javascript. Apple is writing their own JIT and then demanding that everyone else interpret, which is not at all equivalent. The difference here is that the browser is the OS. So the OS is at a certain level which you cannot replace or step into willy nilly. Think of it like Windows enforcing Hardware access through its drivers, not allowing you to just send whatever you want to someone's disk drive and possibly do damage to the device. In the same way, they enforce a level of Memory protection through the runtime, and after that they are on the same footing as you. We accept these constraints when we run OSs all the time, and I don't see it as being much different here.
- JohnTHaller 12y agoNo, it doesn't. Unlike iOS, which is a full operating system, Firefox OS is basically a web browser. The apps are all web-based apps. Firefox isn't just one app of many that runs on the OS (as Safari is on iOS), Firefox IS the OS and all the apps running on it are Javascript/HTML/CSS. So, while Google could probably build Chrome out of Javascript and run it atop the Firefox OS engine, it wouldn't make sense to do so. Asking if you can is basically like asking if you can create Chrome as a Firefox extension on Windows. Sure, you probably could with enough effort, but it would be a bit pointless in terms of functionality, speed, practicality, etc. Additionally, this is a bit of a straw man that Apple fans trot out when people accuse Apple of being anti-competitive with iOS. It's not an equivalent situation. An equivalent situation would be if Google forbid other browser engines from running on Android. But, they don't. So, we have a nice competitive browser ecosystem on Android with solid browsers like Firefox that I use every day.