v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData > Class Template Reference

#include <snapshot-table.h>

Collaboration diagram for v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >:

Classes

struct  LogEntry
 
class  MaybeSnapshot
 
class  Snapshot
 
struct  SnapshotData
 

Public Types

using TableEntry = SnapshotTableEntry<Value, KeyData>
 
using Key = SnapshotTableKey<Value, KeyData>
 

Public Member Functions

template<class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void StartNewSnapshot (base::Vector< const Snapshot > predecessors, const ChangeCallback &change_callback={})
 
template<class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void StartNewSnapshot (std::initializer_list< Snapshot > predecessors={}, const ChangeCallback &change_callback={})
 
template<class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void StartNewSnapshot (Snapshot parent, const ChangeCallback &change_callback={})
 
template<class MergeFun , class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<MergeFun, Key, base::Vector<const Value>> && std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void StartNewSnapshot (base::Vector< const Snapshot > predecessors, const MergeFun &merge_fun, const ChangeCallback &change_callback={})
 
template<class MergeFun , class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<MergeFun, Key, base::Vector<const Value>> && std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void StartNewSnapshot (std::initializer_list< Snapshot > predecessors, const MergeFun &merge_fun, const ChangeCallback &change_callback={})
 
Snapshot Seal ()
 
const ValueGet (Key key) const
 
const ValueGetPredecessorValue (Key key, int predecessor_index)
 
bool Set (Key key, Value new_value)
 
 SnapshotTable (Zone *zone)
 
Key NewKey (KeyData data, Value initial_value=Value{})
 
Key NewKey (Value initial_value=Value{})
 
bool IsSealed ()
 

Private Member Functions

SnapshotDataNewSnapshot (SnapshotData *parent)
 
base::Vector< LogEntryLogEntries (SnapshotData *s)
 
template<class ChangeCallback = NoChangeCallback>
void RevertCurrentSnapshot (ChangeCallback &change_callback)
 
template<class ChangeCallback = NoChangeCallback>
void ReplaySnapshot (SnapshotData *snapshot, ChangeCallback &change_callback)
 
void RecordMergeValue (TableEntry &entry, const Value &value, uint32_t predecessor_index, uint32_t predecessor_count)
 
template<class ChangeCallback >
SnapshotDataMoveToNewSnapshot (base::Vector< const Snapshot > predecessors, const ChangeCallback &change_callback)
 
template<class MergeFun , class ChangeCallback >
void MergePredecessors (base::Vector< const Snapshot > predecessors, const MergeFun &merge_fun, const ChangeCallback &change_callback)
 

Private Attributes

Zonezone_
 
ZoneDeque< TableEntrytable_ {zone_}
 
ZoneDeque< SnapshotDatasnapshots_ {zone_}
 
ZoneVector< LogEntrylog_ {zone_}
 
SnapshotDataroot_snapshot_
 
SnapshotDatacurrent_snapshot_
 
ZoneVector< TableEntry * > merging_entries_ {zone_}
 
ZoneVector< Valuemerge_values_ {zone_}
 
ZoneVector< SnapshotData * > path_ {zone_}
 

Static Private Attributes

static constexpr uint32_t kNoMergeOffset
 
static constexpr uint32_t kNoMergedPredecessor
 

Detailed Description

template<class Value, class KeyData = NoKeyData>
class v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >

Definition at line 92 of file snapshot-table.h.

Member Typedef Documentation

◆ Key

Definition at line 99 of file snapshot-table.h.

◆ TableEntry

template<class Value , class KeyData = NoKeyData>
using v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::TableEntry = SnapshotTableEntry<Value, KeyData>

Definition at line 98 of file snapshot-table.h.

Constructor & Destructor Documentation

◆ SnapshotTable()

template<class Value , class KeyData = NoKeyData>
v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::SnapshotTable ( Zone * zone)
inlineexplicit

Definition at line 247 of file snapshot-table.h.

