v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::AllocationSite Class Reference

#include <allocation-site.h>

Inheritance diagram for v8::internal::AllocationSite:
Collaboration diagram for v8::internal::AllocationSite:

Classes

class  BodyDescriptor
 

Public Types

enum  PretenureDecision {
  kUndecided = 0 , kDontTenure = 1 , kMaybeTenure = 2 , kTenure = 3 ,
  kZombie = 4 , kLastPretenureDecisionValue = kZombie
}
 
using ElementsKindBits = base::BitField<ElementsKind, 0, 6>
 
using DoNotInlineBit = base::BitField<bool, 6, 1>
 
using MementoFoundCountBits = base::BitField<int, 0, 26>
 
using PretenureDecisionBits = base::BitField<PretenureDecision, 26, 3>
 
using DeoptDependentCodeBit = base::BitField<bool, 29, 1>
 

Public Member Functions

const char * PretenureDecisionName (PretenureDecision decision)
 
Tagged< UnionOf< Smi, JSObject > > transition_info_or_boilerplate () const
 
Tagged< JSObjectboilerplate () const
 
Tagged< JSObjectboilerplate (AcquireLoadTag tag) const
 
void set_boilerplate (Tagged< JSObject > value, ReleaseStoreTag, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
int transition_info () const
 
void set_transition_info (int value)
 
Tagged< UnionOf< Smi, AllocationSite > > nested_site () const
 
void set_nested_site (Tagged< UnionOf< Smi, AllocationSite > > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
int32_t pretenure_data (RelaxedLoadTag) const
 
void set_pretenure_data (int32_t value, RelaxedStoreTag)
 
int32_t pretenure_create_count () const
 
void set_pretenure_create_count (int32_t value)
 
Tagged< DependentCodedependent_code () const
 
void set_dependent_code (Tagged< DependentCode > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void Initialize ()
 
bool HasWeakNext () const
 
bool IsNested ()
 
int IncrementMementoFoundCount (int increment=1)
 
void IncrementMementoCreateCount ()
 
AllocationType GetAllocationType () const
 
void ResetPretenureDecision ()
 
PretenureDecision pretenure_decision () const
 
void set_pretenure_decision (PretenureDecision decision)
 
bool deopt_dependent_code () const
 
void set_deopt_dependent_code (bool deopt)
 
int memento_found_count () const
 
void set_memento_found_count (int count)
 
int memento_create_count () const
 
void set_memento_create_count (int count)
 
bool IsZombie () const
 
bool IsMaybeTenure () const
 
void MarkZombie ()
 
bool MakePretenureDecision (PretenureDecision current_decision, double ratio, bool maximum_size_scavenge)
 
bool DigestPretenuringFeedback (bool maximum_size_scavenge)
 
ElementsKind GetElementsKind () const
 
void SetElementsKind (ElementsKind kind)
 
bool CanInlineCall () const
 
void SetDoNotInlineCall ()
 
bool PointsToLiteral () const
 
- Public Member Functions inherited from v8::internal::HeapObjectLayout
 HeapObjectLayout ()=delete
 
Tagged< Mapmap () const
 
Tagged< Mapmap (AcquireLoadTag) const
 
MapWord map_word (RelaxedLoadTag) const
 
void set_map (Isolate *isolate, Tagged< Map > value)
 
template<typename IsolateT >
void set_map (IsolateT *isolate, Tagged< Map > value, ReleaseStoreTag)
 
template<typename IsolateT >
void set_map_safe_transition (IsolateT *isolate, Tagged< Map > value, ReleaseStoreTag)
 
void set_map_safe_transition_no_write_barrier (Isolate *isolate, Tagged< Map > value, RelaxedStoreTag=kRelaxedStore)
 
template<typename IsolateT >
void set_map_after_allocation (IsolateT *isolate, Tagged< Map > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void set_map_no_write_barrier (Isolate *isolate, Tagged< Map > value, RelaxedStoreTag=kRelaxedStore)
 
void set_map_word_forwarded (Tagged< HeapObject > target_object, ReleaseStoreTag)
 
void set_map_word_forwarded (Tagged< HeapObject > target_object, RelaxedStoreTag)
 
Address ptr () const
 
Address address () const
 
ReadOnlyRoots EarlyGetReadOnlyRoots () const
 
int Size () const
 
V8_EXPORT_PRIVATE int SizeFromMap (Tagged< Map > map) const
 
WriteBarrierMode GetWriteBarrierMode (const DisallowGarbageCollection &promise)
 

Static Public Member Functions

template<AllocationSiteUpdateMode update_or_check = AllocationSiteUpdateMode::kUpdate>
static bool DigestTransitionFeedback (DirectHandle< AllocationSite > site, ElementsKind to_kind)
 
static bool ShouldTrack (ElementsKind boilerplate_elements_kind)
 
static bool ShouldTrack (ElementsKind from, ElementsKind to)
 
static bool CanTrack (InstanceType type)
 

Static Public Attributes

static NEVER_READ_ONLY_SPACE const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024
 

Private Member Functions

bool PretenuringDecisionMade () const
 

Private Attributes

TaggedMember< UnionOf< Smi, JSObject > > transition_info_or_boilerplate_
 
TaggedMember< UnionOf< Smi, AllocationSite > > nested_site_
 
TaggedMember< DependentCodedependent_code_
 
std::atomic< int32_t > pretenure_data_
 
int32_t pretenure_create_count_
 

Friends

class CodeStubAssembler
 
class ArrayBuiltinsAssembler
 
class ObjectBuiltinsAssembler
 
class V8HeapExplorer
 

Detailed Description

Definition at line 23 of file allocation-site.h.

Member Typedef Documentation

◆ DeoptDependentCodeBit

◆ DoNotInlineBit

◆ ElementsKindBits

◆ MementoFoundCountBits

◆ PretenureDecisionBits

Member Enumeration Documentation

◆ PretenureDecision

Enumerator
kUndecided 
kDontTenure 
kMaybeTenure 
kTenure 
kZombie 
kLastPretenureDecisionValue 

Definition at line 29 of file allocation-site.h.

Member Function Documentation

◆ boilerplate() [1/2]

Tagged< JSObject > v8::internal::AllocationSite::boilerplate ( ) const
inline

Definition at line 65 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ boilerplate() [2/2]

Tagged< JSObject > v8::internal::AllocationSite::boilerplate ( AcquireLoadTag tag) const
inline

Definition at line 70 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ CanInlineCall()

bool v8::internal::AllocationSite::CanInlineCall ( ) const
inline

Definition at line 132 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ CanTrack()

bool v8::internal::AllocationSite::CanTrack ( InstanceType type)
inlinestatic

Definition at line 154 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ deopt_dependent_code()

bool v8::internal::AllocationSite::deopt_dependent_code ( ) const
inline

Definition at line 175 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ dependent_code()

Tagged< DependentCode > v8::internal::AllocationSite::dependent_code ( ) const
inline

Definition at line 43 of file allocation-site-inl.h.

◆ DigestPretenuringFeedback()

bool v8::internal::AllocationSite::DigestPretenuringFeedback ( bool maximum_size_scavenge)
inline

◆ DigestTransitionFeedback()

template<AllocationSiteUpdateMode update_or_check>
bool v8::internal::AllocationSite::DigestTransitionFeedback ( DirectHandle< AllocationSite > site,
ElementsKind to_kind )
static

Definition at line 251 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAllocationType()

AllocationType v8::internal::AllocationSite::GetAllocationType ( ) const

Definition at line 4906 of file objects.cc.

◆ GetElementsKind()

ElementsKind v8::internal::AllocationSite::GetElementsKind ( ) const
inline

Definition at line 124 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ HasWeakNext()

bool v8::internal::AllocationSite::HasWeakNext ( ) const
inline

Definition at line 92 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ IncrementMementoCreateCount()

void v8::internal::AllocationSite::IncrementMementoCreateCount ( )
inline

Definition at line 217 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ IncrementMementoFoundCount()

int v8::internal::AllocationSite::IncrementMementoFoundCount ( int increment = 1)
inline

Definition at line 209 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ Initialize()

void v8::internal::AllocationSite::Initialize ( )
inline

Definition at line 96 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsMaybeTenure()

bool v8::internal::AllocationSite::IsMaybeTenure ( ) const
inline

Definition at line 110 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ IsNested()

bool v8::internal::AllocationSite::IsNested ( )

Definition at line 4912 of file objects.cc.

Here is the call graph for this function:

◆ IsZombie()

bool v8::internal::AllocationSite::IsZombie ( ) const
inline

Definition at line 106 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakePretenureDecision()

bool v8::internal::AllocationSite::MakePretenureDecision ( PretenureDecision current_decision,
double ratio,
bool maximum_size_scavenge )
inline

◆ MarkZombie()

void v8::internal::AllocationSite::MarkZombie ( )
inline

Definition at line 118 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ memento_create_count()

int v8::internal::AllocationSite::memento_create_count ( ) const
inline

Definition at line 201 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memento_found_count()

int v8::internal::AllocationSite::memento_found_count ( ) const
inline

Definition at line 185 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nested_site()

Tagged< UnionOf< Smi, AllocationSite > > v8::internal::AllocationSite::nested_site ( ) const
inline

Definition at line 34 of file allocation-site-inl.h.

◆ PointsToLiteral()

bool v8::internal::AllocationSite::PointsToLiteral ( ) const
inline

Definition at line 140 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pretenure_create_count()

int32_t v8::internal::AllocationSite::pretenure_create_count ( ) const
inline

Definition at line 58 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ pretenure_data()

int32_t v8::internal::AllocationSite::pretenure_data ( RelaxedLoadTag ) const
inline

Definition at line 51 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ pretenure_decision()

AllocationSite::PretenureDecision v8::internal::AllocationSite::pretenure_decision ( ) const
inline

Definition at line 164 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PretenureDecisionName()

const char * v8::internal::AllocationSite::PretenureDecisionName ( PretenureDecision decision)

Definition at line 4931 of file objects.cc.

Here is the call graph for this function:

◆ PretenuringDecisionMade()

bool v8::internal::AllocationSite::PretenuringDecisionMade ( ) const
inlineprivate

Definition at line 114 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ ResetPretenureDecision()

void v8::internal::AllocationSite::ResetPretenureDecision ( )

Definition at line 4900 of file objects.cc.

◆ set_boilerplate()

void v8::internal::AllocationSite::set_boilerplate ( Tagged< JSObject > value,
ReleaseStoreTag tag,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER )
inline

Definition at line 75 of file allocation-site-inl.h.

◆ set_deopt_dependent_code()

void v8::internal::AllocationSite::set_deopt_dependent_code ( bool deopt)
inline

Definition at line 179 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ set_dependent_code()

void v8::internal::AllocationSite::set_dependent_code ( Tagged< DependentCode > value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER )
inline

Definition at line 46 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ set_memento_create_count()

void v8::internal::AllocationSite::set_memento_create_count ( int count)
inline

Definition at line 205 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_memento_found_count()

void v8::internal::AllocationSite::set_memento_found_count ( int count)
inline

Definition at line 189 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_nested_site()

void v8::internal::AllocationSite::set_nested_site ( Tagged< UnionOf< Smi, AllocationSite > > value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER )
inline

Definition at line 38 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ set_pretenure_create_count()

void v8::internal::AllocationSite::set_pretenure_create_count ( int32_t value)
inline

Definition at line 61 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ set_pretenure_data()

void v8::internal::AllocationSite::set_pretenure_data ( int32_t value,
RelaxedStoreTag  )
inline

Definition at line 54 of file allocation-site-inl.h.

Here is the caller graph for this function:

◆ set_pretenure_decision()

void v8::internal::AllocationSite::set_pretenure_decision ( PretenureDecision decision)
inline

Definition at line 169 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_transition_info()

void v8::internal::AllocationSite::set_transition_info ( int value)
inline

Definition at line 86 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDoNotInlineCall()

void v8::internal::AllocationSite::SetDoNotInlineCall ( )
inline

Definition at line 136 of file allocation-site-inl.h.

Here is the call graph for this function:

◆ SetElementsKind()

void v8::internal::AllocationSite::SetElementsKind ( ElementsKind kind)
inline

Definition at line 128 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldTrack() [1/2]

bool v8::internal::AllocationSite::ShouldTrack ( ElementsKind boilerplate_elements_kind)
inlinestatic

Definition at line 148 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldTrack() [2/2]

bool v8::internal::AllocationSite::ShouldTrack ( ElementsKind from,
ElementsKind to )
static

Definition at line 4926 of file objects.cc.

Here is the call graph for this function:

◆ transition_info()

int v8::internal::AllocationSite::transition_info ( ) const
inline

Definition at line 81 of file allocation-site-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transition_info_or_boilerplate()

Tagged< UnionOf< Smi, JSObject > > v8::internal::AllocationSite::transition_info_or_boilerplate ( ) const
inline

Definition at line 30 of file allocation-site-inl.h.

Friends And Related Symbol Documentation

◆ ArrayBuiltinsAssembler

friend class ArrayBuiltinsAssembler
friend

Definition at line 156 of file allocation-site.h.

◆ CodeStubAssembler

friend class CodeStubAssembler
friend

Definition at line 155 of file allocation-site.h.

◆ ObjectBuiltinsAssembler

friend class ObjectBuiltinsAssembler
friend

Definition at line 157 of file allocation-site.h.

◆ V8HeapExplorer

friend class V8HeapExplorer
friend

Definition at line 158 of file allocation-site.h.

Member Data Documentation

◆ dependent_code_

TaggedMember<DependentCode> v8::internal::AllocationSite::dependent_code_
private

Definition at line 164 of file allocation-site.h.

◆ kMaximumArrayBytesToPretransition

NEVER_READ_ONLY_SPACE const uint32_t v8::internal::AllocationSite::kMaximumArrayBytesToPretransition = 8 * 1024
static

Definition at line 26 of file allocation-site.h.

◆ nested_site_

TaggedMember<UnionOf<Smi, AllocationSite> > v8::internal::AllocationSite::nested_site_
private

Definition at line 163 of file allocation-site.h.

◆ pretenure_create_count_

int32_t v8::internal::AllocationSite::pretenure_create_count_
private

Definition at line 166 of file allocation-site.h.

◆ pretenure_data_

std::atomic<int32_t> v8::internal::AllocationSite::pretenure_data_
private

Definition at line 165 of file allocation-site.h.

◆ transition_info_or_boilerplate_

TaggedMember<UnionOf<Smi, JSObject> > v8::internal::AllocationSite::transition_info_or_boilerplate_
private

Definition at line 162 of file allocation-site.h.


The documentation for this class was generated from the following files: