V8 Project
v8::internal::GlobalHandles::Node Class Reference
+ Collaboration diagram for v8::internal::GlobalHandles::Node:

Classes

class  IsIndependent
 
class  IsInNewSpaceList
 
class  IsPartiallyDependent
 
class  NodeState
 

Public Types

enum  State {
  FREE = 0 , NORMAL , WEAK , PENDING ,
  NEAR_DEATH
}
 

Public Member Functions

 Node ()
 
void Initialize (int index, Node **first_free)
 
void Acquire (Object *object)
 
void Release ()
 
Objectobject () const
 
Object ** location ()
 
Handle< Objecthandle ()
 
bool has_wrapper_class_id () const
 
uint16_t wrapper_class_id () const
 
State state () const
 
void set_state (State state)
 
bool is_independent ()
 
void set_independent (bool v)
 
bool is_partially_dependent ()
 
void set_partially_dependent (bool v)
 
bool is_in_new_space_list ()
 
void set_in_new_space_list (bool v)
 
bool IsNearDeath () const
 
bool IsWeak () const
 
bool IsRetainer () const
 
bool IsStrongRetainer () const
 
bool IsWeakRetainer () const
 
void MarkPending ()
 
void MarkIndependent ()
 
void MarkPartiallyDependent ()
 
void clear_partially_dependent ()
 
void set_parameter (void *parameter)
 
void * parameter () const
 
Nodenext_free ()
 
void set_next_free (Node *value)
 
void MakeWeak (void *parameter, WeakCallback weak_callback)
 
void * ClearWeakness ()
 
bool PostGarbageCollectionProcessing (Isolate *isolate)
 
GlobalHandlesGetGlobalHandles ()
 

Static Public Member Functions

static NodeFromLocation (Object **location)
 

Private Member Functions

NodeBlockFindBlock ()
 
void IncreaseBlockUses ()
 
void DecreaseBlockUses ()
 
 DISALLOW_COPY_AND_ASSIGN (Node)
 

Private Attributes

Objectobject_
 
uint16_t class_id_
 
uint8_t index_
 
uint8_t flags_
 
WeakCallback weak_callback_
 
union {
   void *   parameter
 
   Node *   next_free
 
parameter_or_next_free_
 

Detailed Description

Definition at line 27 of file global-handles.cc.

Member Enumeration Documentation

◆ State

Enumerator
FREE 
NORMAL 
WEAK 
PENDING 
NEAR_DEATH 

Definition at line 31 of file global-handles.cc.

31  {
32  FREE = 0,
33  NORMAL, // Normal global handle.
34  WEAK, // Flagged as weak but not yet finalized.
35  PENDING, // Has been recognized as only reachable by weak handles.
36  NEAR_DEATH // Callback has informed the handle is near death.
37  };

Constructor & Destructor Documentation

◆ Node()

v8::internal::GlobalHandles::Node::Node ( )
inline

Definition at line 45 of file global-handles.cc.

45  {
48  STATIC_ASSERT(static_cast<int>(NodeState::kMask) ==
53  STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) ==
55  STATIC_ASSERT(static_cast<int>(IsPartiallyDependent::kShift) ==
57  }
static const U kShift
Definition: utils.h:204
static const U kMask
Definition: utils.h:203
static const int kNodeStateIsNearDeathValue
Definition: v8.h:5858
static const int kNodeIsIndependentShift
Definition: v8.h:5859
static const int kNodeStateIsPendingValue
Definition: v8.h:5857
static const int kNodeStateMask
Definition: v8.h:5855
static const int kNodeStateIsWeakValue
Definition: v8.h:5856
static const int kNodeIsPartiallyDependentShift
Definition: v8.h:5860
static const int kNodeFlagsOffset
Definition: v8.h:5854
static const int kNodeClassIdOffset
Definition: v8.h:5853
#define DCHECK(condition)
Definition: logging.h:205
#define OFFSET_OF(type, field)
Definition: macros.h:22
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))

