Bug 26567

Summary: [V8] Upstream V8 bindings code generator.
Product: WebKit Reporter: Dimitri Glazkov (Google) <dglazkov>
Component: WebCore Misc.Assignee: Dimitri Glazkov (Google) <dglazkov>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Upstream V8 code generator, v1.
sam: review-
Upstream V8 code generator, v2.
none
Upstream V8 code generator, v2.1. sam: review+

Description Dimitri Glazkov (Google) 2009-06-19 19:42:11 PDT
Whoop, there it is.

Basically, I haven't gone making any style changes to CodeGeneratorV8.pm, trying to land this as-is for now. It's very hard to make changes on both sides of the stream.

I added ParseParents method (and $parentsOnly param) to existing code, which is not used by JSC. In V8, it is used to find out whether the interface inherits from Node, which is a long story ...

Please don't hurt me. I don't want to do any more Perl. Ever again.

Actually, I have lots of work slated in Perl, trying to shave some hair off this beast and bring it as close to JSC bindings generator as possible.
Comment 1 Dimitri Glazkov (Google) 2009-06-19 19:44:10 PDT
Created attachment 31586 [details]
Upstream V8 code generator, v1.

 WebCore/ChangeLog                           |   13 +
 WebCore/bindings/scripts/CodeGenerator.pm   |   31 +
 WebCore/bindings/scripts/CodeGeneratorV8.pm | 2206 +++++++++++++++++++++++++++
 WebCore/bindings/scripts/IDLParser.pm       |    4 +
 4 files changed, 2254 insertions(+), 0 deletions(-)
Comment 2 Sam Weinig 2009-06-19 22:33:39 PDT
Comment on attachment 31586 [details]
Upstream V8 code generator, v1.

r-.  There a couple of style issues that need to be taken care of such as 2 space indentation instead of 4 and commented out code.  I would also like an explanation as to why the parent traversal stuff is necessary for v8 and not JSC.
Comment 3 Eric Seidel (no email) 2009-06-20 01:06:44 PDT
Yay!  Finally! :)
Comment 4 Sam Weinig 2009-06-20 14:12:04 PDT
It would also be useful to have a rundown of all the v8 specific extended attributes and why they are necessary and where they create divergence from the JSC bindings.
Comment 5 Dimitri Glazkov (Google) 2009-06-20 19:46:41 PDT
(In reply to comment #4)
> It would also be useful to have a rundown of all the v8 specific extended
> attributes and why they are necessary and where they create divergence from the
> JSC bindings.

Will do that and reconcile them. I suspect V8 bindings do some unholy things using attributes not for purposes intended. At this point, I know that [Replaceable] is used that way, but not much else. Is that ok if this patch doesn't include this documentation? I'll put a FIXME and start a bug on that?
Comment 6 Dimitri Glazkov (Google) 2009-06-22 14:21:47 PDT
Created attachment 31672 [details]
Upstream V8 code generator, v2.

 WebCore/ChangeLog                           |   16 +
 WebCore/bindings/scripts/CodeGenerator.pm   |   35 +
 WebCore/bindings/scripts/CodeGeneratorV8.pm | 2192 +++++++++++++++++++++++++++
 WebCore/bindings/scripts/IDLParser.pm       |    4 +
 4 files changed, 2247 insertions(+), 0 deletions(-)
Comment 7 Dimitri Glazkov (Google) 2009-06-22 14:26:12 PDT
Created attachment 31674 [details]
Upstream V8 code generator, v2.1.

 WebCore/ChangeLog                           |   16 +
 WebCore/bindings/scripts/CodeGenerator.pm   |   35 +
 WebCore/bindings/scripts/CodeGeneratorV8.pm | 2189 +++++++++++++++++++++++++++
 WebCore/bindings/scripts/IDLParser.pm       |    4 +
 4 files changed, 2244 insertions(+), 0 deletions(-)
Comment 8 Dimitri Glazkov (Google) 2009-06-22 14:26:45 PDT
Styling issues addressed, comment about ParseParents added.
Comment 9 Sam Weinig 2009-06-22 17:36:02 PDT
Comment on attachment 31674 [details]
Upstream V8 code generator, v2.1.

r=me
Comment 10 Dimitri Glazkov (Google) 2009-06-22 21:36:42 PDT
Landed as http://trac.webkit.org/changeset/44972.