Linked by Thom Holwerda on Mon 1st Mar 2010 21:56 UTC
Mozilla & Gecko clones "Mozilla, faced with new competitive pressures, has begun work on three separate, significant changes to Firefox. First is a new JavaScript engine that - with a transfusion from the project behind Apple's Safari - should run Web-based programs at least 30 percent faster. Second is a new graphics engine for Windows that will take advantage of hardware acceleration for graphics and text. And third is a programming tool to help bring to fruition a new system for Firefox add-ons."
Thread beginning with comment 411639
To read all comments associated with this story, please click here.
JS engines
by vivainio on Mon 1st Mar 2010 22:14 UTC
vivainio
Member since:
2008-12-26

Anyone ever wondered why Firefox couldn't just use V8 (from Chrome) or JavascriptCore? Is it because those engines are lagging in Javascript revision they support?

It seems here they are again going with a solution of their own, that doesn't seem to match the new webkit based browsers...

Reply Score: 2

RE: JS engines
by ba1l on Tue 2nd Mar 2010 03:02 in reply to "JS engines"
ba1l Member since:
2007-09-08

Anyone ever wondered why Firefox couldn't just use V8 (from Chrome) or JavascriptCore? Is it because those engines are lagging in Javascript revision they support?


Several reasons.

The most obvious is that you can't just rip code out of one codebase and stick it into a completely different codebase, just because it looks kind of similar. Maybe they have different platform support requirements, different compiler support requirements, or maybe the two are just completely different, and would require enormous changes to Firefox to swap the engines out.

JavaScript is an integral part of Firefox as a whole, rather than just being used for web site scripting. The entire UI is controlled by JavaScript code. It's part of the configuration system. It's a core part of the extension mechanism.

Since neither V8 nor JavaScriptCore support every feature of Mozilla's JavaScript implementation (it's a superset of the ECMA standard version), and since Firefox and extensions make use of those features, it's not possible to switch to a different JavaScript engine without breaking things. The Firefox developers could fix their own code, but they can't fix everyone else's extensions for them.

Mozilla's JavaScript engine is also used in other software. Until very recently, it was the only real choice for embedding a JavaScript interpreter in something, unless you wanted to use JScript (ugh) and be tied to Windows. Then there's all the software based on XulRunner. Mozilla couldn't just stop development on SpiderMonkey (or Rhino, for that matter), because that'd leave all those other developers stuck.

Having multiple competing implementations is also a good thing. Why is it OK for Google to write their own JavaScript interpreter, but not OK for Mozilla to continue improving theirs? It it just because V8 is currently faster?

It's not like Mozilla are lagging behind or anything. They're improving performance at a rate comparable to JavaScriptCore and V8, and it's not like they have the slowest JavaScript engine around, so they aren't preventing developers from doing cool things with JavaScript. IE's JScript engine is doing that.

Reply Parent Score: 9

RE: JS engines
by MamiyaOtaru on Tue 2nd Mar 2010 11:08 in reply to "JS engines"
MamiyaOtaru Member since:
2005-11-11

"We decided to import the assembler from Apple's open-source Nitro JavaScript JIT [just-in-time compiler]"

were you reading the same article I was? Were you reading an article at all?

Reply Parent Score: 1

RE[2]: JS engines
by vivainio on Tue 2nd Mar 2010 11:15 in reply to "RE: JS engines"
vivainio Member since:
2008-12-26

"We decided to import the assembler from Apple's open-source Nitro JavaScript JIT [just-in-time compiler]"

were you reading the same article I was? Were you reading an article at all?


Did you understand the article you just read? Or even that single sentence you quoted?

Reply Parent Score: 1