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

#include <dependent-code.h>

Inheritance diagram for v8::internal::DependentCode:
Collaboration diagram for v8::internal::DependentCode:

Public Types

enum  DependencyGroup {
  kTransitionGroup = 1 << 0 , kPrototypeCheckGroup = 1 << 1 , kPropertyCellChangedGroup = 1 << 2 , kFieldTypeGroup = 1 << 3 ,
  kFieldConstGroup = 1 << 4 , kFieldRepresentationGroup = 1 << 5 , kInitialMapChangedGroup = 1 << 6 , kAllocationSiteTenuringChangedGroup = 1 << 7 ,
  kAllocationSiteTransitionChangedGroup = 1 << 8 , kScriptContextSlotPropertyChangedGroup = 1 << 9 , kEmptyContextExtensionGroup = 1 << 10
}
 
using DependencyGroups = base::Flags<DependencyGroup, uint32_t>
 

Static Public Member Functions

static const char * DependencyGroupName (DependencyGroup group)
 
static LazyDeoptimizeReason DependencyGroupToLazyDeoptReason (DependencyGroup group)
 
static V8_EXPORT_PRIVATE void InstallDependency (Isolate *isolate, Handle< Code > code, Handle< HeapObject > object, DependencyGroups groups)
 
template<typename ObjectT >
static void DeoptimizeDependencyGroups (Isolate *isolate, ObjectT object, DependencyGroups groups)
 
template<typename ObjectT >
static void DeoptimizeDependencyGroups (Isolate *isolate, Tagged< ObjectT > object, DependencyGroups groups)
 
template<typename ObjectT >
static bool MarkCodeForDeoptimization (Isolate *isolate, Tagged< ObjectT > object, DependencyGroups groups)
 
static V8_EXPORT_PRIVATE Tagged< DependentCodeempty_dependent_code (const ReadOnlyRoots &roots)
 
- Static Public Member Functions inherited from v8::internal::WeakArrayList
NEVER_READ_ONLY_SPACE static V8_EXPORT_PRIVATE Handle< WeakArrayListAddToEnd (Isolate *isolate, Handle< WeakArrayList > array, MaybeObjectDirectHandle value)
 
static V8_EXPORT_PRIVATE Handle< WeakArrayListAddToEnd (Isolate *isolate, Handle< WeakArrayList > array, MaybeObjectDirectHandle value1, Tagged< Smi > value2)
 
static V8_WARN_UNUSED_RESULT DirectHandle< WeakArrayListAppend (Isolate *isolate, DirectHandle< WeakArrayList > array, MaybeObjectDirectHandle value, AllocationType allocation=AllocationType::kYoung)
 
static constexpr int SizeForCapacity (int capacity)
 
static constexpr int CapacityForLength (int length)
 
static Handle< WeakArrayListEnsureSpace (Isolate *isolate, Handle< WeakArrayList > array, int length, AllocationType allocation=AllocationType::kYoung)
 

Static Public Attributes

static constexpr RootIndex kEmptyDependentCode
 
static constexpr int kSlotsPerEntry
 
static constexpr int kCodeSlotOffset = 0
 
static constexpr int kGroupsSlotOffset = 1
 
- Static Public Attributes inherited from v8::internal::WeakArrayList
static constexpr int kMaxCapacity = kMaxFixedArrayCapacity
 

Private Member Functions

bool MarkCodeForDeoptimization (Isolate *isolate, DependencyGroups deopt_groups)
 
void DeoptimizeDependencyGroups (Isolate *isolate, DependencyGroups groups)
 
template<typename Function >
void IterateAndCompact (IsolateForSandbox isolate, const Function &fn)
 
int FillEntryFromBack (int index, int length)
 
 OBJECT_CONSTRUCTORS (DependentCode, WeakArrayList)
 

Static Private Member Functions

static Tagged< DependentCodeGetDependentCode (Tagged< HeapObject > object)
 
static void SetDependentCode (DirectHandle< HeapObject > object, DirectHandle< DependentCode > dep)
 
static DirectHandle< DependentCodeInsertWeakCode (Isolate *isolate, Handle< DependentCode > entries, DependencyGroups groups, DirectHandle< Code > code)
 
static constexpr int LengthFor (int number_of_entries)
 

Additional Inherited Members

- Public Member Functions inherited from v8::internal::WeakArrayList
V8_EXPORT_PRIVATE void Compact (Isolate *isolate)
 
Tagged< MaybeObjectGet (int index) const
 
Tagged< MaybeObjectGet (PtrComprCageBase cage_base, int index) const
 
Tagged< MaybeObjectget (int index) const
 