Here is the call graph for this function:

Member Function Documentation

◆ Get()

template<class Value , class KeyData = NoKeyData>
const Value & v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::Get ( Key key) const
inline

Definition at line 222 of file snapshot-table.h.

Here is the caller graph for this function:

◆ GetPredecessorValue()

template<class Value , class KeyData = NoKeyData>
const Value & v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::GetPredecessorValue ( Key key,
int predecessor_index )
inline

Definition at line 231 of file snapshot-table.h.

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

◆ IsSealed()

template<class Value , class KeyData = NoKeyData>
bool v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::IsSealed ( )
inline

Definition at line 266 of file snapshot-table.h.

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

◆ LogEntries()

template<class Value , class KeyData = NoKeyData>
base::Vector< LogEntry > v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::LogEntries ( SnapshotData * s)
inlineprivate

Definition at line 295 of file snapshot-table.h.

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

◆ MergePredecessors()

template<class Value , class KeyData >
template<class MergeFun , class ChangeCallback >
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::MergePredecessors ( base::Vector< const Snapshot > predecessors,
const MergeFun & merge_fun,
const ChangeCallback & change_callback )
private

Definition at line 469 of file snapshot-table.h.

Here is the call graph for this function:

◆ MoveToNewSnapshot()

template<class Value , class KeyData >
template<class ChangeCallback >
SnapshotTable< Value, KeyData >::SnapshotData & v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::MoveToNewSnapshot ( base::Vector< const Snapshot > predecessors,
const ChangeCallback & change_callback )
private

Definition at line 428 of file snapshot-table.h.

Here is the call graph for this function:

◆ NewKey() [1/2]

template<class Value , class KeyData = NoKeyData>
Key v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::NewKey ( KeyData data,
Value initial_value = Value{} )
inline

Definition at line 257 of file snapshot-table.h.

Here is the caller graph for this function:

◆ NewKey() [2/2]

template<class Value , class KeyData = NoKeyData>
Key v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::NewKey ( Value initial_value = Value{})
inline

Definition at line 261 of file snapshot-table.h.

◆ NewSnapshot()

template<class Value , class KeyData = NoKeyData>
SnapshotData & v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::NewSnapshot ( SnapshotData * parent)
inlineprivate

Definition at line 291 of file snapshot-table.h.

Here is the caller graph for this function:

◆ RecordMergeValue()

template<class Value , class KeyData >
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::RecordMergeValue ( TableEntry & entry,
const Value & value,
uint32_t predecessor_index,
uint32_t predecessor_count )
private

Definition at line 380 of file snapshot-table.h.

◆ ReplaySnapshot()

template<class Value , class KeyData = NoKeyData>
template<class ChangeCallback = NoChangeCallback>
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::ReplaySnapshot ( SnapshotData * snapshot,
ChangeCallback & change_callback )
inlineprivate

Definition at line 314 of file snapshot-table.h.

Here is the call graph for this function:

◆ RevertCurrentSnapshot()

template<class Value , class KeyData = NoKeyData>
template<class ChangeCallback = NoChangeCallback>
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::RevertCurrentSnapshot ( ChangeCallback & change_callback)
inlineprivate

Definition at line 300 of file snapshot-table.h.

Here is the call graph for this function:

◆ Seal()

template<class Value , class KeyData = NoKeyData>
Snapshot v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::Seal ( )
inline

Definition at line 199 of file snapshot-table.h.

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

◆ Set()

template<class Value , class KeyData = NoKeyData>
bool v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::Set ( Key key,
Value new_value )
inline

Definition at line 239 of file snapshot-table.h.

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

◆ StartNewSnapshot() [1/5]

template<class Value , class KeyData = NoKeyData>
template<class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::StartNewSnapshot ( base::Vector< const Snapshot > predecessors,
const ChangeCallback & change_callback = {} )
inline

Definition at line 152 of file snapshot-table.h.

