On Thu Apr 10 13:05:15 2025 +0000, Jacek Caban wrote:
Given that it's not always about prototypes, I'm not sure we want to rename it to `prototype_id`. What are the cases that still don't have id? You introduce ids for constructors later in the series, so we could just as well use them. Other than that there is the location object, is there anything else? I wonder if we can just ensure that every relevant object has an id instead.
I don't think location object should be an issue, since it's always initialized with COMPAT_MODE_QUIRKS (as it's tied to outer window, it's never a jsdisp), and this code path is only for IE9+ jsdisps. But I thought id was used to lookup the (cached) prototype? (in `get_prototype` from `ensure_real_info`)
In this case, constructors (those of `constructor_dispex`) don't have an `id` field. e.g. window.HTMLElement constructor has no id, but a HTMLElement object does. Even if we separate the constructors each to have their own dispex and id, `ensure_real_info` would cache it wrong, no?