5#ifndef V8_HEAP_PRETENURING_HANDLER_INL_H_
6#define V8_HEAP_PRETENURING_HANDLER_INL_H_
26 &
heap->pretenuring_handler()->global_pretenuring_feedback_);
41 if (memento_candidate.
is_null()) {
44 DCHECK(IsJSObjectMap(map));
49 Address key = memento_candidate->GetAllocationSiteUnchecked();
54template <PretenuringHandler::FindMementoMode mode>
58 object->SizeFromMap(map));
62template <PretenuringHandler::FindMementoMode mode>
69 object_size == object->SizeFromMap(map));
73 object_size >= object->SizeFromMap(map));
74 Address object_address =
object.address();
94 ObjectSlot candidate_map_slot = candidate->map_slot();
108 heap->semi_space_new_space()->IsAddressBelowAgeMark(object_address)) {
120 return memento_candidate;
122 if (memento_candidate.
is_null())
return {};
126 top =
heap->NewSpaceTop();
127 DCHECK(memento_address >=
heap->NewSpaceLimit() ||
131 if ((memento_address != top) && memento_candidate->IsValid()) {
132 return memento_candidate;
static bool CanTrack(InstanceType type)
bool Relaxed_ContainsMapValue(Address raw_value) const
static V8_INLINE bool InYoungGeneration(Tagged< Object > object)
static Tagged< HeapObject > FromAddress(Address address)
V8_INLINE bool IsFlagSet(Flag flag) const
V8_INLINE MemoryChunkMetadata * Metadata()
static V8_INLINE MemoryChunk * FromAddress(Address addr)
static V8_INLINE MemoryChunk * FromHeapObject(Tagged< HeapObject > object)
bool SweepingDone() const
static PageMetadata * cast(MemoryChunkMetadata *metadata)
static bool OnSamePage(Address address1, Address address2)
std::unordered_map< Tagged< AllocationSite >, size_t, Object::Hasher > PretenuringFeedbackMap
static Tagged< AllocationMemento > FindAllocationMemento(Heap *heap, Tagged< Map > map, Tagged< HeapObject > object)
static void UpdateAllocationSite(Heap *heap, Tagged< Map > map, Tagged< HeapObject > object, int object_size, PretenuringFeedbackMap *pretenuring_feedback)
V8_INLINE constexpr bool is_null() const
#define ALIGN_TO_ALLOCATION_ALIGNMENT(value)
#define MSAN_MEMORY_IS_INITIALIZED(start, size)
constexpr int kTaggedSize
Handle< To > UncheckedCast(Handle< From > value)
V8_EXPORT_PRIVATE FlagValues v8_flags
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define V8_UNLIKELY(condition)