Bug 145669
| Summary: | Stop using static tables for auto-generated DOM interfaces | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | beidson, sam |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Geoffrey Garen
All DOM interfaces generate compile-time HashTables of their properties. We used to use these HashTables instead of runtime data structures, but we don't anymore. Now, we always call reifyStaticProperties to turn a HashTable into a Structure on demand.
Instead of a HashTable, we should auto generate code to create a Structure, and we should eliminate the auto generated HashTables.
Benefits:
(1) We can more reliably disable DOM features at runtime;
(2) Less boilerplate to read through, translating one (useless) format to another.
(3) Shorter compile times, since we don't need to compute all the hash tables.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Geoffrey Garen
Another benefit: Alexey S shared anecdotal feedback that some workflows do a lot of costly reifyStaticProperties() work, which might be reduced if we reify each property individually on access, using a cacheable dictionary approach.
Sam Weinig
I wish I could plus one a bug! Probably still worth having some static constant table that can be used for the individual accesses in a general way to avoid on code size increasing, but those are just details. Time to get rid of the HashTable!