V8 Project
v8::internal::ZoneTypeConfig Struct Reference

#include <types.h>

+ Collaboration diagram for v8::internal::ZoneTypeConfig:

Classes

class  Base
 
struct  Handle
 

Public Types

typedef TypeImpl< ZoneTypeConfigType
 
typedef void * Struct
 
typedef i::Zone Region
 

Static Public Member Functions

template<class T >
static Thandle (T *type)
 
template<class T >
static Tcast (Type *type)
 
static bool is_bitset (Type *type)
 
static bool is_class (Type *type)
 
static bool is_struct (Type *type, int tag)
 
static Type::bitset as_bitset (Type *type)
 
static i::Handle< i::Mapas_class (Type *type)
 
static Structas_struct (Type *type)
 
static Typefrom_bitset (Type::bitset)
 
static Typefrom_bitset (Type::bitset, Zone *zone)
 
static Typefrom_class (i::Handle< i::Map > map, Zone *zone)
 
static Typefrom_struct (Struct *structured)
 
static Structstruct_create (int tag, int length, Zone *zone)
 
static void struct_shrink (Struct *structure, int length)
 
static int struct_tag (Struct *structure)
 
static int struct_length (Struct *structure)
 
static Typestruct_get (Struct *structure, int i)
 
static void struct_set (Struct *structure, int i, Type *type)
 
template<class V >
static i::Handle< Vstruct_get_value (Struct *structure, int i)
 
template<class V >
static void struct_set_value (Struct *structure, int i, i::Handle< V > x)
 

Detailed Description

Definition at line 906 of file types.h.

Member Typedef Documentation

◆ Region

Definition at line 910 of file types.h.

◆ Struct

Definition at line 909 of file types.h.

◆ Type

Member Function Documentation

◆ as_bitset()

ZoneTypeConfig::Type::bitset v8::internal::ZoneTypeConfig::as_bitset ( Type type)
inlinestatic

Definition at line 90 of file types-inl.h.

90  {
91  DCHECK(is_bitset(type));
92  return static_cast<Type::bitset>(reinterpret_cast<uintptr_t>(type) ^ 1u);
93 }
#define DCHECK(condition)
Definition: logging.h:205
static bool is_bitset(Type *type)
Definition: types-inl.h:72

References DCHECK, and is_bitset().

+ Here is the call graph for this function:

◆ as_class()

i::Handle< i::Map > v8::internal::ZoneTypeConfig::as_class ( Type type)
inlinestatic

Definition at line 104 of file types-inl.h.

104  {
105  UNREACHABLE();
106  return i::Handle<i::Map>();
107 }
#define UNREACHABLE()
Definition: logging.h:30

References UNREACHABLE.

◆ as_struct()

ZoneTypeConfig::Struct * v8::internal::ZoneTypeConfig::as_struct ( Type type)
inlinestatic

Definition at line 97 of file types-inl.h.

97  {
98  DCHECK(!is_bitset(type));
99  return reinterpret_cast<Struct*>(type);
100 }

References DCHECK, and is_bitset().

Referenced by is_struct().

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

◆ cast()

template<class T >
T * v8::internal::ZoneTypeConfig::cast ( Type type)
inlinestatic

Definition at line 66 of file types-inl.h.

66  {
67  return static_cast<T*>(type);
68 }
#define T(name, string, precedence)
Definition: token.cc:25

References T.

◆ from_bitset() [1/2]

ZoneTypeConfig::Type * v8::internal::ZoneTypeConfig::from_bitset ( Type::bitset  bitset)
inlinestatic

Definition at line 111 of file types-inl.h.

111  {
112  return reinterpret_cast<Type*>(static_cast<uintptr_t>(bitset | 1u));
113 }
TypeImpl< ZoneTypeConfig > Type
Definition: types.h:907

Referenced by from_bitset(), and from_class().

+ Here is the caller graph for this function:

◆ from_bitset() [2/2]

ZoneTypeConfig::Type * v8::internal::ZoneTypeConfig::from_bitset ( Type::bitset  bitset,
Zone zone 
)
inlinestatic

Definition at line 117 of file types-inl.h.

118  {
119  return from_bitset(bitset);
120 }
static Type * from_bitset(Type::bitset)
Definition: types-inl.h:111

References from_bitset().

+ Here is the call graph for this function:

◆ from_class()

ZoneTypeConfig::Type * v8::internal::ZoneTypeConfig::from_class ( i::Handle< i::Map map,
Zone zone 
)
inlinestatic

Definition at line 130 of file types-inl.h.

131  {
132  return from_bitset(0);
133 }

References from_bitset().

+ Here is the call graph for this function:

◆ from_struct()

ZoneTypeConfig::Type * v8::internal::ZoneTypeConfig::from_struct ( Struct structured)
inlinestatic

Definition at line 124 of file types-inl.h.

