v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
ephemeron-remembered-set.cc
Go to the documentation of this file.
1// Copyright 2023 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
7#include "src/heap/heap-inl.h"
9
10namespace v8::internal {
11
15 int slot_index = EphemeronHashTable::SlotToIndex(table.address(), slot);
16 InternalIndex entry = EphemeronHashTable::IndexToEntry(slot_index);
18 auto it = tables_.insert({table, IndicesSet()});
19 it.first->second.insert(entry.as_int());
20}
21
25 auto it = tables_.find(table);
26 if (it != tables_.end()) {
27 it->second.merge(std::move(indices));
28 } else {
29 tables_.insert({table, std::move(indices)});
30 }
31}
32
33} // namespace v8::internal
void RecordEphemeronKeyWrite(Tagged< EphemeronHashTable > table, Address key_slot)
void RecordEphemeronKeyWrites(Tagged< EphemeronHashTable > table, IndicesSet indices)
static V8_INLINE bool InYoungGeneration(Tagged< Object > object)
constexpr int as_int() const
SlotTraits::THeapObjectSlot HeapObjectSlot
Definition globals.h:1253
#define DCHECK(condition)
Definition logging.h:482