References class_id_, DCHECK, flags_, v8::internal::BitFieldBase< T, shift, size, U >::kMask, v8::internal::Internals::kNodeClassIdOffset, v8::internal::Internals::kNodeFlagsOffset, v8::internal::Internals::kNodeIsIndependentShift, v8::internal::Internals::kNodeIsPartiallyDependentShift, v8::internal::Internals::kNodeStateIsNearDeathValue, v8::internal::Internals::kNodeStateIsPendingValue, v8::internal::Internals::kNodeStateIsWeakValue, v8::internal::Internals::kNodeStateMask, v8::internal::BitFieldBase< T, shift, size, U >::kShift, NEAR_DEATH, OFFSET_OF, PENDING, v8::internal::STATIC_ASSERT(), and WEAK.

+ Here is the call graph for this function:

Member Function Documentation

◆ Acquire()

void v8::internal::GlobalHandles::Node::Acquire ( Object object)
inline

Definition at line 83 of file global-handles.cc.

83  {
84  DCHECK(state() == FREE);
85  object_ = object;
87  set_independent(false);
90  parameter_or_next_free_.parameter = NULL;
93  }
static const uint16_t kPersistentHandleNoClassId
Default value of persistent handle class ID.
Definition: v8-profiler.h:503
union v8::internal::GlobalHandles::Node::@14 parameter_or_next_free_
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References class_id_, DCHECK, FREE, IncreaseBlockUses(), v8::HeapProfiler::kPersistentHandleNoClassId, NORMAL, NULL, object(), object_, parameter_or_next_free_, set_independent(), set_partially_dependent(), set_state(), state(), and weak_callback_.

Referenced by v8::internal::GlobalHandles::Create().

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

◆ clear_partially_dependent()

void v8::internal::GlobalHandles::Node::clear_partially_dependent ( )
inline

Definition at line 181 of file global-handles.cc.

181 { set_partially_dependent(false); }

References set_partially_dependent().

Referenced by v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ ClearWeakness()

void* v8::internal::GlobalHandles::Node::ClearWeakness ( )
inline

Definition at line 216 of file global-handles.cc.

216  {
217  DCHECK(state() != FREE);
218  void* p = parameter();
219  set_state(NORMAL);
221  return p;
222  }
void set_parameter(void *parameter)

References DCHECK, FREE, NORMAL, NULL, parameter, set_parameter(), set_state(), and state().

Referenced by v8::internal::GlobalHandles::ClearWeakness().

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

◆ DecreaseBlockUses()

void v8::internal::GlobalHandles::Node::DecreaseBlockUses ( )
inlineprivate

Definition at line 388 of file global-handles.cc.

388  {
389  NodeBlock* node_block = FindBlock();
390  GlobalHandles* global_handles = node_block->global_handles();
391  parameter_or_next_free_.next_free = global_handles->first_free_;
392  global_handles->first_free_ = this;
393  node_block->DecreaseUses();
394  global_handles->isolate()->counters()->global_handles()->Decrement();
395  global_handles->number_of_global_handles_--;
396 }
GlobalHandles(Isolate *isolate)

References v8::internal::Isolate::counters(), v8::internal::GlobalHandles::NodeBlock::DecreaseUses(), v8::internal::GlobalHandles::first_free_, v8::internal::GlobalHandles::NodeBlock::global_handles(), v8::internal::GlobalHandles::isolate(), and v8::internal::GlobalHandles::number_of_global_handles_.

Referenced by Release().

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

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::GlobalHandles::Node::DISALLOW_COPY_AND_ASSIGN ( Node  )
private

◆ FindBlock()

GlobalHandles::NodeBlock * v8::internal::GlobalHandles::Node::FindBlock ( )
inlineprivate

Definition at line 370 of file global-handles.cc.

370  {
371  intptr_t ptr = reinterpret_cast<intptr_t>(this);
372  ptr = ptr - index_ * sizeof(Node);
373  NodeBlock* block = reinterpret_cast<NodeBlock*>(ptr);
374  DCHECK(block->node_at(index_) == this);
375  return block;
376 }

References DCHECK.

Referenced by GetGlobalHandles().

+ Here is the caller graph for this function:

◆ FromLocation()

static Node* v8::internal::GlobalHandles::Node::FromLocation ( Object **  location)
inlinestatic

Definition at line 40 of file global-handles.cc.

40  {
41  DCHECK(OFFSET_OF(Node, object_) == 0);
42  return reinterpret_cast<Node*>(location);
43  }

References DCHECK, location(), object_, and OFFSET_OF.