Here is the caller graph for this function:

◆ StartNewSnapshot() [2/5]

template<class Value , class KeyData = NoKeyData>
template<class MergeFun , class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<MergeFun, Key, base::Vector<const Value>> && std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::StartNewSnapshot ( base::Vector< const Snapshot > predecessors,
const MergeFun & merge_fun,
const ChangeCallback & change_callback = {} )
inline

Definition at line 177 of file snapshot-table.h.

◆ StartNewSnapshot() [3/5]

template<class Value , class KeyData = NoKeyData>
template<class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::StartNewSnapshot ( Snapshot parent,
const ChangeCallback & change_callback = {} )
inline

Definition at line 170 of file snapshot-table.h.

◆ StartNewSnapshot() [4/5]

template<class Value , class KeyData = NoKeyData>
template<class MergeFun , class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<MergeFun, Key, base::Vector<const Value>> && std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::StartNewSnapshot ( std::initializer_list< Snapshot > predecessors,
const MergeFun & merge_fun,
const ChangeCallback & change_callback = {} )
inline

Definition at line 190 of file snapshot-table.h.

◆ StartNewSnapshot() [5/5]

template<class Value , class KeyData = NoKeyData>
template<class ChangeCallback = NoChangeCallback>
requires (std::is_invocable_v<ChangeCallback, Key, Value, Value>)
void v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::StartNewSnapshot ( std::initializer_list< Snapshot > predecessors = {},
const ChangeCallback & change_callback = {} )
inline

Definition at line 163 of file snapshot-table.h.

Member Data Documentation

◆ current_snapshot_

template<class Value , class KeyData = NoKeyData>
SnapshotData* v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::current_snapshot_
private

Definition at line 277 of file snapshot-table.h.

◆ kNoMergedPredecessor

template<class Value , class KeyData = NoKeyData>
uint32_t v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::kNoMergedPredecessor
staticconstexprprivate
Initial value:
=
std::numeric_limits<uint32_t>::max()

Definition at line 337 of file snapshot-table.h.

◆ kNoMergeOffset

template<class Value , class KeyData = NoKeyData>
uint32_t v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::kNoMergeOffset
staticconstexprprivate
Initial value:
=
std::numeric_limits<uint32_t>::max()

Definition at line 335 of file snapshot-table.h.

◆ log_

template<class Value , class KeyData = NoKeyData>
ZoneVector<LogEntry> v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::log_ {zone_}
private

Definition at line 275 of file snapshot-table.h.

◆ merge_values_

template<class Value , class KeyData = NoKeyData>
ZoneVector<Value> v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::merge_values_ {zone_}
private

Definition at line 284 of file snapshot-table.h.

◆ merging_entries_

template<class Value , class KeyData = NoKeyData>
ZoneVector<TableEntry*> v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::merging_entries_ {zone_}
private

Definition at line 283 of file snapshot-table.h.

◆ path_

template<class Value , class KeyData = NoKeyData>
ZoneVector<SnapshotData*> v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::path_ {zone_}
private

Definition at line 285 of file snapshot-table.h.

◆ root_snapshot_

template<class Value , class KeyData = NoKeyData>
SnapshotData* v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::root_snapshot_
private

Definition at line 276 of file snapshot-table.h.

◆ snapshots_

template<class Value , class KeyData = NoKeyData>
ZoneDeque<SnapshotData> v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::snapshots_ {zone_}
private

Definition at line 271 of file snapshot-table.h.

◆ table_

template<class Value , class KeyData = NoKeyData>
ZoneDeque<TableEntry> v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::table_ {zone_}
private

Definition at line 270 of file snapshot-table.h.

◆ zone_

template<class Value , class KeyData = NoKeyData>
Zone* v8::internal::compiler::turboshaft::SnapshotTable< Value, KeyData >::zone_
private

Definition at line 269 of file snapshot-table.h.


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