V8 Project
v8::internal::PointersUpdatingVisitor Class Reference
+ Inheritance diagram for v8::internal::PointersUpdatingVisitor:
+ Collaboration diagram for v8::internal::PointersUpdatingVisitor:

Public Member Functions

 PointersUpdatingVisitor (Heap *heap)
 
void VisitPointer (Object **p)
 
void VisitPointers (Object **start, Object **end)
 
void VisitEmbeddedPointer (RelocInfo *rinfo)
 
void VisitCodeTarget (RelocInfo *rinfo)
 
void VisitCodeAgeSequence (RelocInfo *rinfo)
 
void VisitDebugTarget (RelocInfo *rinfo)
 

Static Public Member Functions

static void UpdateSlot (Heap *heap, Object **slot)
 

Private Member Functions

void UpdatePointer (Object **p)
 

Private Attributes

Heapheap_
 

Detailed Description

Definition at line 2961 of file mark-compact.cc.

Constructor & Destructor Documentation

◆ PointersUpdatingVisitor()

v8::internal::PointersUpdatingVisitor::PointersUpdatingVisitor ( Heap heap)
inlineexplicit

Definition at line 2963 of file mark-compact.cc.

Member Function Documentation

◆ UpdatePointer()

void v8::internal::PointersUpdatingVisitor::UpdatePointer ( Object **  p)
inlineprivate

Definition at line 3032 of file mark-compact.cc.

3032 { UpdateSlot(heap_, p); }
static void UpdateSlot(Heap *heap, Object **slot)

References heap_, and UpdateSlot().

Referenced by VisitPointer(), and VisitPointers().

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

◆ UpdateSlot()

static void v8::internal::PointersUpdatingVisitor::UpdateSlot ( Heap heap,
Object **  slot 
)
inlinestatic

Definition at line 3013 of file mark-compact.cc.

3013  {
3014  Object* obj = *slot;
3015 
3016  if (!obj->IsHeapObject()) return;
3017 
3018  HeapObject* heap_obj = HeapObject::cast(obj);
3019 
3020  MapWord map_word = heap_obj->map_word();
3021  if (map_word.IsForwardingAddress()) {
3022  DCHECK(heap->InFromSpace(heap_obj) ||
3023  MarkCompactCollector::IsOnEvacuationCandidate(heap_obj));
3024  HeapObject* target = map_word.ToForwardingAddress();
3025  *slot = target;
3026  DCHECK(!heap->InFromSpace(target) &&
3027  !MarkCompactCollector::IsOnEvacuationCandidate(target));
3028  }
3029  }
#define DCHECK(condition)
Definition: logging.h:205
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References DCHECK, v8::internal::Heap::InFromSpace(), and v8::internal::HeapObject::map_word().

Referenced by UpdatePointer(), v8::internal::SlotsBuffer::UpdateSlots(), and v8::internal::SlotsBuffer::UpdateSlotsWithFilter().

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

◆ VisitCodeAgeSequence()

void v8::internal::PointersUpdatingVisitor::VisitCodeAgeSequence ( RelocInfo rinfo)
inline

Definition at line 2993 of file mark-compact.cc.

2993  {
2994  DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode()));
2995  Object* stub = rinfo->code_age_stub();
2996  DCHECK(stub != NULL);
2997  VisitPointer(&stub);
2998  if (stub != rinfo->code_age_stub()) {
2999  rinfo->set_code_age_stub(Code::cast(stub));
3000  }
3001  }
static bool IsCodeAgeSequence(Mode mode)
Definition: assembler.h:442
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 DCHECK, v8::internal::RelocInfo::IsCodeAgeSequence(), NULL, v8::internal::RelocInfo::rmode(), and VisitPointer().

+ Here is the call graph for this function:

◆ VisitCodeTarget()

void v8::internal::PointersUpdatingVisitor::VisitCodeTarget ( RelocInfo rinfo)
inline

Definition at line 2983 of file mark-compact.cc.

2983  {
2984  DCHECK(RelocInfo::IsCodeTarget(rinfo->rmode()));
2985  Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
2986  Object* old_target = target;
2987  VisitPointer(&target);
2988  if (target != old_target) {
2989  rinfo->set_target_address(Code::cast(target)->instruction_start());
2990  }
2991  }
static Code * GetCodeFromTargetAddress(Address address)
Definition: objects-inl.h:5018
static bool IsCodeTarget(Mode mode)
Definition: assembler.h:399

References DCHECK, v8::internal::Code::GetCodeFromTargetAddress(), v8::internal::RelocInfo::IsCodeTarget(), v8::internal::RelocInfo::rmode(), and VisitPointer().

+ Here is the call graph for this function:

◆ VisitDebugTarget()

void v8::internal::PointersUpdatingVisitor::VisitDebugTarget ( RelocInfo rinfo)
inline

Definition at line 3003 of file mark-compact.cc.

3003  {
3004  DCHECK((RelocInfo::IsJSReturn(rinfo->rmode()) &&
3005  rinfo->IsPatchedReturnSequence()) ||
3006  (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) &&
3007  rinfo->IsPatchedDebugBreakSlotSequence()));
3008  Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
3009  VisitPointer(&target);
3010  rinfo->set_call_address(Code::cast(target)->instruction_start());
3011  }
static bool IsDebugBreakSlot(Mode mode)
Definition: assembler.h:436
static bool IsJSReturn(Mode mode)
Definition: assembler.h:412

References DCHECK, v8::internal::Code::GetCodeFromTargetAddress(), v8::internal::RelocInfo::IsDebugBreakSlot(), v8::internal::RelocInfo::IsJSReturn(), v8::internal::RelocInfo::rmode(), and VisitPointer().

+ Here is the call graph for this function:

◆ VisitEmbeddedPointer()

void v8::internal::PointersUpdatingVisitor::VisitEmbeddedPointer ( RelocInfo rinfo)
inline

Definition at line 2971 of file mark-compact.cc.

2971  {
2972  DCHECK(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
2973  Object* target = rinfo->target_object();
2974  Object* old_target = target;
2975  VisitPointer(&target);
2976  // Avoid unnecessary changes that might unnecessary flush the instruction
2977  // cache.
2978  if (target != old_target) {
2979  rinfo->set_target_object(target);
2980  }
2981  }

References DCHECK, v8::internal::RelocInfo::EMBEDDED_OBJECT, v8::internal::RelocInfo::rmode(), and VisitPointer().

+ Here is the call graph for this function:

◆ VisitPointer()

void v8::internal::PointersUpdatingVisitor::VisitPointer ( Object **  p)
inline

Definition at line 2965 of file mark-compact.cc.

2965 { UpdatePointer(p); }

References UpdatePointer().

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), VisitCodeAgeSequence(), VisitCodeTarget(), VisitDebugTarget(), and VisitEmbeddedPointer().

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

◆ VisitPointers()

void v8::internal::PointersUpdatingVisitor::VisitPointers ( Object **  start,
Object **  end 
)
inline

Definition at line 2967 of file mark-compact.cc.

2967  {
2968  for (Object** p = start; p < end; p++) UpdatePointer(p);
2969  }

References UpdatePointer().

+ Here is the call graph for this function:

Member Data Documentation

◆ heap_

Heap* v8::internal::PointersUpdatingVisitor::heap_
private

Definition at line 3034 of file mark-compact.cc.

Referenced by UpdatePointer().


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