Referenced by v8::internal::GlobalHandles::AddObjectGroup(), v8::internal::GlobalHandles::ClearWeakness(), v8::internal::GlobalHandles::CopyGlobal(), v8::internal::GlobalHandles::Destroy(), v8::internal::GlobalHandles::IsIndependent(), v8::internal::GlobalHandles::IsNearDeath(), v8::internal::GlobalHandles::IsWeak(), v8::internal::GlobalHandles::MakeWeak(), v8::internal::GlobalHandles::MarkIndependent(), v8::internal::GlobalHandles::MarkPartiallyDependent(), v8::internal::GlobalHandles::SetReference(), and v8::internal::GlobalHandles::SetReferenceFromGroup().

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

◆ GetGlobalHandles()

GlobalHandles * v8::internal::GlobalHandles::Node::GetGlobalHandles ( )
inline

Definition at line 365 of file global-handles.cc.

365  {
366  return FindBlock()->global_handles();
367 }

References FindBlock(), and v8::internal::GlobalHandles::NodeBlock::global_handles().

Referenced by v8::internal::GlobalHandles::CopyGlobal(), and MarkPartiallyDependent().

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

◆ handle()

Handle<Object> v8::internal::GlobalHandles::Node::handle ( )
inline

Definition at line 110 of file global-handles.cc.

110 { return Handle<Object>(location()); }

References location().

Referenced by v8::internal::GlobalHandles::Create(), and PostGarbageCollectionProcessing().

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

◆ has_wrapper_class_id()

bool v8::internal::GlobalHandles::Node::has_wrapper_class_id ( ) const
inline

Definition at line 113 of file global-handles.cc.

113  {
115  }

References class_id_, and v8::HeapProfiler::kPersistentHandleNoClassId.

Referenced by v8::internal::GlobalHandles::IterateAllRootsInNewSpaceWithClassIds().

+ Here is the caller graph for this function:

◆ IncreaseBlockUses()

void v8::internal::GlobalHandles::Node::IncreaseBlockUses ( )
inlineprivate

Definition at line 379 of file global-handles.cc.

379  {
380  NodeBlock* node_block = FindBlock();
381  node_block->IncreaseUses();
382  GlobalHandles* global_handles = node_block->global_handles();
383  global_handles->isolate()->counters()->global_handles()->Increment();
384  global_handles->number_of_global_handles_++;
385 }

References v8::internal::Isolate::counters(), v8::internal::GlobalHandles::NodeBlock::global_handles(), v8::internal::GlobalHandles::NodeBlock::IncreaseUses(), v8::internal::GlobalHandles::isolate(), and v8::internal::GlobalHandles::number_of_global_handles_.

Referenced by Acquire().

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

◆ Initialize()

void v8::internal::GlobalHandles::Node::Initialize ( int  index,
Node **  first_free 
)
inline

Definition at line 74 of file global-handles.cc.

74  {
75  index_ = static_cast<uint8_t>(index);
76  DCHECK(static_cast<int>(index_) == index);
77  set_state(FREE);
78  set_in_new_space_list(false);
79  parameter_or_next_free_.next_free = *first_free;
80  *first_free = this;
81  }

References DCHECK, FREE, index_, parameter_or_next_free_, set_in_new_space_list(), and set_state().

Referenced by v8::internal::GlobalHandles::NodeBlock::PutNodesOnFreeList().

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

◆ is_in_new_space_list()

bool v8::internal::GlobalHandles::Node::is_in_new_space_list ( )
inline

Definition at line 142 of file global-handles.cc.

142  {
144  }
static T decode(U value)
Definition: utils.h:228

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and flags_.

Referenced by v8::internal::GlobalHandles::Create(), v8::internal::GlobalHandles::IdentifyNewSpaceWeakIndependentHandles(), v8::internal::GlobalHandles::IterateNewSpaceWeakIndependentRoots(), and v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ is_independent()

bool v8::internal::GlobalHandles::Node::is_independent ( )
inline

Definition at line 128 of file global-handles.cc.

128  {
130  }

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and flags_.

Referenced by v8::internal::GlobalHandles::IdentifyNewSpaceWeakIndependentHandles(), v8::internal::GlobalHandles::IsIndependent(), v8::internal::GlobalHandles::IterateNewSpaceStrongAndDependentRoots(), v8::internal::GlobalHandles::IterateNewSpaceWeakIndependentRoots(), and v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ is_partially_dependent()

