Bug 32569 - [V8] Switch all indexers to be generated.
Summary: [V8] Switch all indexers to be generated.
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)
Depends on: 32616 33031
Blocks: 32455
  Show dependency treegraph
Reported: 2009-12-15 12:08 PST by Dimitri Glazkov (Google)
Modified: 2009-12-30 08:56 PST (History)
3 users (show)

See Also:

Remove moar indexers. (9.64 KB, patch)
2009-12-16 11:10 PST, Dimitri Glazkov (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2009-12-15 12:08:22 PST
Another brick in the wall. Not sure if it's the wall. More like a pillow. But pillows don't have bricks. If they did, they'd be very uncomfortable. But then again, V8 bindings are pretty uncomfortable.
Comment 1 Dimitri Glazkov (Google) 2009-12-16 11:10:20 PST
Created attachment 44997 [details]
Remove moar indexers.
Comment 2 WebKit Review Bot 2009-12-16 11:10:50 PST
style-queue ran check-webkit-style on attachment 44997 [details] without any errors.
Comment 3 Adam Barth 2009-12-16 12:04:03 PST
Comment on attachment 44997 [details]
Remove moar indexers.

I can hardly resist a patch of all minus lines that doesn't break any tests!
Comment 4 Dimitri Glazkov (Google) 2009-12-16 12:16:01 PST
"Remove moar indexers" patch landed as http://trac.webkit.org/changeset/52213.

This still leaves 6 indexers hand-set, but we'll have to come back to this from a different angle. Leaving the bug open for that reason.
Comment 5 Adam Barth 2009-12-16 13:08:06 PST
Comment on attachment 44997 [details]
Remove moar indexers.

I'd prefer to use one patch per bug, but if you're going to keep this bug open, you need to clear the flags so this patch won't show up as needing to be committed.
Comment 6 Dimitri Glazkov (Google) 2009-12-16 13:11:53 PST
I'll use this a master bug to keep my sanity intact. No new patches will go here.
Comment 7 Dimitri Glazkov (Google) 2009-12-16 13:20:01 PST
// getter: needs to know its parent has a getter
// setter: easy
descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection), USE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection));

// getter: easy
// setter: easy
// enumerator: ??
descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(HTMLSelectElement), USE_INDEXED_PROPERTY_SETTER(HTMLSelectElement), 0, 0, nodeCollectionIndexedPropertyEnumerator<HTMLSelectElement>, v8::Integer::New(V8ClassIndex::NODE));

// will have to stay custom
descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(HTMLPlugInElement), USE_INDEXED_PROPERTY_SETTER(HTMLPlugInElement));

// getter: easy
// enumerator: ??
instanceTemplate->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(NamedNodeMap), 0, 0, 0, collectionIndexedPropertyEnumerator<NamedNodeMap>, v8::Integer::New(V8ClassIndex::NODE));

// getter: no indication? must assume if has setItem, must have item?
// setter: setItem -> HasCustomIndexSetter
descriptor->InstanceTemplate()->SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(Storage), USE_INDEXED_PROPERTY_SETTER(Storage), 0, USE_INDEXED_PROPERTY_DELETER(Storage));

// stays custom
Comment 8 Dimitri Glazkov (Google) 2009-12-30 08:56:57 PST
It is done.