void Set (int index, Tagged< MaybeObject > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void Set (int index, Tagged< Smi > value)
 
MaybeObjectSlot data_start ()
 
void CopyElements (Isolate *isolate, int dst_index, Tagged< WeakArrayList > src, int src_index, int len, WriteBarrierMode mode)
 
V8_EXPORT_PRIVATE bool IsFull () const
 
int AllocatedSize () const
 
int CountLiveWeakReferences () const
 
int CountLiveElements () const
 
V8_EXPORT_PRIVATE bool RemoveOne (MaybeObjectDirectHandle value)
 
V8_EXPORT_PRIVATE bool Contains (Tagged< MaybeObject > value)
 

Detailed Description

Definition at line 30 of file dependent-code.h.

Member Typedef Documentation

◆ DependencyGroups

Member Enumeration Documentation

◆ DependencyGroup

Enumerator
kTransitionGroup 
kPrototypeCheckGroup 
kPropertyCellChangedGroup 
kFieldTypeGroup 
kFieldConstGroup 
kFieldRepresentationGroup 
kInitialMapChangedGroup 
kAllocationSiteTenuringChangedGroup 
kAllocationSiteTransitionChangedGroup 
kScriptContextSlotPropertyChangedGroup 
kEmptyContextExtensionGroup 

Definition at line 32 of file dependent-code.h.

Member Function Documentation

◆ DeoptimizeDependencyGroups() [1/3]

void v8::internal::DependentCode::DeoptimizeDependencyGroups ( Isolate * isolate,
DependentCode::DependencyGroups groups )
private

Definition at line 174 of file dependent-code.cc.

Here is the call graph for this function:

◆ DeoptimizeDependencyGroups() [2/3]

template<typename ObjectT >
void v8::internal::DependentCode::DeoptimizeDependencyGroups ( Isolate * isolate,
ObjectT object,
DependencyGroups groups )
static

Definition at line 25 of file dependent-code-inl.h.

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

◆ DeoptimizeDependencyGroups() [3/3]

template<typename ObjectT >
void v8::internal::DependentCode::DeoptimizeDependencyGroups ( Isolate * isolate,
Tagged< ObjectT > object,
DependencyGroups groups )
static

Definition at line 33 of file dependent-code-inl.h.

Here is the call graph for this function:

◆ DependencyGroupName()

const char * v8::internal::DependentCode::DependencyGroupName ( DependencyGroup group)
static

Definition at line 190 of file dependent-code.cc.

Here is the call graph for this function:

◆ DependencyGroupToLazyDeoptReason()

LazyDeoptimizeReason v8::internal::DependentCode::DependencyGroupToLazyDeoptReason ( DependencyGroup group)
static

Definition at line 218 of file dependent-code.cc.

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

◆ empty_dependent_code()

Tagged< DependentCode > v8::internal::DependentCode::empty_dependent_code ( const ReadOnlyRoots & roots)
static

Definition at line 185 of file dependent-code.cc.

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

◆ FillEntryFromBack()

int v8::internal::DependentCode::FillEntryFromBack ( int index,
int length )
private

Definition at line 159 of file dependent-code.cc.

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

◆ GetDependentCode()

Tagged< DependentCode > v8::internal::DependentCode::GetDependentCode ( Tagged< HeapObject > object)
staticprivate

Definition at line 16 of file dependent-code.cc.

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

◆ InsertWeakCode()

DirectHandle< DependentCode > v8::internal::DependentCode::InsertWeakCode ( Isolate * isolate,
Handle< DependentCode > entries,
DependencyGroups groups,
DirectHandle< Code > code )
staticprivate

Definition at line 83 of file dependent-code.cc.

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

◆ InstallDependency()

void v8::internal::DependentCode::InstallDependency ( Isolate * isolate,
Handle< Code > code,
Handle< HeapObject > object,
DependencyGroups groups )
static

Definition at line 63 of file dependent-code.cc.

Here is the call graph for this function:

◆ IterateAndCompact()

template<typename Function >
void v8::internal::DependentCode::IterateAndCompact ( IsolateForSandbox isolate,
const Function & fn )
private

Definition at line 101 of file dependent-code.cc.

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

◆ LengthFor()

static constexpr int v8::internal::DependentCode::LengthFor ( int number_of_entries)
inlinestaticconstexprprivate

Definition at line 134 of file dependent-code.h.

◆ MarkCodeForDeoptimization() [1/2]

bool v8::internal::DependentCode::MarkCodeForDeoptimization ( Isolate * isolate,
DependentCode::DependencyGroups deopt_groups )
private

Definition at line 134 of file dependent-code.cc.

Here is the call graph for this function:

◆ MarkCodeForDeoptimization() [2/2]

template<typename ObjectT >
bool v8::internal::DependentCode::MarkCodeForDeoptimization ( Isolate * isolate,
Tagged< ObjectT > object,
DependencyGroups groups )
static

Definition at line 44 of file dependent-code-inl.h.

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

◆ OBJECT_CONSTRUCTORS()

v8::internal::DependentCode::OBJECT_CONSTRUCTORS ( DependentCode ,
WeakArrayList  )
private

◆ SetDependentCode()

void v8::internal::DependentCode::SetDependentCode ( DirectHandle< HeapObject > object,
DirectHandle< DependentCode > dep )
staticprivate

Definition at line 32 of file dependent-code.cc.

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

Member Data Documentation

◆ kCodeSlotOffset

int v8::internal::DependentCode::kCodeSlotOffset = 0
staticconstexpr

Definition at line 106 of file dependent-code.h.

◆ kEmptyDependentCode

RootIndex v8::internal::DependentCode::kEmptyDependentCode
staticconstexpr
Initial value:
=
RootIndex::kEmptyWeakArrayList

Definition at line 100 of file dependent-code.h.

◆ kGroupsSlotOffset

int v8::internal::DependentCode::kGroupsSlotOffset = 1
staticconstexpr

Definition at line 107 of file dependent-code.h.

◆ kSlotsPerEntry

int v8::internal::DependentCode::kSlotsPerEntry
staticconstexpr
Initial value:
=
2

Definition at line 104 of file dependent-code.h.


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