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

#include <heap.h>

Data Structures

class  RelocationLock
 

Public Types

enum  InvocationMode { FROM_GC, FROM_MUTATOR }
 
enum  HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT }
 
enum  ScratchpadSlotMode { IGNORE_SCRATCHPAD_SLOT, RECORD_SCRATCHPAD_SLOT }
 
enum  RootListIndex { kStringTableRootIndex, kRootListLength, kStrongRootListLength = kStringTableRootIndex, kSmiRootsStart = kStringTableRootIndex + 1 }
 
enum  { FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1, FIRST_FIXED_ARRAY_SUB_TYPE, FIRST_CODE_AGE_SUB_TYPE, OBJECT_STATS_COUNT = FIRST_CODE_AGE_SUB_TYPE + Code::kCodeAgeCount + 1 }
 

Public Member Functions

bool ConfigureHeap (int max_semispace_size, intptr_t max_old_gen_size, intptr_t max_executable_size)
 
bool ConfigureHeapDefault ()
 
bool SetUp ()
 
bool CreateHeapObjects ()
 
void TearDown ()
 
void SetStackLimits ()
 
bool HasBeenSetUp ()
 
intptr_t MaxReserved ()
 
int MaxSemiSpaceSize ()
 
int ReservedSemiSpaceSize ()
 
int InitialSemiSpaceSize ()
 
intptr_t MaxOldGenerationSize ()
 
intptr_t MaxExecutableSize ()
 
intptr_t Capacity ()
 
intptr_t CommittedMemory ()
 
intptr_t CommittedMemoryExecutable ()
 
size_t CommittedPhysicalMemory ()
 
intptr_t MaximumCommittedMemory ()
 
void UpdateMaximumCommitted ()
 
intptr_t Available ()
 
intptr_t SizeOfObjects ()
 
Address NewSpaceStart ()
 
uintptr_t NewSpaceMask ()
 
Address NewSpaceTop ()
 
NewSpacenew_space ()
 
OldSpaceold_pointer_space ()
 
OldSpaceold_data_space ()
 
OldSpacecode_space ()
 
MapSpacemap_space ()
 
CellSpacecell_space ()
 
PropertyCellSpaceproperty_cell_space ()
 
LargeObjectSpacelo_space ()
 
PagedSpacepaged_space (int idx)
 
bool always_allocate ()
 
Address always_allocate_scope_depth_address ()
 
bool linear_allocation ()
 
AddressNewSpaceAllocationTopAddress ()
 
AddressNewSpaceAllocationLimitAddress ()
 
AddressOldPointerSpaceAllocationTopAddress ()
 
AddressOldPointerSpaceAllocationLimitAddress ()
 
AddressOldDataSpaceAllocationTopAddress ()
 
AddressOldDataSpaceAllocationLimitAddress ()
 
MUST_USE_RESULT MaybeObject * AllocateJSObject (JSFunction *constructor, PretenureFlag pretenure=NOT_TENURED, AllocationSite *allocation_site=NULL)
 
MUST_USE_RESULT MaybeObject * AllocateJSModule (Context *context, ScopeInfo *scope_info)
 