bool v8::internal::GlobalHandles::Node::is_partially_dependent ( )
inline

Definition at line 135 of file global-handles.cc.

135  {
137  }

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and flags_.

Referenced by v8::internal::GlobalHandles::IdentifyNewSpaceWeakIndependentHandles(), v8::internal::GlobalHandles::IterateNewSpaceStrongAndDependentRoots(), v8::internal::GlobalHandles::IterateNewSpaceWeakIndependentRoots(), and v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ IsNearDeath()

bool v8::internal::GlobalHandles::Node::IsNearDeath ( ) const
inline

Definition at line 149 of file global-handles.cc.

149  {
150  // Check for PENDING to ensure correct answer when processing callbacks.
151  return state() == PENDING || state() == NEAR_DEATH;
152  }

References NEAR_DEATH, PENDING, and state().

Referenced by v8::internal::GlobalHandles::IsNearDeath().

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

◆ IsRetainer()

bool v8::internal::GlobalHandles::Node::IsRetainer ( ) const
inline

Definition at line 156 of file global-handles.cc.

156 { return state() != FREE; }

References FREE, and state().

Referenced by v8::internal::GlobalHandles::IterateAllRootsInNewSpaceWithClassIds(), and v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ IsStrongRetainer()

bool v8::internal::GlobalHandles::Node::IsStrongRetainer ( ) const
inline

Definition at line 158 of file global-handles.cc.

158 { return state() == NORMAL; }

References NORMAL, and state().

Referenced by v8::internal::GlobalHandles::IterateNewSpaceStrongAndDependentRoots().

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

◆ IsWeak()

bool v8::internal::GlobalHandles::Node::IsWeak ( ) const
inline

Definition at line 154 of file global-handles.cc.

154 { return state() == WEAK; }

References state(), and WEAK.

Referenced by v8::internal::GlobalHandles::IdentifyNewSpaceWeakIndependentHandles(), and v8::internal::GlobalHandles::IsWeak().

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

◆ IsWeakRetainer()

bool v8::internal::GlobalHandles::Node::IsWeakRetainer ( ) const
inline

Definition at line 160 of file global-handles.cc.

160  {
161  return state() == WEAK || state() == PENDING || state() == NEAR_DEATH;
162  }

References NEAR_DEATH, PENDING, state(), and WEAK.

Referenced by v8::internal::GlobalHandles::IterateNewSpaceStrongAndDependentRoots(), and v8::internal::GlobalHandles::IterateNewSpaceWeakIndependentRoots().

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

◆ location()

Object** v8::internal::GlobalHandles::Node::location ( )
inline

◆ MakeWeak()

void v8::internal::GlobalHandles::Node::MakeWeak ( void *  parameter,
WeakCallback  weak_callback 
)
inline

Definition at line 207 of file global-handles.cc.

207  {
208  DCHECK(weak_callback != NULL);
209  DCHECK(state() != FREE);
210  CHECK(object_ != NULL);
211  set_state(WEAK);
213  weak_callback_ = weak_callback;
214  }
#define CHECK(condition)
Definition: logging.h:36

References CHECK, DCHECK, FREE, NULL, object_, parameter, set_parameter(), set_state(), state(), WEAK, and weak_callback_.

Referenced by v8::internal::GlobalHandles::MakeWeak().

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

◆ MarkIndependent()

void v8::internal::GlobalHandles::Node::MarkIndependent ( )
inline

Definition at line 170 of file global-handles.cc.

170  {
171  DCHECK(state() != FREE);
172  set_independent(true);
173  }

References DCHECK, FREE, set_independent(), and state().

Referenced by v8::internal::GlobalHandles::MarkIndependent().

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

◆ MarkPartiallyDependent()

void v8::internal::GlobalHandles::Node::MarkPartiallyDependent ( )
inline

Definition at line 175 of file global-handles.cc.

175  {
176  DCHECK(state() != FREE);
177  if (GetGlobalHandles()->isolate()->heap()->InNewSpace(object_)) {
179  }
180  }

References DCHECK, FREE, GetGlobalHandles(), v8::internal::GlobalHandles::isolate(), object_, set_partially_dependent(), and state().

