Bug 145669 - Stop using static tables for auto-generated DOM interfaces
Summary: Stop using static tables for auto-generated DOM interfaces
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 16:12 PDT by Geoffrey Garen
Modified: 2021-11-15 09:05 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2015-06-04 16:12:39 PDT
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.
Comment 1 Geoffrey Garen 2021-10-13 15:26:05 PDT
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.
Comment 2 Sam Weinig 2021-11-15 09:05:30 PST
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!