v8  3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MarkCompactCollector Class Reference

#include <mark-compact.h>

Public Types

enum  CompactionMode { INCREMENTAL_COMPACTION, NON_INCREMENTAL_COMPACTION }
 
enum  SweeperType { CONSERVATIVE, LAZY_CONSERVATIVE, PRECISE }
 
typedef MaybeObject *(* AllocationFunction )(Heap *heap, HeapObject *object, int object_size)
 
typedef void(* EncodingFunction )(Heap *heap, HeapObject *old_object, int object_size, Object *new_object, int *offset)
 
typedef void(* ProcessNonLiveFunction )(HeapObject *object, Isolate *isolate)
 
typedef int(MarkCompactCollector::* LiveObjectCallback )(HeapObject *obj)
 

Public Member Functions

void SetFlags (int flags)
 
void CollectEvacuationCandidates (PagedSpace *space)
 
void AddEvacuationCandidate (Page *p)
 
void Prepare (GCTracer *tracer)
 
void CollectGarbage ()
 
bool StartCompaction (CompactionMode mode)
 
void AbortCompaction ()
 
GCTracer * tracer ()
 
Heapheap () const
 
CodeFlushercode_flusher ()
 
bool is_code_flushing_enabled () const
 
void EnableCodeFlushing (bool enable)
 
 INLINE (static bool ShouldSkipEvacuationSlotRecording(Object **anchor))
 
 INLINE (static bool ShouldSkipEvacuationSlotRecording(Object *host))
 
 INLINE (static bool IsOnEvacuationCandidate(Object *obj))
 
void EvictEvacuationCandidate (Page *page)
 
void RecordRelocSlot (RelocInfo *rinfo, Object *target)
 
void RecordCodeEntrySlot (Address slot, Code *target)
 
 INLINE (void RecordSlot(Object **anchor_slot, Object **slot, Object *object))
 
void MigrateObject (Address dst, Address src, int size, AllocationSpace to_old_space)
 
bool TryPromoteObject (HeapObject *object, int object_size)
 
Objectencountered_weak_maps ()
 
void set_encountered_weak_maps (Object *weak_map)
 
void InvalidateCode (Code *code)
 
void ClearMarkbits ()
 
bool is_compacting () const
 

Static Public Member Functions

static void Initialize ()
 
static void ReportDeleteIfNeeded (HeapObject *obj, Isolate *isolate)
 
static bool IsMarked (Object *obj)
 
static intptr_t SweepConservatively (PagedSpace *space, Page *p)
 

Static Public Attributes

static const uint32_t kSingleFreeEncoding = 0
 
static const uint32_t kMultiFreeEncoding = 1
 

Friends

class RootMarkingVisitor
 
class MarkingVisitor
 
class StaticMarkingVisitor
 
class CodeMarkingVisitor
 
class SharedFunctionInfoMarkingVisitor
 
class Marker< IncrementalMarking >
 
class Marker< MarkCompactCollector >
 
class Heap
 

Detailed Description

Definition at line 420 of file mark-compact.h.

Member Typedef Documentation

typedef MaybeObject*(* AllocationFunction)(Heap *heap, HeapObject *object, int object_size)

Definition at line 427 of file mark-compact.h.

typedef void(* EncodingFunction)(Heap *heap, HeapObject *old_object, int object_size, Object *new_object, int *offset)

Definition at line 439 of file mark-compact.h.

typedef int(MarkCompactCollector::* LiveObjectCallback)(HeapObject *obj)

Definition at line 449 of file mark-compact.h.

typedef void(* ProcessNonLiveFunction)(HeapObject *object, Isolate *isolate)

Definition at line 446 of file mark-compact.h.

Member Enumeration Documentation

Enumerator
INCREMENTAL_COMPACTION 
NON_INCREMENTAL_COMPACTION 

Definition at line 467 of file mark-compact.h.

Enumerator
CONSERVATIVE 
LAZY_CONSERVATIVE 
PRECISE 

Definition at line 502 of file mark-compact.h.

Member Function Documentation

void AddEvacuationCandidate ( Page p)
CodeFlusher* code_flusher ( )
inline

Definition at line 498 of file mark-compact.h.

void CollectGarbage ( )
void EnableCodeFlushing ( bool  enable)

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

References MarkCompactCollector::heap(), and v8::internal::NULL.

Object* encountered_weak_maps ( )
inline

Definition at line 566 of file mark-compact.h.

void Initialize ( )
static

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

References StaticMarkingVisitor::Initialize().

INLINE ( static bool   ShouldSkipEvacuationSlotRecordingObject **anchor)
inline

Definition at line 518 of file mark-compact.h.

References MemoryChunk::FromAddress().

INLINE ( static bool   ShouldSkipEvacuationSlotRecordingObject *host)
inline

Definition at line 523 of file mark-compact.h.

References MemoryChunk::FromAddress().

INLINE ( static bool   IsOnEvacuationCandidateObject *obj)
inline

Definition at line 528 of file mark-compact.h.

References MemoryChunk::FromAddress().

INLINE ( void   RecordSlotObject **anchor_slot, Object **slot, Object *object)
bool is_code_flushing_enabled ( ) const
inline

Definition at line 499 of file mark-compact.h.

References v8::internal::NULL.

bool is_compacting ( ) const
inline

Definition at line 575 of file mark-compact.h.

Referenced by Heap::ProcessWeakReferences().

bool IsMarked ( Object obj)
inlinestatic

Definition at line 95 of file mark-compact-inl.h.

References ASSERT, HeapObject::cast(), MarkBit::Get(), and Marking::MarkBitFrom().

void ReportDeleteIfNeeded ( HeapObject obj,
Isolate isolate 
)
static

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

References HeapObject::address(), and PROFILE.

Referenced by LargeObjectSpace::FreeUnmarkedObjects().

void set_encountered_weak_maps ( Object weak_map)
inline

Definition at line 567 of file mark-compact.h.

GCTracer* tracer ( )
inline

Friends And Related Function Documentation

friend class CodeMarkingVisitor
friend

Definition at line 640 of file mark-compact.h.

friend class Heap
friend

Definition at line 787 of file mark-compact.h.

friend class Marker< IncrementalMarking >
friend

Definition at line 642 of file mark-compact.h.

friend class Marker< MarkCompactCollector >
friend

Definition at line 643 of file mark-compact.h.

friend class MarkingVisitor
friend

Definition at line 638 of file mark-compact.h.

friend class RootMarkingVisitor
friend

Definition at line 637 of file mark-compact.h.

friend class SharedFunctionInfoMarkingVisitor
friend

Definition at line 641 of file mark-compact.h.

friend class StaticMarkingVisitor
friend

Definition at line 639 of file mark-compact.h.

Field Documentation

const uint32_t kMultiFreeEncoding = 1
static

Definition at line 492 of file mark-compact.h.

const uint32_t kSingleFreeEncoding = 0
static

Definition at line 491 of file mark-compact.h.


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