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

#include <maglev-ir.h>

Inheritance diagram for v8::internal::maglev::VirtualObject:
Collaboration diagram for v8::internal::maglev::VirtualObject:

Classes

struct  DoubleArray
 
struct  ObjectFields
 
struct  VirtualConsString
 

Public Types

enum  Type : uint8_t {
  kDefault , kHeapNumber , kFixedDoubleArray , kConsString ,
  kLast = kConsString
}
 

Public Member Functions

 VirtualObject (uint64_t bitfield, int id, const VirtualConsString &cons_string)
 
 VirtualObject (uint64_t bitfield, compiler::MapRef map, int id, uint32_t slot_count, ValueNode **slots)
 
 VirtualObject (uint64_t bitfield, compiler::MapRef map, int id, Float64 number)
 
 VirtualObject (uint64_t bitfield, compiler::MapRef map, int id, uint32_t length, compiler::FixedDoubleArrayRef elements)
 
void SetValueLocationConstraints ()
 
void GenerateCode (MaglevAssembler *, const ProcessingState &)
 
void PrintParams (std::ostream &, MaglevGraphLabeller *) const
 
constexpr bool has_static_map () const
 
compiler::MapRef map () const
 
Type type () const
 
uint32_t id () const
 
size_t size () const
 
Float64 number () const
 
uint32_t double_elements_length () const
 
compiler::FixedDoubleArrayRef double_elements () const
 
ValueNodeget (uint32_t offset) const
 
void set (uint32_t offset, ValueNode *value)
 
ValueNodestring_length () const
 
const VirtualConsStringcons_string () const
 
void ClearSlots (int last_init_slot, ValueNode *clear_value)
 
InlinedAllocationallocation () const
 
void set_allocation (InlinedAllocation *allocation)
 
bool compatible_for_merge (const VirtualObject *other) const
 
bool IsSnapshot () const
 
void Snapshot ()
 
template<typename Function >
void ForEachInput (Function &&callback)
 
template<typename Function >
void ForEachInput (Function &&callback) const
 
template<typename Function >
void ForEachNestedRuntimeInput (VirtualObjectList virtual_objects, Function &&f)
 
template<typename Function >
void ForEachNestedRuntimeInput (VirtualObjectList virtual_objects, Function &&f) const
 
template<typename Function >
std::optional< VirtualObject * > Merge (const VirtualObject *other, uint32_t new_object_id, Zone *zone, Function MergeValue) const
 
VirtualObjectClone (uint32_t new_object_id, Zone *zone, bool empty_clone=false) const
 
uint32_t slot_count () const
 
- Public Member Functions inherited from v8::internal::maglev::FixedInputNodeTMixin< InputCount, Base, Derived >
constexpr bool has_inputs () const
 
constexpr uint16_t input_count () const
 
constexpr auto end ()
 
void VerifyInputs (MaglevGraphLabeller *graph_labeller) const
 
- Public Member Functions inherited from v8::internal::maglev::NodeTMixin< Base, Derived >
constexpr Opcode opcode () const
 
constexpr const OpPropertiesproperties () const
 

Private Types

using Base = FixedInputValueNodeT<0, VirtualObject>
 

Private Member Functions

ValueNodeget_by_index (uint32_t i) const
 
void set_by_index (uint32_t i, ValueNode *value)
 

Private Attributes

compiler::OptionalMapRef map_
 
const int id_
 
Type type_
 
bool snapshotted_ = false
 
union { 
 
   Float64   number_ 
 
   DoubleArray   double_array_ 
 
   ObjectFields   slots_ 
 
   VirtualConsString   cons_string_ 
 
};  
 
InlinedAllocationallocation_ = nullptr
 
VirtualObjectnext_ = nullptr
 
friend VirtualObjectList
 

Friends

std::ostream & operator<< (std::ostream &out, Type type)
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::maglev::NodeTMixin< Base, Derived >
template<typename... Args>
static Derived * New (Zone *zone, std::initializer_list< ValueNode * > inputs, Args &&... args)
 
template<typename... Args>
static Derived * New (Zone *zone, size_t input_count, Args &&... args)
 
- Static Public Attributes inherited from v8::internal::maglev::FixedInputNodeTMixin< InputCount, Base, Derived >
static constexpr size_t kInputCount = InputCount
 
- Protected Types inherited from v8::internal::maglev::FixedInputNodeTMixin< InputCount, Base, Derived >
using InputTypes = detail::ArrayWrapper<kInputCount>
 
- Protected Member Functions inherited from v8::internal::maglev::FixedInputNodeTMixin< InputCount, Base, Derived >
template<typename... Args>
 FixedInputNodeTMixin (uint64_t bitfield, Args &&... args)
 
- Protected Member Functions inherited from v8::internal::maglev::NodeTMixin< Base, Derived >
template<typename... Args>
 NodeTMixin (uint64_t bitfield, Args &&... args)
 