124  {
125  return reinterpret_cast<Type*>(structure);
126 }

◆ handle()

template<class T >
T * v8::internal::ZoneTypeConfig::handle ( T type)
inlinestatic

Definition at line 59 of file types-inl.h.

59  {
60  return type;
61 }

◆ is_bitset()

bool v8::internal::ZoneTypeConfig::is_bitset ( Type type)
inlinestatic

Definition at line 72 of file types-inl.h.

72  {
73  return reinterpret_cast<uintptr_t>(type) & 1;
74 }

Referenced by as_bitset(), as_struct(), and is_struct().

+ Here is the caller graph for this function:

◆ is_class()

bool v8::internal::ZoneTypeConfig::is_class ( Type type)
inlinestatic

Definition at line 84 of file types-inl.h.

84  {
85  return false;
86 }

◆ is_struct()

bool v8::internal::ZoneTypeConfig::is_struct ( Type type,
int  tag 
)
inlinestatic

Definition at line 78 of file types-inl.h.

78  {
79  return !is_bitset(type) && struct_tag(as_struct(type)) == tag;
80 }
static int struct_tag(Struct *structure)
Definition: types-inl.h:155
static Struct * as_struct(Type *type)
Definition: types-inl.h:97

References as_struct(), is_bitset(), and struct_tag().

+ Here is the call graph for this function:

◆ struct_create()

ZoneTypeConfig::Struct * v8::internal::ZoneTypeConfig::struct_create ( int  tag,
int  length,
Zone zone 
)
inlinestatic

Definition at line 137 of file types-inl.h.

138  {
139  Struct* structure = reinterpret_cast<Struct*>(
140  zone->New(sizeof(void*) * (length + 2))); // NOLINT
141  structure[0] = reinterpret_cast<void*>(tag);
142  structure[1] = reinterpret_cast<void*>(length);
143  return structure;
144 }

References v8::internal::Zone::New().

+ Here is the call graph for this function:

◆ struct_get()

Type * v8::internal::ZoneTypeConfig::struct_get ( Struct structure,
int  i 
)
inlinestatic

Definition at line 167 of file types-inl.h.

167  {
168  DCHECK(0 <= i && i <= struct_length(structure));
169  return static_cast<Type*>(structure[2 + i]);
170 }
static int struct_length(Struct *structure)
Definition: types-inl.h:161

References DCHECK, and struct_length().

+ Here is the call graph for this function:

◆ struct_get_value()

template<class V >
i::Handle< V > v8::internal::ZoneTypeConfig::struct_get_value ( Struct structure,
int  i 
)
inlinestatic

Definition at line 182 of file types-inl.h.

182  {
183  DCHECK(0 <= i && i <= struct_length(structure));
184  return i::Handle<V>(static_cast<V**>(structure[2 + i]));
185 }

References DCHECK, and struct_length().

+ Here is the call graph for this function:

◆ struct_length()

int v8::internal::ZoneTypeConfig::struct_length ( Struct structure)
inlinestatic

Definition at line 161 of file types-inl.h.

161  {
162  return static_cast<int>(reinterpret_cast<intptr_t>(structure[1]));
163 }

Referenced by struct_get(), struct_get_value(), struct_set(), struct_set_value(), and struct_shrink().

+ Here is the caller graph for this function:

◆ struct_set()

void v8::internal::ZoneTypeConfig::struct_set ( Struct structure,
int  i,
Type type 
)
inlinestatic

Definition at line 174 of file types-inl.h.

174  {
175  DCHECK(0 <= i && i <= struct_length(structure));
176  structure[2 + i] = x;
177 }

References DCHECK, and struct_length().

+ Here is the call graph for this function:

◆ struct_set_value()

template<class V >
void v8::internal::ZoneTypeConfig::struct_set_value ( Struct structure,
int  i,
i::Handle< V x 
)
inlinestatic

Definition at line 190 of file types-inl.h.

191  {
192  DCHECK(0 <= i && i <= struct_length(structure));
193  structure[2 + i] = x.location();
194 }

References DCHECK, and struct_length().

+ Here is the call graph for this function:

◆ struct_shrink()

void v8::internal::ZoneTypeConfig::struct_shrink ( Struct structure,
int  length 
)
inlinestatic

Definition at line 148 of file types-inl.h.

148  {
149  DCHECK(0 <= length && length <= struct_length(structure));
150  structure[1] = reinterpret_cast<void*>(length);
151 }

References DCHECK, and struct_length().

+ Here is the call graph for this function:

◆ struct_tag()

int v8::internal::ZoneTypeConfig::struct_tag ( Struct structure)
inlinestatic

Definition at line 155 of file types-inl.h.

155  {
156  return static_cast<int>(reinterpret_cast<intptr_t>(structure[0]));
157 }

Referenced by is_struct().

+ Here is the caller graph for this function:

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