NEW 145669
Stop using static tables for auto-generated DOM interfaces
https://bugs.webkit.org/show_bug.cgi?id=145669
Summary Stop using static tables for auto-generated DOM interfaces
Geoffrey Garen
Reported 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.
Attachments
Geoffrey Garen
Comment 1 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.
Sam Weinig
Comment 2 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!
Note You need to log in before you can comment on or make changes to this bug.