Hi all,
We're making a change in Supplementable<T> (and Supplement<T>) to remove it;
we already changed it from a hash table to a simple array underneath,
with good size gains (and a small Speedometer3 gain from the single hottest
member).
For members where there is no layering violation, we'll simply
forward-declare the class in the .h file and have a Member<>,
along with a getter and setter.
For members where we cannot do that (e.g. Document, in, core/document.h,
wants to have a Member<RTCPeerConnectionController>, which is defined
in modules/peerconnection/rtc_peer_connection_controller.h, and core/
cannot #include anything from modules/) we'll instead use the new
ForwardDeclaredMember<> which has almost the same ergonomics but
under-the-hood Trace()s via a vtable pointer like Supplement<> does today.
There's going to be a bunch of new getters and setters (and Members)
showing up, but they already existed through template magic; they are
just becoming visible now and given names and types (as opposed to being
string-keyed, which risks type confusion). We expect a tiny further
decrease in binary size and no significant change in compilation time.
Example CL:
https://chromium-review.googlesource.com/c/chromium/src/+/7137540
/* Steinar */
--
Homepage:
https://www.sesse.net/