V8 Project
v8::internal::SemiSpaceIterator Class Reference

#include <spaces.h>

+ Inheritance diagram for v8::internal::SemiSpaceIterator:
+ Collaboration diagram for v8::internal::SemiSpaceIterator:

Public Member Functions

 SemiSpaceIterator (NewSpace *space)
 
 SemiSpaceIterator (NewSpace *space, HeapObjectCallback size_func)
 
 SemiSpaceIterator (NewSpace *space, Address start)
 
 SemiSpaceIterator (Address from, Address to)
 
HeapObjectNext ()
 
virtual HeapObjectnext_object ()
 
- Public Member Functions inherited from v8::internal::ObjectIterator
virtual ~ObjectIterator ()
 
- Public Member Functions inherited from v8::internal::Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Private Member Functions

void Initialize (Address start, Address end, HeapObjectCallback size_func)
 

Private Attributes

Address current_
 
Address limit_
 
HeapObjectCallback size_func_
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::Malloced
static void FatalProcessOutOfMemory ()
 
static void * New (size_t size)
 
static void Delete (void *p)
 

Detailed Description

Definition at line 2233 of file spaces.h.

Constructor & Destructor Documentation

◆ SemiSpaceIterator() [1/4]

v8::internal::SemiSpaceIterator::SemiSpaceIterator ( NewSpace space)
explicit

Definition at line 1735 of file spaces.cc.

1735  {
1736  Initialize(space->bottom(), space->top(), NULL);
1737 }
void Initialize(Address start, Address end, HeapObjectCallback size_func)
Definition: spaces.cc:1756
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi space(in MBytes)
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 Initialize(), NULL, and space().

+ Here is the call graph for this function:

◆ SemiSpaceIterator() [2/4]

v8::internal::SemiSpaceIterator::SemiSpaceIterator ( NewSpace space,
HeapObjectCallback  size_func 
)

Definition at line 1740 of file spaces.cc.

1741  {
1742  Initialize(space->bottom(), space->top(), size_func);
1743 }

References Initialize(), and space().

+ Here is the call graph for this function:

◆ SemiSpaceIterator() [3/4]

v8::internal::SemiSpaceIterator::SemiSpaceIterator ( NewSpace space,
Address  start 
)

Definition at line 1746 of file spaces.cc.

1746  {
1747  Initialize(start, space->top(), NULL);
1748 }

References Initialize(), NULL, and space().

+ Here is the call graph for this function:

◆ SemiSpaceIterator() [4/4]

v8::internal::SemiSpaceIterator::SemiSpaceIterator ( Address  from,
Address  to 
)

Definition at line 1751 of file spaces.cc.

1751  {
1752  Initialize(from, to, NULL);
1753 }
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file

References Initialize(), NULL, and to().

+ Here is the call graph for this function:

Member Function Documentation

◆ Initialize()

void v8::internal::SemiSpaceIterator::Initialize ( Address  start,
Address  end,
HeapObjectCallback  size_func 
)
private

Definition at line 1756 of file spaces.cc.

1757  {
1758  SemiSpace::AssertValidRange(start, end);
1759  current_ = start;
1760  limit_ = end;
1761  size_func_ = size_func;
1762 }
HeapObjectCallback size_func_
Definition: spaces.h:2277
static void AssertValidRange(Address from, Address to)
Definition: spaces.h:2165

References v8::internal::SemiSpace::AssertValidRange(), current_, limit_, and size_func_.

Referenced by SemiSpaceIterator().

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

◆ Next()

HeapObject* v8::internal::SemiSpaceIterator::Next ( )
inline

Definition at line 2249 of file spaces.h.

2249  {
2250  if (current_ == limit_) return NULL;
2252  NewSpacePage* page = NewSpacePage::FromLimit(current_);
2253  page = page->next_page();
2254  DCHECK(!page->is_anchor());
2255  current_ = page->area_start();
2256  if (current_ == limit_) return NULL;
2257  }
2258 
2259  HeapObject* object = HeapObject::FromAddress(current_);
2260  int size = (size_func_ == NULL) ? object->Size() : size_func_(object);
2261 
2262  current_ += size;
2263  return object;
2264  }
static HeapObject * FromAddress(Address address)
Definition: objects-inl.h:1464
static bool IsAtEnd(Address addr)
Definition: spaces.h:2014
static NewSpacePage * FromLimit(Address address_limit)
Definition: spaces.h:2031
enable harmony numeric enable harmony object literal extensions Optimize object size
#define DCHECK(condition)
Definition: logging.h:205

References v8::internal::MemoryChunk::area_start(), current_, DCHECK, v8::internal::HeapObject::FromAddress(), v8::internal::NewSpacePage::FromLimit(), v8::internal::NewSpacePage::is_anchor(), v8::internal::NewSpacePage::IsAtEnd(), limit_, v8::internal::NewSpacePage::next_page(), NULL, size, v8::internal::HeapObject::Size(), and size_func_.

Referenced by v8::internal::NewSpace::CollectStatistics(), v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), and next_object().

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

◆ next_object()

virtual HeapObject* v8::internal::SemiSpaceIterator::next_object ( )
inlinevirtual

Implements v8::internal::ObjectIterator.

Definition at line 2267 of file spaces.h.

2267 { return Next(); }

References Next().

+ Here is the call graph for this function:

Member Data Documentation

◆ current_

Address v8::internal::SemiSpaceIterator::current_
private

Definition at line 2273 of file spaces.h.

Referenced by Initialize(), and Next().

◆ limit_

Address v8::internal::SemiSpaceIterator::limit_
private

Definition at line 2275 of file spaces.h.

Referenced by Initialize(), and Next().

◆ size_func_

HeapObjectCallback v8::internal::SemiSpaceIterator::size_func_
private

Definition at line 2277 of file spaces.h.

Referenced by Initialize(), and Next().


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