MUST_USE_RESULT MaybeObject * AllocateEmptyJSArray (ElementsKind elements_kind, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateJSArrayAndStorage (ElementsKind elements_kind, int length, int capacity, ArrayStorageAllocationMode mode=DONT_INITIALIZE_ARRAY_ELEMENTS, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateJSArrayStorage (JSArray *array, int length, int capacity, ArrayStorageAllocationMode mode=DONT_INITIALIZE_ARRAY_ELEMENTS)
 
MUST_USE_RESULT MaybeObject * AllocateJSArrayWithElements (FixedArrayBase *array_base, ElementsKind elements_kind, int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * CopyJSObject (JSObject *source, AllocationSite *site=NULL)
 
MUST_USE_RESULT MaybeObject * AllocateJSArrayBuffer ()
 
MUST_USE_RESULT MaybeObject * AllocateJSProxy (Object *handler, Object *prototype)
 
MUST_USE_RESULT MaybeObject * AllocateJSFunctionProxy (Object *handler, Object *call_trap, Object *construct_trap, Object *prototype)
 
MUST_USE_RESULT MaybeObject * ReinitializeJSReceiver (JSReceiver *object, InstanceType type, int size)
 
MUST_USE_RESULT MaybeObject * ReinitializeJSGlobalProxy (JSFunction *constructor, JSGlobalProxy *global)
 
MUST_USE_RESULT MaybeObject * AllocateJSObjectFromMap (Map *map, PretenureFlag pretenure=NOT_TENURED, bool alloc_props=true, AllocationSite *allocation_site=NULL)
 
MUST_USE_RESULT MaybeObject * Allocate (Map *map, AllocationSpace space, AllocationSite *allocation_site=NULL)
 
MUST_USE_RESULT MaybeObject * AllocateMap (InstanceType instance_type, int instance_size, ElementsKind elements_kind=TERMINAL_FAST_ELEMENTS_KIND)
 
MUST_USE_RESULT MaybeObject * AllocatePartialMap (InstanceType instance_type, int instance_size)
 
MUST_USE_RESULT MaybeObject * AllocateCodeCache ()
 
MUST_USE_RESULT MaybeObject * AllocateScopeInfo (int length)
 
MUST_USE_RESULT MaybeObject * AllocateExternal (void *value)
 
MUST_USE_RESULT MaybeObject * AllocatePolymorphicCodeCache ()
 
MUST_USE_RESULT MaybeObject * AllocateAccessorPair ()
 
MUST_USE_RESULT MaybeObject * AllocateTypeFeedbackInfo ()
 
MUST_USE_RESULT MaybeObject * AllocateAliasedArgumentsEntry (int slot)
 
void ClearInstanceofCache ()
 
void ClearAllICsByKind (Code::Kind kind)
 
void RepairFreeListsAfterBoot ()
 
MUST_USE_RESULT MaybeObject * AllocateStringFromOneByte (Vector< const uint8_t > str, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateStringFromOneByte (Vector< const char > str, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateStringFromUtf8 (Vector< const char > str, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateStringFromUtf8Slow (Vector< const char > str, int non_ascii_start, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateStringFromTwoByte (Vector< const uc16 > str, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateInternalizedStringFromUtf8 (Vector< const char > str, int chars, uint32_t hash_field)
 
MUST_USE_RESULT MaybeObject * AllocateOneByteInternalizedString (Vector< const uint8_t > str, uint32_t hash_field)
 
MUST_USE_RESULT MaybeObject * AllocateTwoByteInternalizedString (Vector< const uc16 > str, uint32_t hash_field)
 
template<typename T >
MUST_USE_RESULT MaybeObject * AllocateInternalizedStringImpl (T t, int chars, uint32_t hash_field)
 
template<bool is_one_byte, typename T >
MUST_USE_RESULT MaybeObject * AllocateInternalizedStringImpl (T t, int chars, uint32_t hash_field)
 
MUST_USE_RESULT MaybeObject * AllocateRawOneByteString (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateRawTwoByteString (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * LookupSingleCharacterStringFromCode (uint16_t code)
 
MUST_USE_RESULT MaybeObject * AllocateByteArray (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateExternalArray (int length, ExternalArrayType array_type, void *external_pointer, PretenureFlag pretenure)
 
MUST_USE_RESULT MaybeObject * AllocateFixedTypedArray (int length, ExternalArrayType array_type, PretenureFlag pretenure)
 
MUST_USE_RESULT MaybeObject * AllocateSymbol ()
 
MUST_USE_RESULT MaybeObject * AllocatePrivateSymbol ()
 
MUST_USE_RESULT MaybeObject * AllocateAllocationSite ()
 
MUST_USE_RESULT MaybeObject * AllocateFixedArray (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateUninitializedFixedArray (int length)
 
void MoveElements (FixedArray *array, int dst_index, int src_index, int len)
 
MUST_USE_RESULT MaybeObject * CopyFixedArray (FixedArray *src)
 
MUST_USE_RESULT MaybeObject * CopyAndTenureFixedCOWArray (FixedArray *src)
 
MUST_USE_RESULT MaybeObject * CopyFixedArrayWithMap (FixedArray *src, Map *map)
 
MUST_USE_RESULT MaybeObject * CopyFixedDoubleArray (FixedDoubleArray *src)
 
MUST_USE_RESULT MaybeObject * CopyFixedDoubleArrayWithMap (FixedDoubleArray *src, Map *map)
 
MUST_USE_RESULT MaybeObject * CopyConstantPoolArray (ConstantPoolArray *src)
 
MUST_USE_RESULT MaybeObject * CopyConstantPoolArrayWithMap (ConstantPoolArray *src, Map *map)
 
MUST_USE_RESULT MaybeObject * AllocateFixedArrayWithHoles (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateConstantPoolArray (int number_of_int64_entries, int number_of_code_ptr_entries, int number_of_heap_ptr_entries, int number_of_int32_entries)
 
MUST_USE_RESULT MaybeObject * AllocateUninitializedFixedDoubleArray (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateFixedDoubleArrayWithHoles (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateHashTable (int length, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateNativeContext ()
 
MUST_USE_RESULT MaybeObject * AllocateGlobalContext (JSFunction *function, ScopeInfo *scope_info)
 
MUST_USE_RESULT MaybeObject * AllocateModuleContext (ScopeInfo *scope_info)
 
MUST_USE_RESULT MaybeObject * AllocateFunctionContext (int length, JSFunction *function)
 
MUST_USE_RESULT MaybeObject * AllocateCatchContext (JSFunction *function, Context *previous, String *name, Object *thrown_object)
 
MUST_USE_RESULT MaybeObject * AllocateWithContext (JSFunction *function, Context *previous, JSReceiver *extension)
 
MUST_USE_RESULT MaybeObject * AllocateBlockContext (JSFunction *function, Context *previous, ScopeInfo *info)
 
MUST_USE_RESULT MaybeObject * AllocateStruct (InstanceType type)
 
MUST_USE_RESULT MaybeObject * AllocateFunction (Map *function_map, SharedFunctionInfo *shared, Object *prototype, PretenureFlag pretenure=TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateArgumentsObject (Object *callee, int length)
 
MUST_USE_RESULT MaybeObject * NumberFromDouble (double value, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateHeapNumber (double value, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * NumberFromInt32 (int32_t value, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * NumberFromUint32 (uint32_t value, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateForeign (Address address, PretenureFlag pretenure=NOT_TENURED)
 
MUST_USE_RESULT MaybeObject * AllocateSharedFunctionInfo (Object *name)
 
MUST_USE_RESULT MaybeObject * AllocateJSMessageObject (String *type, JSArray *arguments, int start_position, int end_position, Object *script, Object *stack_frames)
 
MUST_USE_RESULT MaybeObject * AllocateExternalStringFromAscii (const ExternalAsciiString::Resource *resource)
 
MUST_USE_RESULT MaybeObject * AllocateExternalStringFromTwoByte (const ExternalTwoByteString::Resource *resource)
 
void FinalizeExternalString (String *string)
 
MUST_USE_RESULT MaybeObject * AllocateRaw (int size_in_bytes, AllocationSpace space, AllocationSpace retry_space)
 
void CreateFillerObjectAt (Address addr, int size)
 
bool CanMoveObjectStart (HeapObject *object)
 
void AdjustLiveBytes (Address address, int by, InvocationMode mode)
 
MUST_USE_RESULT MaybeObject * CreateCode (const CodeDesc &desc, Code::Flags flags, Handle< Object > self_reference, bool immovable=false, bool crankshafted=false, int prologue_offset=Code::kPrologueOffsetNotSet)
 
MUST_USE_RESULT MaybeObject * CopyCode (Code *code)
 
MUST_USE_RESULT MaybeObject * CopyCode (Code *code, Vector< byte > reloc_info)
 
MUST_USE_RESULT MaybeObject * InternalizeUtf8String (const char *str)
 
MUST_USE_RESULT MaybeObject * InternalizeUtf8String (Vector< const char > str)
 
MUST_USE_RESULT MaybeObject * InternalizeString (String *str)
 
MUST_USE_RESULT MaybeObject * InternalizeStringWithKey (HashTableKey *key)
 
bool InternalizeStringIfExists (String *str, String **result)
 
bool InternalizeTwoCharsStringIfExists (String *str, String **result)
 
MapInternalizedStringMapForString (String *str)
 
MUST_USE_RESULT MaybeObject * PrepareForCompare (String *str)
 
ObjectToBoolean (bool condition)
 
bool CollectGarbage (AllocationSpace space, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
 
void CollectAllGarbage (int flags, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
 
void CollectAllAvailableGarbage (const char *gc_reason=NULL)
 
bool IsHeapIterable ()
 
void EnsureHeapIsIterable ()
 
int NotifyContextDisposed ()
 
void increment_scan_on_scavenge_pages ()
 
void decrement_scan_on_scavenge_pages ()
 
PromotionQueuepromotion_queue ()
 
void AddGCPrologueCallback (v8::Isolate::GCPrologueCallback callback, GCType gc_type_filter, bool pass_isolate=true)
 
void RemoveGCPrologueCallback (v8::Isolate::GCPrologueCallback callback)
 
void AddGCEpilogueCallback (v8::Isolate::GCEpilogueCallback callback, GCType gc_type_filter, bool pass_isolate=true)
 
void RemoveGCEpilogueCallback (v8::Isolate::GCEpilogueCallback callback)
 
Stringhidden_string ()
 
void set_native_contexts_list (Object *object)
 
Objectnative_contexts_list ()
 
void set_array_buffers_list (Object *object)
 
Objectarray_buffers_list ()
 
void set_allocation_sites_list (Object *object)
 
Objectallocation_sites_list ()
 
Object ** allocation_sites_list_address ()
 
Objectweak_object_to_code_table ()
 
unsigned int ms_count ()
 
void IterateRoots (ObjectVisitor *v, VisitMode mode)
 
void IterateStrongRoots (ObjectVisitor *v, VisitMode mode)
 
void IterateSmiRoots (ObjectVisitor *v)
 
void IterateWeakRoots (ObjectVisitor *v, VisitMode mode)
 
void IterateAndMarkPointersToFromSpace (Address start, Address end, ObjectSlotCallback callback)
 
bool InNewSpace (Object *object)
 
bool InNewSpace (Address address)
 
bool InNewSpacePage (Address address)
 
bool InFromSpace (Object *object)
 
bool InToSpace (Object *object)
 
bool InOldPointerSpace (Address address)
 
bool InOldPointerSpace (Object *object)
 
bool InOldDataSpace (Address address)
 
bool InOldDataSpace (Object *object)
 
bool Contains (Address addr)
 
bool Contains (HeapObject *value)
 
bool InSpace (Address addr, AllocationSpace space)
 
bool InSpace (HeapObject *value, AllocationSpace space)
 
OldSpaceTargetSpace (HeapObject *object)
 
bool AllowedToBeMigrated (HeapObject *object, AllocationSpace dest)
 
void public_set_code_stubs (UnseededNumberDictionary *value)
 
HeapObjectCallback GcSafeSizeOfOldObjectFunction ()
 
void public_set_non_monomorphic_cache (UnseededNumberDictionary *value)
 
void public_set_empty_script (Script *script)
 
void public_set_store_buffer_top (Address *top)
 
void public_set_materialized_objects (FixedArray *objects)
 
Object ** roots_array_start ()
 
Addressstore_buffer_top_address ()
 
Object ** native_contexts_list_address ()
 
void PrintShortHeapStatistics ()
 
 INLINE (void RecordWrite(Address address, int offset))
 
 INLINE (void RecordWrites(Address address, int start, int len))
 
HeapState gc_state ()
 
bool IsInGCPostProcessing ()
 
void ReserveSpace (int *sizes, Address *addresses)
 
bool CreateApiObjects ()
 
ObjectGetNumberStringCache (Object *number)
 
void SetNumberStringCache (Object *number, String *str)
 
int64_t AdjustAmountOfExternalAllocatedMemory (int64_t change_in_bytes)
 
void SetNewSpaceHighPromotionModeActive (bool mode)
 
PretenureFlag GetPretenureMode ()
 
AddressNewSpaceHighPromotionModeActiveAddress ()
 
intptr_t PromotedTotalSize ()
 
intptr_t OldGenerationSpaceAvailable ()
 
intptr_t OldGenerationCapacityAvailable ()
 
intptr_t OldGenerationAllocationLimit (intptr_t old_gen_size)
 
bool inline_allocation_disabled ()
 
void EnableInlineAllocation ()
 
void DisableInlineAllocation ()
 
bool IdleNotification (int hint)
 
 STATIC_CHECK (kUndefinedValueRootIndex==Internals::kUndefinedValueRootIndex)
 
 STATIC_CHECK (kNullValueRootIndex==Internals::kNullValueRootIndex)
 
 STATIC_CHECK (kTrueValueRootIndex==Internals::kTrueValueRootIndex)
 
 STATIC_CHECK (kFalseValueRootIndex==Internals::kFalseValueRootIndex)
 
 STATIC_CHECK (kempty_stringRootIndex==Internals::kEmptyStringRootIndex)
 
bool RootCanBeTreatedAsConstant (RootListIndex root_index)
 
MUST_USE_RESULT MaybeObject * NumberToString (Object *number, bool check_number_string_cache=true)
 
MUST_USE_RESULT MaybeObject * Uint32ToString (uint32_t value, bool check_number_string_cache=true)
 
MapMapForFixedTypedArray (ExternalArrayType array_type)
 
RootListIndex RootIndexForFixedTypedArray (ExternalArrayType array_type)
 
MapMapForExternalArrayType (ExternalArrayType array_type)
 
RootListIndex RootIndexForExternalArrayType (ExternalArrayType array_type)
 
RootListIndex RootIndexForEmptyExternalArray (ElementsKind kind)
 
RootListIndex RootIndexForEmptyFixedTypedArray (ElementsKind kind)
 
ExternalArrayEmptyExternalArrayForMap (Map *map)
 
FixedTypedArrayBaseEmptyFixedTypedArrayForMap (Map *map)
 
void RecordStats (HeapStats *stats, bool take_snapshot=false)
 
void CheckNewSpaceExpansionCriteria ()
 
void IncrementYoungSurvivorsCounter (int survived)
 
bool NextGCIsLikelyToBeFull ()
 
void UpdateNewSpaceReferencesInExternalStringTable (ExternalStringTableUpdaterCallback updater_func)
 
void UpdateReferencesInExternalStringTable (ExternalStringTableUpdaterCallback updater_func)
 
void ProcessWeakReferences (WeakObjectRetainer *retainer)
 
void VisitExternalResources (v8::ExternalResourceVisitor *visitor)
 
bool ShouldBePromoted (Address old_address, int object_size)
 
void ClearJSFunctionResultCaches ()
 
void ClearNormalizedMapCaches ()
 
GCTracertracer ()
 
intptr_t PromotedSpaceSizeOfObjects ()
 
double total_regexp_code_generated ()
 
void IncreaseTotalRegexpCodeGenerated (int size)
 
void IncrementCodeGeneratedBytes (bool is_crankshafted, int size)
 
double get_max_gc_pause ()
 
intptr_t get_max_alive_after_gc ()
 
double get_min_in_mutator ()
 
void AddMarkingTime (double marking_time)
 
double marking_time () const
 
void AddSweepingTime (double sweeping_time)
 
double sweeping_time () const
 
MarkCompactCollectormark_compact_collector ()
 
StoreBufferstore_buffer ()
 
Markingmarking ()
 
IncrementalMarkingincremental_marking ()
 
bool IsSweepingComplete ()
 
bool AdvanceSweepers (int step_size)
 
bool EnsureSweepersProgressed (int step_size)
 
ExternalStringTableexternal_string_table ()
 
int sweep_generation ()
 
Isolateisolate ()
 
void CallGCPrologueCallbacks (GCType gc_type, GCCallbackFlags flags)
 
void CallGCEpilogueCallbacks (GCType gc_type, GCCallbackFlags flags)
 
bool OldGenerationAllocationLimitReached ()
 
void DoScavengeObject (Map *map, HeapObject **slot, HeapObject *obj)
 
void QueueMemoryChunkForFree (MemoryChunk *chunk)
 
void FreeQueuedChunks ()
 
int gc_count () const
 
void CompletelyClearInstanceofCache ()
 
uint32_t HashSeed ()
 
void SetArgumentsAdaptorDeoptPCOffset (int pc_offset)
 
void SetConstructStubDeoptPCOffset (int pc_offset)
 
void SetGetterStubDeoptPCOffset (int pc_offset)
 
void SetSetterStubDeoptPCOffset (int pc_offset)
 
void RememberUnmappedPage (Address page, bool compacted)
 
int global_ic_age ()
 
void AgeInlineCaches ()
 
bool flush_monomorphic_ics ()
 
int64_t amount_of_external_allocated_memory ()
 
void DeoptMarkedAllocationSites ()
 
void RecordObjectStats (InstanceType type, size_t size)
 
void RecordCodeSubTypeStats (int code_sub_type, int code_age, size_t size)
 
void RecordFixedArraySubTypeStats (int array_sub_type, size_t size)
 
void CheckpointObjectStats ()
 
MaybeObject * AddWeakObjectToCodeDependency (Object *obj, DependentCode *dep)
 
DependentCodeLookupWeakObjectToCodeDependency (Object *obj)
 
void InitializeWeakObjectToCodeTable ()
 
void EnsureWeakObjectToCodeTable ()
 
template<>
bool IsOneByte (Vector< const char > str, int chars)
 
template<>
bool IsOneByte (String *str, int chars)
 
template<typename T >
MaybeObject * AllocateInternalizedStringImpl (T t, int chars, uint32_t hash_field)
 
template<bool is_one_byte, typename T >
MaybeObject * AllocateInternalizedStringImpl (T t, int chars, uint32_t hash_field)
 

Static Public Member Functions

template<typename T >
static bool IsOneByte (T t, int chars)
 
static AllocationSpace TargetSpaceId (InstanceType type)
 
static bool ShouldZapGarbage ()
 
static void ScavengePointer (HeapObject **p)
 
static void ScavengeObject (HeapObject **p, HeapObject *object)
 
static void UpdateAllocationSiteFeedback (HeapObject *object, ScratchpadSlotMode mode)
 
static bool RootCanBeWrittenAfterInitialization (RootListIndex root_index)
 
static void CopyBlock (Address dst, Address src, int byte_size)
 
static void MoveBlock (Address dst, Address src, int byte_size)
 
static void FatalProcessOutOfMemory (const char *location, bool take_snapshot=false)
 

Static Public Attributes

static const int kSloppyArgumentsObjectSize
 
static const int kStrictArgumentsObjectSize
 
static const int kArgumentsLengthIndex = 0
 
static const int kArgumentsCalleeIndex = 1
 
static const int kNoGCFlags = 0
 
static const int kSweepPreciselyMask = 1
 
static const int kReduceMemoryFootprintMask = 2
 
static const int kAbortIncrementalMarkingMask = 4
 
static const int kMakeHeapIterableMask
 
static const intptr_t kMinimumOldGenerationAllocationLimit
 
static const int kOldSpaceRoots = 0x20
 

Friends

class Factory
 
class GCTracer
 
class AlwaysAllocateScope
 
class Page
 
class Isolate
 
class MarkCompactCollector
 
class MarkCompactMarkingVisitor
 
class MapCompact
 
class GCCallbacksScope
 

Detailed Description

Definition at line 560 of file heap.h.

Member Enumeration Documentation

anonymous enum
Enumerator
FIRST_CODE_KIND_SUB_TYPE 
FIRST_FIXED_ARRAY_SUB_TYPE 
FIRST_CODE_AGE_SUB_TYPE 
OBJECT_STATS_COUNT 

Definition at line 1881 of file heap.h.

enum HeapState
Enumerator
NOT_IN_GC 
SCAVENGE 
MARK_COMPACT 

Definition at line 1507 of file heap.h.

Enumerator
FROM_GC 
FROM_MUTATOR 

Definition at line 1192 of file heap.h.

Enumerator
kStringTableRootIndex 
kRootListLength 
kStrongRootListLength 
kSmiRootsStart 

Definition at line 1617 of file heap.h.

Enumerator
IGNORE_SCRATCHPAD_SLOT 
RECORD_SCRATCHPAD_SLOT 

Definition at line 1529 of file heap.h.

Member Function Documentation

void AddGCEpilogueCallback ( v8::Isolate::GCEpilogueCallback  callback,
GCType  gc_type_filter,
bool  pass_isolate = true 
)
void AddGCPrologueCallback ( v8::Isolate::GCPrologueCallback  callback,
GCType  gc_type_filter,
bool  pass_isolate = true 
)
void AddMarkingTime ( double  marking_time)
inline

Definition at line 1752 of file heap.h.

References Heap::marking_time().

Referenced by IncrementalMarking::Hurry(), and IncrementalMarking::Step().

void AddSweepingTime ( double  sweeping_time)
inline

Definition at line 1761 of file heap.h.

References Heap::sweeping_time().

MaybeObject * AddWeakObjectToCodeDependency ( Object obj,
DependentCode dep 
)
bool AdvanceSweepers ( int  step_size)
void AgeInlineCaches ( )
inline

Definition at line 1866 of file heap.h.

References BitFieldBase< int, shift, size, uint32_t >::kMax.

Referenced by Heap::NotifyContextDisposed(), and TEST().

MaybeObject * AllocateAliasedArgumentsEntry ( int  slot)
MaybeObject * AllocateByteArray ( int  length,
PretenureFlag  pretenure = NOT_TENURED 
)
MaybeObject * AllocateCodeCache ( )
MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray ( ElementsKind  elements_kind,
PretenureFlag  pretenure = NOT_TENURED 
)
inline
MaybeObject * AllocateExternal ( void *  value)
MaybeObject * AllocateExternalArray ( int  length,
ExternalArrayType  array_type,
void *  external_pointer,
PretenureFlag  pretenure 
)
MaybeObject * AllocateFixedArrayWithHoles ( int  length,
PretenureFlag  pretenure = NOT_TENURED 
)
MaybeObject * AllocateFixedDoubleArrayWithHoles ( int  length,
PretenureFlag  pretenure = NOT_TENURED 
)
MaybeObject * AllocateFunction ( Map function_map,
SharedFunctionInfo shared,
Object prototype,
PretenureFlag  pretenure = TENURED 
)
MaybeObject * AllocateHashTable ( int  length,
PretenureFlag  pretenure = NOT_TENURED 
)

Definition at line 5457 of file heap.cc.

References Heap::AllocateFixedArray(), and ASSERT.

MaybeObject * AllocateInternalizedStringFromUtf8 ( Vector< const char >  str,
int  chars,
uint32_t  hash_field 
)
inline

Definition at line 118 of file heap-inl.h.

References Heap::AllocateOneByteInternalizedString(), and Heap::IsOneByte().

Referenced by Utf8StringKey::AsObject().

MaybeObject* AllocateInternalizedStringImpl ( T  t,
int  chars,
uint32_t  hash_field 
)

Definition at line 129 of file heap-inl.h.

References Heap::IsOneByte().

MUST_USE_RESULT MaybeObject* AllocateInternalizedStringImpl ( T  t,
int  chars,
uint32_t  hash_field 
)
inline
MUST_USE_RESULT MaybeObject* AllocateInternalizedStringImpl ( T  t,
int  chars,
uint32_t  hash_field 
)
MUST_USE_RESULT MaybeObject* AllocateJSArrayBuffer ( )
MaybeObject * AllocateJSArrayWithElements ( FixedArrayBase array_base,
ElementsKind  elements_kind,
int  length,
PretenureFlag  pretenure = NOT_TENURED 
)

Definition at line 4650 of file heap.cc.

References Smi::FromInt(), JSArray::set_length(), and JSObject::ValidateElements().

MaybeObject * AllocateJSFunctionProxy ( Object handler,
Object call_trap,
Object construct_trap,
Object prototype 
)
MaybeObject * AllocateJSMessageObject ( String type,
JSArray arguments,
int  start_position,
int  end_position,
Object script,
Object stack_frames 
)
MaybeObject * AllocateJSModule ( Context context,
ScopeInfo scope_info 
)
MaybeObject * AllocateJSObject ( JSFunction constructor,
PretenureFlag  pretenure = NOT_TENURED,
AllocationSite allocation_site = NULL 
)
MaybeObject * AllocateModuleContext ( ScopeInfo scope_info)
MaybeObject * AllocateNativeContext ( )
MaybeObject * AllocatePolymorphicCodeCache ( )

Definition at line 2688 of file heap.cc.

References Heap::AllocateStruct(), and v8::internal::POLYMORPHIC_CODE_CACHE_TYPE.

MaybeObject * AllocatePrivateSymbol ( )

Definition at line 5499 of file heap.cc.

References Heap::AllocateSymbol().

MaybeObject * AllocateScopeInfo ( int  length)
MUST_USE_RESULT MaybeObject* AllocateStringFromOneByte ( Vector< const char >  str,
PretenureFlag  pretenure = NOT_TENURED 
)
inline

Definition at line 868 of file heap.h.

References Heap::AllocateStringFromOneByte().

MaybeObject * AllocateStringFromTwoByte ( Vector< const uc16 str,
PretenureFlag  pretenure = NOT_TENURED 
)
MaybeObject * AllocateStringFromUtf8 ( Vector< const char >  str,
PretenureFlag  pretenure = NOT_TENURED 
)
inline
MaybeObject * AllocateStringFromUtf8Slow ( Vector< const char >  str,
int  non_ascii_start,
PretenureFlag  pretenure = NOT_TENURED 
)
MaybeObject * AllocateUninitializedFixedArray ( int  length)
MaybeObject * AllocateUninitializedFixedDoubleArray ( int  length,
PretenureFlag  pretenure = NOT_TENURED 
)
Object** allocation_sites_list_address ( )
inline

Definition at line 1365 of file heap.h.

bool always_allocate ( )
inline

Definition at line 668 of file heap.h.

Referenced by Heap::AllocateRaw(), Heap::CopyJSObject(), and TEST().

Address always_allocate_scope_depth_address ( )
inline

Definition at line 669 of file heap.h.

int64_t amount_of_external_allocated_memory ( )
inline

Definition at line 1872 of file heap.h.

Referenced by StatisticsExtension::GetCounters().

Object* array_buffers_list ( )
inline

Definition at line 1359 of file heap.h.

Referenced by Runtime::SetupArrayBuffer().

intptr_t Available ( )
void CallGCEpilogueCallbacks ( GCType  gc_type,
GCCallbackFlags  flags 
)

Definition at line 1238 of file heap.cc.

References Heap::isolate().

void CallGCPrologueCallbacks ( GCType  gc_type,
GCCallbackFlags  flags 
)

Definition at line 1221 of file heap.cc.

References Heap::isolate().

intptr_t Capacity ( )

Definition at line 189 of file heap.cc.

References PagedSpace::Capacity(), NewSpace::Capacity(), and Heap::HasBeenSetUp().

Referenced by Heap::SetUp().

void CheckNewSpaceExpansionCriteria ( )

Definition at line 1372 of file heap.cc.

References NewSpace::Capacity(), NewSpace::Grow(), and NewSpace::MaximumCapacity().

void ClearInstanceofCache ( )
inline

Definition at line 754 of file heap-inl.h.

Referenced by JSObject::SetPrototype().

intptr_t CommittedMemoryExecutable ( )
void CompletelyClearInstanceofCache ( )
inline

Definition at line 764 of file heap-inl.h.

bool ConfigureHeapDefault ( )

Definition at line 6456 of file heap.cc.

References Heap::ConfigureHeap(), v8::internal::KB, and v8::internal::MB.

Referenced by Heap::SetUp(), and TEST().

bool Contains ( HeapObject value)

Definition at line 5924 of file heap.cc.

References HeapObject::address(), and Heap::Contains().

MaybeObject * CopyConstantPoolArray ( ConstantPoolArray src)
inline

Definition at line 212 of file heap-inl.h.

References Heap::CopyConstantPoolArrayWithMap(), and HeapObject::map().

Referenced by ConstantPoolArray::Copy(), and Heap::CopyCode().

MaybeObject * CopyFixedArray ( FixedArray src)
inline

Definition at line 202 of file heap-inl.h.

References Heap::CopyFixedArrayWithMap(), and HeapObject::map().

Referenced by FixedArray::Copy(), and Heap::CopyJSObject().

MaybeObject * CopyFixedDoubleArray ( FixedDoubleArray src)
inline
bool CreateHeapObjects ( )

Definition at line 6672 of file heap.cc.

References Heap::CreateApiObjects().

void decrement_scan_on_scavenge_pages ( )
inline

Definition at line 1295 of file heap.h.

References v8::internal::PrintF().

Referenced by MemoryChunk::set_scan_on_scavenge(), and MemoryChunk::Unlink().

void DisableInlineAllocation ( )
void DoScavengeObject ( Map map,
HeapObject **  slot,
HeapObject obj 
)
inline

Definition at line 1815 of file heap.h.

References VisitorDispatchTable< Callback >::GetVisitor(), v8::internal::map, and obj.

ExternalArray * EmptyExternalArrayForMap ( Map map)
FixedTypedArrayBase * EmptyFixedTypedArrayForMap ( Map map)
void EnableInlineAllocation ( )
void EnsureHeapIsIterable ( )

Definition at line 5679 of file heap.cc.

References ASSERT, Heap::CollectAllGarbage(), Heap::IsHeapIterable(), and Heap::kMakeHeapIterableMask.

Referenced by TEST().

bool EnsureSweepersProgressed ( int  step_size)
inline
void EnsureWeakObjectToCodeTable ( )
ExternalStringTable* external_string_table ( )
inline
void FatalProcessOutOfMemory ( const char *  location,
bool  take_snapshot = false 
)
static
bool flush_monomorphic_ics ( )
inline

Definition at line 1870 of file heap.h.

int gc_count ( ) const
inline

Definition at line 1822 of file heap.h.

HeapObjectCallback GcSafeSizeOfOldObjectFunction ( )
inline

Definition at line 1429 of file heap.h.

intptr_t get_max_alive_after_gc ( )
inline

Definition at line 1746 of file heap.h.

Referenced by Heap::TearDown().

double get_max_gc_pause ( )
inline

Definition at line 1743 of file heap.h.

Referenced by Heap::TearDown().

double get_min_in_mutator ( )
inline

Definition at line 1749 of file heap.h.

Referenced by Heap::TearDown().

Object * GetNumberStringCache ( Object number)

Definition at line 3599 of file heap.cc.

References Smi::cast(), String::cast(), and Object::Number().

Referenced by Heap::NumberToString().

PretenureFlag GetPretenureMode ( )
inline

Definition at line 1569 of file heap.h.

References v8::internal::NOT_TENURED, and v8::internal::TENURED.

int global_ic_age ( )
inline
void IncreaseTotalRegexpCodeGenerated ( int  size)
inline

Definition at line 1730 of file heap.h.

References v8::internal::size.

Referenced by RegExpCompiler::Assemble().

void increment_scan_on_scavenge_pages ( )
inline

Definition at line 1288 of file heap.h.

References v8::internal::PrintF().

Referenced by MemoryChunk::set_scan_on_scavenge().

void IncrementCodeGeneratedBytes ( bool  is_crankshafted,
int  size 
)
inline

Definition at line 1734 of file heap.h.

References v8::internal::size.

Referenced by CodeGenerator::MakeCodeEpilogue().

void IncrementYoungSurvivorsCounter ( int  survived)
inline

Definition at line 1685 of file heap.h.

References ASSERT.

void InitializeWeakObjectToCodeTable ( )
inline

Definition at line 1939 of file heap.h.

Referenced by Deserializer::Deserialize().

int InitialSemiSpaceSize ( )
inline

Definition at line 598 of file heap.h.

Referenced by NewSpace::SetUp(), and TEST().

INLINE ( void   RecordWriteAddress address, int offset)
INLINE ( void   RecordWritesAddress address, int start, int len)
bool inline_allocation_disabled ( )
inline

Definition at line 1607 of file heap.h.

Referenced by FreeList::Allocate().

bool InNewSpace ( Address  address)
inline

Definition at line 316 of file heap-inl.h.

References NewSpace::Contains().

bool InNewSpacePage ( Address  address)
inline
bool InOldDataSpace ( Address  address)
inline

Definition at line 341 of file heap-inl.h.

References PagedSpace::Contains().

Referenced by Heap::CanMoveObjectStart(), and Heap::InOldDataSpace().

bool InOldDataSpace ( Object object)
inline

Definition at line 346 of file heap-inl.h.

References Heap::InOldDataSpace().

bool InOldPointerSpace ( Address  address)
inline

Definition at line 331 of file heap-inl.h.

References PagedSpace::Contains().

Referenced by Heap::CanMoveObjectStart(), and Heap::InOldPointerSpace().

bool InOldPointerSpace ( Object object)
inline

Definition at line 336 of file heap-inl.h.

References Heap::InOldPointerSpace().

bool InSpace ( HeapObject value,
AllocationSpace  space 
)

Definition at line 5943 of file heap.cc.

References HeapObject::address(), and Heap::InSpace().

MaybeObject * InternalizeString ( String str)
bool InternalizeStringIfExists ( String str,
String **  result 
)

Definition at line 6025 of file heap.cc.

Referenced by ContextSlotCache::Update(), and KeyedLookupCache::Update().

MaybeObject * InternalizeStringWithKey ( HashTableKey key)
bool InternalizeTwoCharsStringIfExists ( String str,
String **  result 
)
MUST_USE_RESULT MaybeObject* InternalizeUtf8String ( const char *  str)
inline
MaybeObject * InternalizeUtf8String ( Vector< const char >  str)

Definition at line 6003 of file heap.cc.

References Heap::HashSeed(), and Heap::InternalizeStringWithKey().

bool InToSpace ( Object object)
inline

Definition at line 326 of file heap-inl.h.

References NewSpace::ToSpaceContains().

Referenced by Heap::InNewSpace(), and Heap::IterateAndMarkPointersToFromSpace().

bool IsHeapIterable ( )

Definition at line 5673 of file heap.cc.

References Heap::old_data_space(), and Heap::old_pointer_space().

Referenced by Heap::EnsureHeapIsIterable().

bool IsInGCPostProcessing ( )
inline

Definition at line 1510 of file heap.h.

Referenced by String::MakeExternal().

Isolate * isolate ( )
inline

Definition at line 624 of file heap-inl.h.

Referenced by IncrementalMarking::Abort(), v8::internal::AddWeakObjectToCodeDependency(), Heap::AdjustAmountOfExternalAllocatedMemory(), Heap::AllocateArgumentsObject(), Heap::AllocateConstantPoolArray(), Heap::AllocateExternalStringFromAscii(), Heap::AllocateExternalStringFromTwoByte(), Heap::AllocateInternalizedStringImpl(), Heap::AllocateOneByteInternalizedString(), LargeObjectSpace::AllocateRaw(), Heap::AllocateRawOneByteString(), Heap::AllocateRawTwoByteString(), Heap::AllocateSymbol(), Heap::AllocateTwoByteInternalizedString(), AllocationTracker::AllocationEvent(), RegExpCompiler::Assemble(), SharedFunctionInfo::AttachInitialMap(), Heap::CallGCEpilogueCallbacks(), Heap::CallGCPrologueCallbacks(), Heap::CheckpointObjectStats(), Heap::CollectAllAvailableGarbage(), MemoryChunk::CommitArea(), Heap::CommittedMemoryExecutable(), StoreBuffer::Compact(), SharedFunctionInfo::CompleteInobjectSlackTracking(), Deoptimizer::DeoptimizeGlobalObject(), SharedFunctionInfo::DetachInitialMap(), Heap::EnsureWeakObjectToCodeTable(), PagedSpace::Expand(), RootsReferencesExtractor::FillReferences(), IncrementalMarking::Finalize(), LargeObjectSpace::FreeUnmarkedObjects(), V8HeapExplorer::GetConstructorName(), HeapObject::GetIsolate(), MarkCompactMarkingVisitor::INLINE(), MarkCompactCollector::isolate(), Heap::IterateSmiRoots(), IncrementalMarking::MarkingComplete(), MarkCompactCollector::MigrateObject(), Heap::NotifyContextDisposed(), PagedSpace::PagedSpace(), IC::PostPatching(), IncrementalMarking::RecordCodeTargetPatch(), Heap::RecordStats(), JSObject::ReferencesObject(), Heap::ReinitializeJSReceiver(), PagedSpace::ReleasePage(), NewSpace::ReportStatistics(), HeapProfiler::SetRetainedObjectInfo(), Heap::SetStackLimits(), Heap::SetUp(), NewSpace::SetUp(), SemiSpace::ShrinkTo(), IncrementalMarking::Start(), SharedFunctionInfo::StartInobjectSlackTracking(), V8HeapExplorer::TagGlobalObjects(), PagedSpace::TearDown(), NewSpace::TearDown(), LargeObjectSpace::TearDown(), TEST(), String::ToCString(), ReplacementStringBuilder::ToString(), String::ToWideCString(), SeqString::Truncate(), SlotsBuffer::UpdateSlots(), SlotsBuffer::UpdateSlotsWithFilter(), WeakListVisitor< JSArrayBuffer >::VisitPhantomObject(), and IncrementalMarking::WorthActivating().

bool IsOneByte ( Vector< const char >  str,
int  chars 
)
inline

Definition at line 105 of file heap-inl.h.

References Vector< T >::length().

bool IsOneByte ( String str,
int  chars 
)
inline

Definition at line 113 of file heap-inl.h.

References String::IsOneByteRepresentation().

static bool IsOneByte ( T  t,
int  chars 
)
inlinestatic
void IterateRoots ( ObjectVisitor *  v,
VisitMode  mode 
)
void IterateSmiRoots ( ObjectVisitor *  v)
bool linear_allocation ( )
inline

Definition at line 672 of file heap.h.

DependentCode * LookupWeakObjectToCodeDependency ( Object obj)
Map * MapForExternalArrayType ( ExternalArrayType  array_type)

Definition at line 3730 of file heap.cc.

References Map::cast(), and Heap::RootIndexForExternalArrayType().

Referenced by Heap::AllocateExternalArray().

Map * MapForFixedTypedArray ( ExternalArrayType  array_type)

Definition at line 3752 of file heap.cc.

References Map::cast(), and Heap::RootIndexForFixedTypedArray().

Referenced by Heap::AllocateFixedTypedArray().

Marking* marking ( )
inline

Definition at line 1777 of file heap.h.

double marking_time ( ) const
inline

Definition at line 1756 of file heap.h.

Referenced by Heap::AddMarkingTime(), and Heap::TearDown().

intptr_t MaxExecutableSize ( )
inline

Definition at line 600 of file heap.h.

Referenced by Heap::SetUp(), and TEST().

intptr_t MaximumCommittedMemory ( )
inline

Definition at line 616 of file heap.h.

Referenced by Heap::TearDown().

intptr_t MaxOldGenerationSize ( )
inline

Definition at line 599 of file heap.h.

Referenced by TEST().

intptr_t MaxReserved ( )
inline

Definition at line 593 of file heap.h.

Referenced by Isolate::GetHeapStatistics(), Heap::SetUp(), and TEST().

int MaxSemiSpaceSize ( )
inline

Definition at line 596 of file heap.h.

Referenced by IncrementalMarking::Step(), and TEST().

void MoveBlock ( Address  dst,
Address  src,
int  byte_size 
)
inlinestatic
unsigned int ms_count ( )
inline

Definition at line 1370 of file heap.h.

Referenced by MarkCompactCollector::CollectEvacuationCandidates().

Object** native_contexts_list_address ( )
inline

Definition at line 1458 of file heap.h.

Address* NewSpaceAllocationLimitAddress ( )
inline

Definition at line 679 of file heap.h.

References NewSpace::allocation_limit_address().

Address* NewSpaceAllocationTopAddress ( )
inline

Definition at line 676 of file heap.h.

References NewSpace::allocation_top_address().

Address* NewSpaceHighPromotionModeActiveAddress ( )
inline

Definition at line 1574 of file heap.h.

uintptr_t NewSpaceMask ( )
inline

Definition at line 634 of file heap.h.

References NewSpace::mask().

Address NewSpaceStart ( )
inline

Definition at line 633 of file heap.h.

References NewSpace::start().

Address NewSpaceTop ( )
inline

Definition at line 635 of file heap.h.

References NewSpace::top().

Referenced by StringTracker::IsFreshUnusedString(), and StringTracker::RecordWrite().

bool NextGCIsLikelyToBeFull ( )
inline

Definition at line 1691 of file heap.h.

References NewSpace::Capacity(), and Heap::PromotedTotalSize().

Referenced by IncrementalMarking::OldSpaceStep().

int NotifyContextDisposed ( )
MaybeObject * NumberFromInt32 ( int32_t  value,
PretenureFlag  pretenure = NOT_TENURED 
)
inline
Address* OldDataSpaceAllocationLimitAddress ( )
inline

Definition at line 693 of file heap.h.

References PagedSpace::allocation_limit_address().

Address* OldDataSpaceAllocationTopAddress ( )
inline

Definition at line 690 of file heap.h.

References PagedSpace::allocation_top_address().

intptr_t OldGenerationAllocationLimit ( intptr_t  old_gen_size)
inline
bool OldGenerationAllocationLimitReached ( )
inline

Definition at line 351 of file heap-inl.h.

References Heap::incremental_marking(), and Heap::OldGenerationSpaceAvailable().

intptr_t OldGenerationCapacityAvailable ( )
inline

Definition at line 1589 of file heap.h.

References Heap::PromotedTotalSize().

intptr_t OldGenerationSpaceAvailable ( )
inline

Definition at line 1585 of file heap.h.

References Heap::PromotedTotalSize().

Referenced by Heap::OldGenerationAllocationLimitReached().

Address* OldPointerSpaceAllocationLimitAddress ( )
inline

Definition at line 686 of file heap.h.

References PagedSpace::allocation_limit_address().

Address* OldPointerSpaceAllocationTopAddress ( )
inline

Definition at line 683 of file heap.h.

References PagedSpace::allocation_top_address().

MaybeObject * PrepareForCompare ( String str)
inline

Definition at line 563 of file heap-inl.h.

References v8::internal::KB, String::length(), obj, and String::TryFlatten().

void ProcessWeakReferences ( WeakObjectRetainer retainer)
PromotionQueue* promotion_queue ( )
inline

Definition at line 1302 of file heap.h.

Referenced by NewSpace::AddFreshPage().

void public_set_code_stubs ( UnseededNumberDictionary value)
inline

Definition at line 1422 of file heap.h.

void public_set_empty_script ( Script script)
inline

Definition at line 1438 of file heap.h.

void public_set_materialized_objects ( FixedArray objects)
inline

Definition at line 1446 of file heap.h.

void public_set_non_monomorphic_cache ( UnseededNumberDictionary value)
inline

Definition at line 1434 of file heap.h.

void public_set_store_buffer_top ( Address top)
inline
void QueueMemoryChunkForFree ( MemoryChunk chunk)
void RecordCodeSubTypeStats ( int  code_sub_type,
int  code_age,
size_t  size 
)
inline
void RecordObjectStats ( InstanceType  type,
size_t  size 
)
inline
MaybeObject * ReinitializeJSGlobalProxy ( JSFunction constructor,
JSGlobalProxy global 
)
void RememberUnmappedPage ( Address  page,
bool  compacted 
)

Definition at line 7790 of file heap.cc.

References Page::kPageSize.

Referenced by MemoryAllocator::Free().

void RemoveGCEpilogueCallback ( v8::Isolate::GCEpilogueCallback  callback)
void RemoveGCPrologueCallback ( v8::Isolate::GCPrologueCallback  callback)
void RepairFreeListsAfterBoot ( )

Definition at line 497 of file heap.cc.

References v8::internal::NULL.

Referenced by Deserializer::Deserialize().

int ReservedSemiSpaceSize ( )
inline

Definition at line 597 of file heap.h.

Referenced by TEST().

bool RootCanBeTreatedAsConstant ( RootListIndex  root_index)
bool RootCanBeWrittenAfterInitialization ( Heap::RootListIndex  root_index)
static

Definition at line 3409 of file heap.cc.

References ARRAY_SIZE, and Heap::kStringTableRootIndex.

Referenced by Heap::RootCanBeTreatedAsConstant().

Heap::RootListIndex RootIndexForEmptyExternalArray ( ElementsKind  kind)

Definition at line 3774 of file heap.cc.

References ELEMENT_KIND_TO_ROOT_INDEX, TYPED_ARRAYS, and UNREACHABLE.

Referenced by Heap::EmptyExternalArrayForMap().

Heap::RootListIndex RootIndexForEmptyFixedTypedArray ( ElementsKind  kind)

Definition at line 3791 of file heap.cc.

References ELEMENT_KIND_TO_ROOT_INDEX, TYPED_ARRAYS, and UNREACHABLE.

Referenced by Heap::EmptyFixedTypedArrayForMap().

Heap::RootListIndex RootIndexForExternalArrayType ( ExternalArrayType  array_type)

Definition at line 3735 of file heap.cc.

References ARRAY_TYPE_TO_ROOT_INDEX, TYPED_ARRAYS, and UNREACHABLE.

Referenced by Heap::MapForExternalArrayType().

Heap::RootListIndex RootIndexForFixedTypedArray ( ExternalArrayType  array_type)

Definition at line 3757 of file heap.cc.

References ARRAY_TYPE_TO_ROOT_INDEX, TYPED_ARRAYS, and UNREACHABLE.

Referenced by Heap::MapForFixedTypedArray().

Object** roots_array_start ( )
inline
void ScavengePointer ( HeapObject **  p)
inlinestatic

Definition at line 488 of file heap-inl.h.

References Heap::ScavengeObject().

void set_allocation_sites_list ( Object object)
inline

Definition at line 1361 of file heap.h.

Referenced by Heap::AllocateAllocationSite(), and Deserializer::Deserialize().

void set_array_buffers_list ( Object object)
inline

Definition at line 1356 of file heap.h.

Referenced by Deserializer::Deserialize(), and Runtime::SetupArrayBuffer().

void set_native_contexts_list ( Object object)
inline

Definition at line 1351 of file heap.h.

Referenced by Deserializer::Deserialize().

void SetArgumentsAdaptorDeoptPCOffset ( int  pc_offset)
inline

Definition at line 1837 of file heap.h.

References ASSERT, and Smi::FromInt().

void SetConstructStubDeoptPCOffset ( int  pc_offset)
inline

Definition at line 1842 of file heap.h.

References ASSERT, and Smi::FromInt().

void SetGetterStubDeoptPCOffset ( int  pc_offset)
inline

Definition at line 1847 of file heap.h.

References ASSERT, and Smi::FromInt().

void SetNewSpaceHighPromotionModeActive ( bool  mode)
inline

Definition at line 1563 of file heap.h.

References v8::internal::mode().

Referenced by TEST().

void SetNumberStringCache ( Object number,
String str 
)

Definition at line 3619 of file heap.cc.

References Smi::cast(), and Object::Number().

Referenced by Heap::NumberToString().

void SetSetterStubDeoptPCOffset ( int  pc_offset)
inline

Definition at line 1852 of file heap.h.

References ASSERT, and Smi::FromInt().

intptr_t SizeOfObjects ( )

Definition at line 473 of file heap.cc.

References v8::internal::NULL.

Referenced by Isolate::GetHeapStatistics(), Heap::PrintShortHeapStatistics(), and TEST().

STATIC_CHECK ( kUndefinedValueRootIndex  = =Internals::kUndefinedValueRootIndex)
STATIC_CHECK ( kNullValueRootIndex  = =Internals::kNullValueRootIndex)
STATIC_CHECK ( kTrueValueRootIndex  = =Internals::kTrueValueRootIndex)
STATIC_CHECK ( kFalseValueRootIndex  = =Internals::kFalseValueRootIndex)
STATIC_CHECK ( kempty_stringRootIndex  = =Internals::kEmptyStringRootIndex)
Address* store_buffer_top_address ( )
inline

Definition at line 1453 of file heap.h.

Referenced by StoreBuffer::TopAddress().

int sweep_generation ( )
inline

Definition at line 1804 of file heap.h.

double sweeping_time ( ) const
inline

Definition at line 1765 of file heap.h.

Referenced by Heap::AddSweepingTime(), and Heap::TearDown().

OldSpace * TargetSpace ( HeapObject object)
inline
Object * ToBoolean ( bool  condition)
inline

Definition at line 759 of file heap-inl.h.

Referenced by Runtime::HasObjectProperty().

double total_regexp_code_generated ( )
inline

Definition at line 1729 of file heap.h.

Referenced by RegExpCompiler::Assemble().

GCTracer* tracer ( )
inline

Definition at line 1724 of file heap.h.

MaybeObject * Uint32ToString ( uint32_t  value,
bool  check_number_string_cache = true 
)

Definition at line 3673 of file heap.cc.

References Heap::NumberFromUint32(), and Heap::NumberToString().

Referenced by JSProxy::GetElementWithHandler().

void UpdateMaximumCommitted ( )

Definition at line 237 of file heap.cc.

References Heap::CommittedMemory(), and Heap::HasBeenSetUp().

Referenced by Heap::TearDown().

void UpdateNewSpaceReferencesInExternalStringTable ( ExternalStringTableUpdaterCallback  updater_func)
void UpdateReferencesInExternalStringTable ( ExternalStringTableUpdaterCallback  updater_func)

Definition at line 1708 of file heap.cc.

References Heap::UpdateNewSpaceReferencesInExternalStringTable().

void VisitExternalResources ( v8::ExternalResourceVisitor visitor)

Definition at line 2073 of file heap.cc.

References ASSERT, String::cast(), ExternalStringTable::Iterate(), and Utils::ToLocal().

Referenced by V8::VisitExternalResources().

Object* weak_object_to_code_table ( )
inline

Definition at line 1367 of file heap.h.

Referenced by Heap::EnsureWeakObjectToCodeTable().

Friends And Related Function Documentation

friend class AlwaysAllocateScope
friend

Definition at line 2541 of file heap.h.

friend class Factory
friend

Definition at line 2539 of file heap.h.

friend class GCCallbacksScope
friend

Definition at line 2550 of file heap.h.

friend class GCTracer
friend

Definition at line 2540 of file heap.h.

friend class Isolate
friend

Definition at line 2543 of file heap.h.

friend class MapCompact
friend

Definition at line 2546 of file heap.h.

friend class MarkCompactCollector
friend

Definition at line 2544 of file heap.h.

friend class MarkCompactMarkingVisitor
friend

Definition at line 2545 of file heap.h.

friend class Page
friend

Definition at line 2542 of file heap.h.

Field Documentation

const int kArgumentsCalleeIndex = 1
static

Definition at line 1106 of file heap.h.

Referenced by Heap::AllocateArgumentsObject().

const int kArgumentsLengthIndex = 0
static

Definition at line 1104 of file heap.h.

Referenced by Heap::AllocateArgumentsObject(), and v8::internal::BUILTIN().

const intptr_t kMinimumOldGenerationAllocationLimit
static
Initial value:

Definition at line 1593 of file heap.h.

Referenced by Heap::OldGenerationAllocationLimit().

const int kOldSpaceRoots = 0x20
static

Definition at line 1829 of file heap.h.

const int kReduceMemoryFootprintMask = 2
static
const int kSloppyArgumentsObjectSize
static
Initial value:

Definition at line 1098 of file heap.h.

Referenced by Heap::AllocateArgumentsObject().

const int kStrictArgumentsObjectSize
static
Initial value:

Definition at line 1101 of file heap.h.

Referenced by Heap::AllocateArgumentsObject().

const int kSweepPreciselyMask = 1
static

Definition at line 1258 of file heap.h.

Referenced by MarkCompactCollector::SetFlags().


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