5 #ifndef V8_SNAPSHOT_ROOTS_SERIALIZER_H_ 6 #define V8_SNAPSHOT_ROOTS_SERIALIZER_H_ 10 #include "src/snapshot/serializer.h" 11 #include "src/visitors.h" 19 enum class RootIndex : uint16_t;
29 bool can_be_rehashed()
const {
return can_be_rehashed_; }
30 bool root_has_been_serialized(RootIndex root_index)
const {
31 return root_has_been_serialized_.test(static_cast<size_t>(root_index));
34 bool IsRootAndHasBeenSerialized(
HeapObject* obj)
const {
36 return root_index_map()->Lookup(obj, &root_index) &&
37 root_has_been_serialized(root_index);
44 int SerializeInObjectCache(
HeapObject*
object);
47 void VisitRootPointers(Root root,
const char* description,
ObjectSlot start,
49 void Synchronize(VisitorSynchronization::SyncTag tag)
override;
51 const RootIndex first_root_to_be_serialized_;
52 std::bitset<RootsTable::kEntriesCount> root_has_been_serialized_;
56 bool can_be_rehashed_;
64 #endif // V8_SNAPSHOT_ROOTS_SERIALIZER_H_