-
Jakob Gruber authored
Prior to this CL, Refs were defined through four lists: HEAP_BROKER_SERIALIZED_OBJECT_LIST HEAP_BROKER_POSSIBLY_BACKGROUND_SERIALIZED_OBJECT_LIST HEAP_BROKER_BACKGROUND_SERIALIZED_OBJECT_LIST HEAP_BROKER_NEVER_SERIALIZED_OBJECT_LIST Due to the way FooData objects are constructed (a long if-else chain generated from these lists), the order of entries within the lists and also between lists was important. In particular, subtypes had to appear before all their supertypes. Within one list this was doable, but with the split into 4 different lists this invariant cannot hold in practice. This CL refactors the four lists back into a single list to make observing the invariant possible with upcoming changes. The new unified list contains the RefSerializationKind as a second argument. Related changes are not very interesting, except for TryGetOrCreateData which now uses a set of templated functor objects for setup (this was necessary to handle different FooData constructor signatures). Bug: v8:7790 Change-Id: Ia4c030c767830be4253cf41e3aaf67454f1cbef6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843351 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Auto-Submit: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#74171}
10ca48ff