- Protected Attributes inherited from v8::internal::maglev::FixedInputNodeTMixin< InputCount, Base, Derived >
detail::YouNeedToDefineAnInputTypesArrayInYourDerivedClass kInputTypes
 

Detailed Description

Definition at line 5498 of file maglev-ir.h.

Member Typedef Documentation

◆ Base

Member Enumeration Documentation

◆ Type

Enumerator
kDefault 
kHeapNumber 
kFixedDoubleArray 
kConsString 
kLast 

Definition at line 5502 of file maglev-ir.h.

Constructor & Destructor Documentation

◆ VirtualObject() [1/4]

v8::internal::maglev::VirtualObject::VirtualObject ( uint64_t bitfield,
int id,
const VirtualConsString & cons_string )
inlineexplicit

Definition at line 5539 of file maglev-ir.h.

Here is the call graph for this function:

◆ VirtualObject() [2/4]

v8::internal::maglev::VirtualObject::VirtualObject ( uint64_t bitfield,
compiler::MapRef map,
int id,
uint32_t slot_count,
ValueNode ** slots )
inlineexplicit

Definition at line 5545 of file maglev-ir.h.

Here is the call graph for this function:

◆ VirtualObject() [3/4]

v8::internal::maglev::VirtualObject::VirtualObject ( uint64_t bitfield,
compiler::MapRef map,
int id,
Float64 number )
inlineexplicit

Definition at line 5555 of file maglev-ir.h.

Here is the call graph for this function:

◆ VirtualObject() [4/4]

v8::internal::maglev::VirtualObject::VirtualObject ( uint64_t bitfield,
compiler::MapRef map,
int id,
uint32_t length,
compiler::FixedDoubleArrayRef elements )
inlineexplicit

Definition at line 5565 of file maglev-ir.h.

Member Function Documentation

◆ allocation()

InlinedAllocation * v8::internal::maglev::VirtualObject::allocation ( ) const
inline

Definition at line 5664 of file maglev-ir.h.

Here is the caller graph for this function:

◆ ClearSlots()

void v8::internal::maglev::VirtualObject::ClearSlots ( int last_init_slot,
ValueNode * clear_value )
inline

Definition at line 5656 of file maglev-ir.h.

Here is the call graph for this function:

◆ Clone()

VirtualObject * v8::internal::maglev::VirtualObject::Clone ( uint32_t new_object_id,
Zone * zone,
bool empty_clone = false ) const
inline

Definition at line 5769 of file maglev-ir.h.

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

◆ compatible_for_merge()

bool v8::internal::maglev::VirtualObject::compatible_for_merge ( const VirtualObject * other) const
inline

Definition at line 5669 of file maglev-ir.h.

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

◆ cons_string()

const VirtualConsString & v8::internal::maglev::VirtualObject::cons_string ( ) const
inline

Definition at line 5651 of file maglev-ir.h.

Here is the caller graph for this function:

◆ double_elements()

compiler::FixedDoubleArrayRef v8::internal::maglev::VirtualObject::double_elements ( ) const
inline

Definition at line 5621 of file maglev-ir.h.

Here is the caller graph for this function:

◆ double_elements_length()

uint32_t v8::internal::maglev::VirtualObject::double_elements_length ( ) const
inline

Definition at line 5616 of file maglev-ir.h.

Here is the caller graph for this function:

◆ ForEachInput() [1/2]

template<typename Function >
void v8::internal::maglev::VirtualObject::ForEachInput ( Function && callback)
inline

Definition at line 5694 of file maglev-ir.h.

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

◆ ForEachInput() [2/2]

template<typename Function >
void v8::internal::maglev::VirtualObject::ForEachInput ( Function && callback) const
inline

Definition at line 5714 of file maglev-ir.h.

Here is the call graph for this function:

◆ ForEachNestedRuntimeInput() [1/2]

template<typename Function >
void v8::internal::maglev::VirtualObject::ForEachNestedRuntimeInput ( VirtualObjectList virtual_objects,
Function && f )
inline

Definition at line 6057 of file maglev-ir.h.

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

◆ ForEachNestedRuntimeInput() [2/2]

template<typename Function >
void v8::internal::maglev::VirtualObject::ForEachNestedRuntimeInput ( VirtualObjectList virtual_objects,
Function && f ) const
inline

Definition at line 6096 of file maglev-ir.h.

Here is the call graph for this function:

◆ GenerateCode()

void v8::internal::maglev::VirtualObject::GenerateCode ( MaglevAssembler * ,
const ProcessingState &  )
inline

Definition at line 5577 of file maglev-ir.h.

Here is the call graph for this function:

◆ get()

ValueNode * v8::internal::maglev::VirtualObject::get ( uint32_t offset) const
inline

Definition at line 5626 of file maglev-ir.h.

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

◆ get_by_index()

ValueNode * v8::internal::maglev::VirtualObject::get_by_index ( uint32_t i) const
inlineprivate

