V8 Project
v8::internal::WeakListVisitor< Context > Struct Reference
+ Collaboration diagram for v8::internal::WeakListVisitor< Context >:

Static Public Member Functions

static void SetWeakNext (Context *context, Object *next)
 
static ObjectWeakNext (Context *context)
 
static int WeakNextOffset ()
 
static void VisitLiveObject (Heap *heap, Context *context, WeakObjectRetainer *retainer)
 
template<class T >
static void DoWeakList (Heap *heap, Context *context, WeakObjectRetainer *retainer, int index)
 
static void VisitPhantomObject (Heap *heap, Context *context)
 

Detailed Description

Definition at line 285 of file objects-visiting.cc.

Member Function Documentation

◆ DoWeakList()

template<class T >
static void v8::internal::WeakListVisitor< Context >::DoWeakList ( Heap heap,
Context context,
WeakObjectRetainer retainer,
int  index 
)
inlinestatic

Definition at line 308 of file objects-visiting.cc.

309  {
310  // Visit the weak list, removing dead intermediate elements.
311  Object* list_head = VisitWeakList<T>(heap, context->get(index), retainer);
312 
313  // Update the list head.
314  context->set(index, list_head, UPDATE_WRITE_BARRIER);
315 
316  if (MustRecordSlots(heap)) {
317  // Record the updated slot if necessary.
318  Object** head_slot =
319  HeapObject::RawField(context, FixedArray::SizeFor(index));
320  heap->mark_compact_collector()->RecordSlot(head_slot, head_slot,
321  list_head);
322  }
323  }
static int SizeFor(int length)
Definition: objects.h:2452
static Object ** RawField(HeapObject *obj, int offset)
Definition: objects-inl.h:1311
@ UPDATE_WRITE_BARRIER
Definition: objects.h:235
static bool MustRecordSlots(Heap *heap)
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References v8::internal::FixedArray::get(), v8::internal::Heap::mark_compact_collector(), v8::internal::MustRecordSlots(), v8::internal::HeapObject::RawField(), v8::internal::FixedArray::set(), v8::internal::FixedArray::SizeFor(), and v8::internal::UPDATE_WRITE_BARRIER.

+ Here is the call graph for this function:

◆ SetWeakNext()

static void v8::internal::WeakListVisitor< Context >::SetWeakNext ( Context context,
Object next 
)
inlinestatic

Definition at line 286 of file objects-visiting.cc.

286  {
288  }

References v8::internal::Context::NEXT_CONTEXT_LINK, v8::internal::FixedArray::set(), and v8::internal::UPDATE_WRITE_BARRIER.

+ Here is the call graph for this function:

◆ VisitLiveObject()

static void v8::internal::WeakListVisitor< Context >::VisitLiveObject ( Heap heap,
Context context,
WeakObjectRetainer retainer 
)
inlinestatic

Definition at line 298 of file objects-visiting.cc.

299  {
300  // Process the three weak lists linked off the context.
301  DoWeakList<JSFunction>(heap, context, retainer,
303  DoWeakList<Code>(heap, context, retainer, Context::OPTIMIZED_CODE_LIST);
304  DoWeakList<Code>(heap, context, retainer, Context::DEOPTIMIZED_CODE_LIST);
305  }

References v8::internal::Context::DEOPTIMIZED_CODE_LIST, v8::internal::Context::OPTIMIZED_CODE_LIST, and v8::internal::Context::OPTIMIZED_FUNCTIONS_LIST.

◆ VisitPhantomObject()

static void v8::internal::WeakListVisitor< Context >::VisitPhantomObject ( Heap heap,
Context context 
)
inlinestatic

Definition at line 325 of file objects-visiting.cc.

325  {
326  ClearWeakList<JSFunction>(heap,
327  context->get(Context::OPTIMIZED_FUNCTIONS_LIST));
328  ClearWeakList<Code>(heap, context->get(Context::OPTIMIZED_CODE_LIST));
329  ClearWeakList<Code>(heap, context->get(Context::DEOPTIMIZED_CODE_LIST));
330  }

References v8::internal::Context::DEOPTIMIZED_CODE_LIST, v8::internal::FixedArray::get(), v8::internal::Context::OPTIMIZED_CODE_LIST, and v8::internal::Context::OPTIMIZED_FUNCTIONS_LIST.

+ Here is the call graph for this function:

◆ WeakNext()

static Object* v8::internal::WeakListVisitor< Context >::WeakNext ( Context context)
inlinestatic

Definition at line 290 of file objects-visiting.cc.

290  {
291  return context->get(Context::NEXT_CONTEXT_LINK);
292  }

References v8::internal::FixedArray::get(), and v8::internal::Context::NEXT_CONTEXT_LINK.

+ Here is the call graph for this function:

◆ WeakNextOffset()

static int v8::internal::WeakListVisitor< Context >::WeakNextOffset ( )
inlinestatic

Definition at line 294 of file objects-visiting.cc.

294  {
296  }

References v8::internal::Context::NEXT_CONTEXT_LINK, and v8::internal::FixedArray::SizeFor().

+ Here is the call graph for this function:

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