Bug 32455 - [V8] Indexers and named propery getters should be generated
Summary: [V8] Indexers and named propery getters should be generated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dimitri Glazkov (Google)
URL:
Keywords:
Depends on: 32562 32569 32637 32996
Blocks: 32630
  Show dependency treegraph
 
Reported: 2009-12-11 15:37 PST by Dimitri Glazkov (Google)
Modified: 2009-12-30 08:57 PST (History)
2 users (show)

See Also:


Attachments
Generate bindings for trivial indexers. (8.94 KB, patch)
2009-12-11 15:39 PST, Dimitri Glazkov (Google)
no flags Details | Formatted Diff | Diff
Generate bindings for trivial indexers. (9.26 KB, patch)
2009-12-14 13:32 PST, Dimitri Glazkov (Google)
dglazkov: commit-queue-
Details | Formatted Diff | Diff
An example of new generated file. (3.76 KB, text/plain)
2009-12-14 14:11 PST, Dimitri Glazkov (Google)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2009-12-11 15:37:09 PST
V8 bindings for indexers and named property getters could be easily generated, thus avoiding the maintenance burden when adding new IDLs.
Comment 1 Dimitri Glazkov (Google) 2009-12-11 15:39:46 PST
Created attachment 44714 [details]
Generate bindings for trivial indexers.
Comment 2 WebKit Review Bot 2009-12-11 15:41:29 PST
style-queue ran check-webkit-style on attachment 44714 [details] without any errors.
Comment 3 Eric Seidel (no email) 2009-12-11 17:35:20 PST
Comment on attachment 44714 [details]
Generate bindings for trivial indexers.

Looks sane, but could we make the perl more readable?  Like by putting this new code in a well-named sub-routine?
Comment 4 Dimitri Glazkov (Google) 2009-12-11 19:31:18 PST
Sure, sounds good. Most of this should go away anyway, once I switch over to use toV8(...) type resolution a-la JSC-land. This is just a first step :) I am going abarth on these bindings!
Comment 5 Dimitri Glazkov (Google) 2009-12-11 19:32:28 PST
Comment on attachment 44714 [details]
Generate bindings for trivial indexers.

I'll prettify the Perl code and repost.
Comment 6 Dimitri Glazkov (Google) 2009-12-14 13:32:03 PST
Created attachment 44817 [details]
Generate bindings for trivial indexers.
Comment 7 Eric Seidel (no email) 2009-12-14 13:59:13 PST
Comment on attachment 44817 [details]
Generate bindings for trivial indexers.

It would be nice to see an example of the new generated code.  But this looks OK as far as I can tell.  Are you sure we have tests covering index getters for all these?
Comment 8 Dimitri Glazkov (Google) 2009-12-14 14:11:38 PST
Created attachment 44822 [details]
An example of new generated file.

Here's an example of the new generated output. Look for "setCollectionIndexerGetter" added to ConfigureV8CSSRuleListTemplate.

It used to be set in a long case statement inside V8DOMWrapper:getTemplate.
Comment 9 Dimitri Glazkov (Google) 2009-12-14 15:25:26 PST
Landed as http://trac.webkit.org/changeset/52120.
Comment 10 Dimitri Glazkov (Google) 2009-12-15 08:55:36 PST
I am going to use this as a master bug for V8 getter generation.
Comment 11 Eric Seidel (no email) 2009-12-28 23:37:53 PST
Comment on attachment 44817 [details]
Generate bindings for trivial indexers.

Clearing my r+ on this obsolete patch.
Comment 12 Dimitri Glazkov (Google) 2009-12-30 08:57:29 PST
All hand-coded configuring indexer or named property handling is gone.