Definition at line 5809 of file maglev-ir.h.

Here is the caller graph for this function:

◆ has_static_map()

bool v8::internal::maglev::VirtualObject::has_static_map ( ) const
inlineconstexpr

Definition at line 5580 of file maglev-ir.h.

Here is the caller graph for this function:

◆ id()

uint32_t v8::internal::maglev::VirtualObject::id ( ) const
inline

Definition at line 5596 of file maglev-ir.h.

Here is the caller graph for this function:

◆ IsSnapshot()

bool v8::internal::maglev::VirtualObject::IsSnapshot ( ) const
inline

Definition at line 5690 of file maglev-ir.h.

Here is the caller graph for this function:

◆ map()

compiler::MapRef v8::internal::maglev::VirtualObject::map ( ) const
inline

Definition at line 5591 of file maglev-ir.h.

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

◆ Merge()

template<typename Function >
std::optional< VirtualObject * > v8::internal::maglev::VirtualObject::Merge ( const VirtualObject * other,
uint32_t new_object_id,
Zone * zone,
Function MergeValue ) const
inline

Definition at line 5743 of file maglev-ir.h.

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

◆ number()

Float64 v8::internal::maglev::VirtualObject::number ( ) const
inline

Definition at line 5611 of file maglev-ir.h.

Here is the caller graph for this function:

◆ PrintParams()

void v8::internal::maglev::VirtualObject::PrintParams ( std::ostream & os,
MaglevGraphLabeller * graph_labeller ) const

Definition at line 7551 of file maglev-ir.cc.

Here is the call graph for this function:

◆ set()

void v8::internal::maglev::VirtualObject::set ( uint32_t offset,
ValueNode * value )
inline

Definition at line 5634 of file maglev-ir.h.

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

◆ set_allocation()

void v8::internal::maglev::VirtualObject::set_allocation ( InlinedAllocation * allocation)
inline

Definition at line 5665 of file maglev-ir.h.

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

◆ set_by_index()

void v8::internal::maglev::VirtualObject::set_by_index ( uint32_t i,
ValueNode * value )
inlineprivate

Definition at line 5814 of file maglev-ir.h.

◆ SetValueLocationConstraints()

void v8::internal::maglev::VirtualObject::SetValueLocationConstraints ( )
inline

Definition at line 5576 of file maglev-ir.h.

Here is the call graph for this function:

◆ size()

size_t v8::internal::maglev::VirtualObject::size ( ) const
inline

Definition at line 5598 of file maglev-ir.h.

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

◆ slot_count()

uint32_t v8::internal::maglev::VirtualObject::slot_count ( ) const
inline

Definition at line 5803 of file maglev-ir.h.

Here is the caller graph for this function:

◆ Snapshot()

void v8::internal::maglev::VirtualObject::Snapshot ( )
inline

Definition at line 5691 of file maglev-ir.h.

Here is the caller graph for this function:

◆ string_length()

ValueNode * v8::internal::maglev::VirtualObject::string_length ( ) const
inline

Definition at line 5646 of file maglev-ir.h.

◆ type()

Type v8::internal::maglev::VirtualObject::type ( ) const
inline

Definition at line 5595 of file maglev-ir.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
Type type )
friend

Definition at line 5511 of file maglev-ir.h.

Member Data Documentation

◆ [union]

◆ allocation_

InlinedAllocation* v8::internal::maglev::VirtualObject::allocation_ = nullptr
mutableprivate

Definition at line 5843 of file maglev-ir.h.

◆ cons_string_

VirtualConsString v8::internal::maglev::VirtualObject::cons_string_

Definition at line 5841 of file maglev-ir.h.

◆ double_array_

DoubleArray v8::internal::maglev::VirtualObject::double_array_

Definition at line 5839 of file maglev-ir.h.

◆ id_

const int v8::internal::maglev::VirtualObject::id_
private

Definition at line 5832 of file maglev-ir.h.

◆ map_

compiler::OptionalMapRef v8::internal::maglev::VirtualObject::map_
private

Definition at line 5831 of file maglev-ir.h.

◆ next_

VirtualObject* v8::internal::maglev::VirtualObject::next_ = nullptr
private

Definition at line 5845 of file maglev-ir.h.

◆ number_

Float64 v8::internal::maglev::VirtualObject::number_

Definition at line 5838 of file maglev-ir.h.

◆ slots_

ObjectFields v8::internal::maglev::VirtualObject::slots_

Definition at line 5840 of file maglev-ir.h.

◆ snapshotted_

bool v8::internal::maglev::VirtualObject::snapshotted_ = false
private

Definition at line 5836 of file maglev-ir.h.

◆ type_

Type v8::internal::maglev::VirtualObject::type_
private

Definition at line 5833 of file maglev-ir.h.

◆ VirtualObjectList

friend v8::internal::maglev::VirtualObject::VirtualObjectList
private

Definition at line 5846 of file maglev-ir.h.


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