Referenced by v8::internal::GlobalHandles::MarkPartiallyDependent().

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

◆ MarkPending()

void v8::internal::GlobalHandles::Node::MarkPending ( )
inline

Definition at line 164 of file global-handles.cc.

164  {
165  DCHECK(state() == WEAK);
167  }

References DCHECK, PENDING, set_state(), state(), and WEAK.

Referenced by v8::internal::GlobalHandles::IdentifyNewSpaceWeakIndependentHandles().

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

◆ next_free()

Node* v8::internal::GlobalHandles::Node::next_free ( )
inline

Definition at line 198 of file global-handles.cc.

198  {
199  DCHECK(state() == FREE);
200  return parameter_or_next_free_.next_free;
201  }

References DCHECK, FREE, parameter_or_next_free_, and state().

+ Here is the call graph for this function:

◆ object()

Object* v8::internal::GlobalHandles::Node::object ( ) const
inline

Definition at line 108 of file global-handles.cc.

108 { return object_; }

References object_.

Referenced by Acquire(), and v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

+ Here is the caller graph for this function:

◆ parameter()

void* v8::internal::GlobalHandles::Node::parameter ( ) const
inline

Definition at line 192 of file global-handles.cc.

192  {
193  DCHECK(state() != FREE);
194  return parameter_or_next_free_.parameter;
195  }

References DCHECK, FREE, parameter_or_next_free_, and state().

+ Here is the call graph for this function:

◆ PostGarbageCollectionProcessing()

bool v8::internal::GlobalHandles::Node::PostGarbageCollectionProcessing ( Isolate isolate)
inline

Definition at line 224 of file global-handles.cc.

224  {
225  if (state() != Node::PENDING) return false;
226  if (weak_callback_ == NULL) {
227  Release();
228  return false;
229  }
230  void* par = parameter();
233 
234  Object** object = location();
235  {
236  // Check that we are not passing a finalized external string to
237  // the callback.
238  DCHECK(!object_->IsExternalOneByteString() ||
239  ExternalOneByteString::cast(object_)->resource() != NULL);
240  DCHECK(!object_->IsExternalTwoByteString() ||
241  ExternalTwoByteString::cast(object_)->resource() != NULL);
242  // Leaving V8.
243  VMState<EXTERNAL> state(isolate);
244  HandleScope handle_scope(isolate);
245  Handle<Object> handle(*object, isolate);
247  reinterpret_cast<v8::Isolate*>(isolate),
249  par);
250  weak_callback_(data);
251  }
252  // Absence of explicit cleanup or revival of weak handle
253  // in most of the cases would lead to memory leak.
254  CHECK(state() != NEAR_DEATH);
255  return true;
256  }
Isolate represents an isolated instance of the V8 engine.
Definition: v8.h:4356
static Local< Context > ToLocal(v8::internal::Handle< v8::internal::Context > obj)
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References CHECK, DCHECK, handle(), v8::internal::GlobalHandles::isolate(), location(), NEAR_DEATH, NULL, object_, parameter, PENDING, Release(), set_parameter(), set_state(), state(), v8::Utils::ToLocal(), and weak_callback_.

Referenced by v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ Release()

void v8::internal::GlobalHandles::Node::Release ( )
inline

Definition at line 95 of file global-handles.cc.

95  {
96  DCHECK(state() != FREE);
97  set_state(FREE);
98  // Zap the values for eager trapping.
99  object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue);
101  set_independent(false);
105  }
const Address kGlobalHandleZapValue
Definition: globals.h:271

References class_id_, DCHECK, DecreaseBlockUses(), FREE, v8::internal::kGlobalHandleZapValue, v8::HeapProfiler::kPersistentHandleNoClassId, NULL, object_, set_independent(), set_partially_dependent(), set_state(), state(), and weak_callback_.

Referenced by v8::internal::GlobalHandles::Destroy(), and PostGarbageCollectionProcessing().

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

◆ set_in_new_space_list()

void v8::internal::GlobalHandles::Node::set_in_new_space_list ( bool  v)
inline

Definition at line 145 of file global-handles.cc.

145  {
147  }
static U update(U previous, T value)
Definition: utils.h:223

References flags_, and v8::internal::BitFieldBase< T, shift, size, U >::update().

