It would really, really awesome (IMHO) to put some extra effort into minimizing bindings divergences. I think there's already some good foundation laid in this regard in the form of Script* classes (look for bindings/(js|v8)/Script* files) . I was once imagining that we could split out code generation into:
a) conversion/instantiation helper functions (these will be different for V8 and JSC) b) the actual bindings, written using Script* stuff and common for both engines. Then we could rewrite (weeeeee!) all of our custom bindings to use Script* as well and live happily ever after. :DG< On Wed, May 27, 2009 at 11:50 AM, David Levin <[email protected]> wrote: > > > On Wed, May 27, 2009 at 11:47 AM, Adam Barth <[email protected]> wrote: >> >> I've been doing some work recently in our JavaScript bindings. As >> part of this work, I've noticed that WebCore/bindings/js and >> WebCore/bindings/v8 have drifted apart in some details. It's kind of >> ridiculous that we have so much duplicated code in these two folders. >> We should try to re-organize our bindings to share as much code as >> possible. >> >> 1) Where should the common code live? One option is to have: >> >> WebCore/bindings/js <--- common code >> WebCore/bindings/jsc <--- JSC specific >> WebCore/bindings/v8 <--- V8 specific >> >> 2) How much should we try to share? For example, we could have an >> abstracted notion of ArgList that works for both engines, or we could >> be happy to factor out common routines like createWindow >> >> <http://trac.webkit.org/browser/trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp#L285>. >> >> I presume Sam is a good contact for the JSC bindings. Who's a good >> contact for the V8 bindings? > > dglazkov > >> >> Thanks, >> Adam >> _______________________________________________ >> webkit-dev mailing list >> [email protected] >> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

