[webkit-qt] webkit2, v8, diplomacy

Simon Hausmann simon.hausmann at nokia.com
Wed Jun 13 01:48:09 PDT 2012


On Tuesday, June 05, 2012 10:35:02 AM ext Keith Kyzivat wrote:
> On 06/05/2012 09:22 AM, ext Balazs Kelemen wrote:
> > On 06/05/2012 03:12 PM, Coda Highland wrote:
> >> I don't understand why the push for V8 in the first place. JSC and V8
> >> are in an arms race for performance, so you can't categorically say V8
> >> is faster because that's not always true.
> > 
> > I did not say it's faster or superior but using two js engines in a
> > stack is insane.
> > 
> >> JSC also has broader support
> >> (see Konstantin's post). Furthermore, my understanding is that V8
> >> doesn't expose the necessary APIs to be able to provide the full scope
> >> of the QtScript API. (Has this changed since the original plans to
> >> move to V8 were announced?)
> > 
> > I don't think v8 lack's any API that JSC has. If we only consider
> > public API, I think v8 is much more rich - maybe I'm wrong. Anyway,
> > declarative - which is really a fundamental of Qt5 - is using v8 and I
> > guess there is a reason for that and it's not desirable to move it to
> > JSC.
> 
> I have been hearing speak of Qt trying something new/moving away from
> using v8 (I think because v8 is not optimized for the quick entry/exit
> that QML does), though I imagine that Qt5 will stil provide opportunity
> to use v8...

The copy of v8 that is provided in Qt is purposely only exposed as private 
API, so the qtjsbackend module is not subject to the same compatibility 
"constraints" as other modules that provide public API. The fact that the copy 
of v8 is in a separate module is merely a "build system convenience" not a 
statement/promise of compatibility. In fact v8 used to be a submodule of 
qtdeclarative, then it become a submodule of qtbase and only then become a 
top-level module.
 
> Isn't there a way we can have v8 and JSC be separate options, with one
> or the other compiled in at compile-time?
> How about separating out the JS engine entirely into a separate shared
> library?
> Granted, there's a maintenance cost for maintaining both engines...

I think that cost exactly is not worth it. We're already spread thinly enough, 
so we should use the one or the other engine, but not end up with both. It we 
were to transition to V8 we _would_ end up with both in a transition period, 
but it should be our goal to terminate the period at a discrete point in time 
:)


Simon


More information about the webkit-qt mailing list