Referenced by v8::internal::GlobalHandles::Create(), Initialize(), and v8::internal::GlobalHandles::PostGarbageCollectionProcessing().

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

◆ set_independent()

void v8::internal::GlobalHandles::Node::set_independent ( bool  v)
inline

Definition at line 131 of file global-handles.cc.

131  {
133  }

References flags_, and v8::internal::BitFieldBase< T, shift, size, U >::update().

Referenced by Acquire(), MarkIndependent(), and Release().

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

◆ set_next_free()

void v8::internal::GlobalHandles::Node::set_next_free ( Node value)
inline

Definition at line 202 of file global-handles.cc.

202  {
203  DCHECK(state() == FREE);
204  parameter_or_next_free_.next_free = value;
205  }

References DCHECK, FREE, parameter_or_next_free_, and state().

+ Here is the call graph for this function:

◆ set_parameter()

void v8::internal::GlobalHandles::Node::set_parameter ( void *  parameter)
inline

Definition at line 188 of file global-handles.cc.

188  {
189  DCHECK(state() != FREE);
191  }

References DCHECK, FREE, parameter, parameter_or_next_free_, and state().

Referenced by ClearWeakness(), MakeWeak(), and PostGarbageCollectionProcessing().

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

◆ set_partially_dependent()

void v8::internal::GlobalHandles::Node::set_partially_dependent ( bool  v)
inline

Definition at line 138 of file global-handles.cc.

138  {
140  }

References flags_, and v8::internal::BitFieldBase< T, shift, size, U >::update().

Referenced by Acquire(), clear_partially_dependent(), MarkPartiallyDependent(), and Release().

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

◆ set_state()

void v8::internal::GlobalHandles::Node::set_state ( State  state)
inline

Definition at line 124 of file global-handles.cc.

124  {
126  }

References flags_, state(), and v8::internal::BitFieldBase< T, shift, size, U >::update().

Referenced by Acquire(), ClearWeakness(), Initialize(), MakeWeak(), MarkPending(), PostGarbageCollectionProcessing(), and Release().

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

◆ state()

State v8::internal::GlobalHandles::Node::state ( ) const
inline

Definition at line 121 of file global-handles.cc.

121  {
122  return NodeState::decode(flags_);
123  }

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and flags_.

Referenced by Acquire(), ClearWeakness(), IsNearDeath(), IsRetainer(), IsStrongRetainer(), IsWeak(), IsWeakRetainer(), MakeWeak(), MarkIndependent(), MarkPartiallyDependent(), MarkPending(), next_free(), parameter(), PostGarbageCollectionProcessing(), Release(), set_next_free(), set_parameter(), and set_state().

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

◆ wrapper_class_id()

uint16_t v8::internal::GlobalHandles::Node::wrapper_class_id ( ) const
inline

Definition at line 117 of file global-handles.cc.

117 { return class_id_; }

References class_id_.

Referenced by v8::internal::GlobalHandles::IterateAllRootsInNewSpaceWithClassIds().

+ Here is the caller graph for this function:

Member Data Documentation

◆ class_id_

uint16_t v8::internal::GlobalHandles::Node::class_id_
private

Definition at line 273 of file global-handles.cc.

Referenced by Acquire(), has_wrapper_class_id(), Node(), Release(), and wrapper_class_id().

◆ flags_

uint8_t v8::internal::GlobalHandles::Node::flags_
private

◆ index_

uint8_t v8::internal::GlobalHandles::Node::index_
private

Definition at line 276 of file global-handles.cc.

Referenced by Initialize().

◆ next_free

Node* v8::internal::GlobalHandles::Node::next_free

Definition at line 294 of file global-handles.cc.

Referenced by v8::internal::GlobalHandles::Create().

◆ object_

Object* v8::internal::GlobalHandles::Node::object_
private

◆ parameter

void* v8::internal::GlobalHandles::Node::parameter

◆ 

union { ... } v8::internal::GlobalHandles::Node::parameter_or_next_free_

◆ weak_callback_

WeakCallback v8::internal::GlobalHandles::Node::weak_callback_
private

Definition at line 288 of file global-handles.cc.

Referenced by Acquire(), MakeWeak(), PostGarbageCollectionProcessing(), and Release().


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