v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#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 } |
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 |
anonymous enum |
enum InvocationMode |
enum RootListIndex |
enum ScratchpadSlotMode |
void AddGCEpilogueCallback | ( | v8::Isolate::GCEpilogueCallback | callback, |
GCType | gc_type_filter, | ||
bool | pass_isolate = true |
||
) |
Definition at line 6834 of file heap.cc.
References List< T, P >::Add(), ASSERT, List< T, P >::Contains(), and v8::internal::NULL.
Referenced by Isolate::AddGCEpilogueCallback(), and V8::AddGCEpilogueCallback().
void AddGCPrologueCallback | ( | v8::Isolate::GCPrologueCallback | callback, |
GCType | gc_type_filter, | ||
bool | pass_isolate = true |
||
) |
Definition at line 6812 of file heap.cc.
References List< T, P >::Add(), ASSERT, List< T, P >::Contains(), and v8::internal::NULL.
Referenced by Isolate::AddGCPrologueCallback(), and V8::AddGCPrologueCallback().
|
inline |
Definition at line 1752 of file heap.h.
References Heap::marking_time().
Referenced by IncrementalMarking::Hurry(), and IncrementalMarking::Step().
|
inline |
Definition at line 1761 of file heap.h.
References Heap::sweeping_time().
MaybeObject * AddWeakObjectToCodeDependency | ( | Object * | obj, |
DependentCode * | dep | ||
) |
Definition at line 6856 of file heap.cc.
References ASSERT, ASSERT_EQ, WeakHashTable::cast(), Heap::InNewSpace(), WeakHashTable::Put(), Heap::ShouldZapGarbage(), and WeakHashTable::Zap().
Referenced by v8::internal::AddWeakObjectToCodeDependency().
|
inline |
Definition at line 582 of file heap-inl.h.
References ASSERT, Heap::CollectAllGarbage(), Heap::HasBeenSetUp(), Heap::isolate(), v8::internal::KB, Heap::kNoGCFlags, v8::internal::PrintF(), v8::internal::PrintPID(), V8_PTR_PREFIX, and V8PRIxPTR.
Referenced by Isolate::AdjustAmountOfExternalAllocatedMemory(), Runtime::FreeArrayBuffer(), and Runtime::SetupArrayBufferAllocatingData().
void AdjustLiveBytes | ( | Address | address, |
int | by, | ||
InvocationMode | mode | ||
) |
Definition at line 4034 of file heap.cc.
References Heap::FROM_GC, Heap::incremental_marking(), MemoryChunk::IncrementLiveBytesFromGC(), and MemoryChunk::IncrementLiveBytesFromMutator().
Referenced by String::MakeExternal(), JSObject::NormalizeProperties(), and SeqString::Truncate().
bool AdvanceSweepers | ( | int | step_size | ) |
Definition at line 6513 of file heap.cc.
References PagedSpace::AdvanceSweeper(), ASSERT, Heap::mark_compact_collector(), Heap::old_data_space(), and Heap::old_pointer_space().
Referenced by Heap::IdleNotification().
|
inline |
Definition at line 1866 of file heap.h.
References BitFieldBase< int, shift, size, uint32_t >::kMax.
Referenced by Heap::NotifyContextDisposed(), and TEST().
MaybeObject * Allocate | ( | Map * | map, |
AllocationSpace | space, | ||
AllocationSite * | allocation_site = NULL |
||
) |
Definition at line 4345 of file heap.cc.
References Heap::AllocateRaw(), ASSERT, HeapObject::cast(), Map::instance_size(), Map::instance_type(), AllocationMemento::kSize, v8::internal::MAP_TYPE, v8::internal::NEW_SPACE, Heap::NOT_IN_GC, v8::internal::NULL, HeapObject::set_map_no_write_barrier(), and Heap::TargetSpaceId().
Referenced by Heap::AllocateAllocationSite(), Heap::AllocateExternalStringFromAscii(), Heap::AllocateExternalStringFromTwoByte(), Heap::AllocateForeign(), Heap::AllocateFunction(), Heap::AllocateJSFunctionProxy(), Heap::AllocateJSMessageObject(), Heap::AllocateJSObjectFromMap(), Heap::AllocateJSProxy(), Heap::AllocateSharedFunctionInfo(), and Heap::AllocateStruct().
MaybeObject * AllocateAccessorPair | ( | ) |
Definition at line 2693 of file heap.cc.
References v8::internal::ACCESSOR_PAIR_TYPE, Heap::AllocateStruct(), Smi::FromInt(), AccessorPair::set_access_flags(), and v8::internal::SKIP_WRITE_BARRIER.
MaybeObject * AllocateAliasedArgumentsEntry | ( | int | slot | ) |
Definition at line 2716 of file heap.cc.
References v8::internal::ALIASED_ARGUMENTS_ENTRY_TYPE, Heap::AllocateStruct(), and AliasedArgumentsEntry::set_aliased_context_slot().
MaybeObject * AllocateAllocationSite | ( | ) |
Definition at line 3031 of file heap.cc.
References Heap::Allocate(), Heap::allocation_sites_list(), AllocationSite::Initialize(), v8::internal::OLD_POINTER_SPACE, and Heap::set_allocation_sites_list().
MaybeObject * AllocateArgumentsObject | ( | Object * | callee, |
int | length | ||
) |
Definition at line 4401 of file heap.cc.
References HeapObject::address(), Heap::AllocateRaw(), ASSERT, HeapObject::cast(), JSObject::cast(), JSFunction::cast(), Isolate::context(), Heap::CopyBlock(), Smi::FromInt(), JSObject::InObjectPropertyAtPut(), Map::instance_size(), Heap::isolate(), Heap::kArgumentsCalleeIndex, Heap::kArgumentsLengthIndex, JSObject::kHeaderSize, Heap::kSloppyArgumentsObjectSize, Heap::kStrictArgumentsObjectSize, HeapObject::map(), Context::native_context(), v8::internal::NEW_SPACE, v8::internal::OLD_POINTER_SPACE, v8::internal::SKIP_WRITE_BARRIER, and v8::internal::STRICT.
MaybeObject * AllocateBlockContext | ( | JSFunction * | function, |
Context * | previous, | ||
ScopeInfo * | info | ||
) |
Definition at line 5610 of file heap.cc.
References Heap::AllocateFixedArrayWithHoles(), ScopeInfo::ContextLength(), Context::global_object(), Context::set_closure(), Context::set_extension(), Context::set_global_object(), HeapObject::set_map_no_write_barrier(), and Context::set_previous().
MaybeObject * AllocateByteArray | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 3987 of file heap.cc.
References Heap::AllocateRaw(), Heap::FatalProcessOutOfMemory(), ByteArray::kMaxLength, v8::internal::OLD_DATA_SPACE, and ByteArray::SizeFor().
Referenced by Heap::CopyCode(), and Heap::CreateCode().
MaybeObject * AllocateCatchContext | ( | JSFunction * | function, |
Context * | previous, | ||
String * | name, | ||
Object * | thrown_object | ||
) |
Definition at line 5572 of file heap.cc.
References Heap::AllocateFixedArray(), Context::global_object(), Context::MIN_CONTEXT_SLOTS, FixedArray::set(), Context::set_closure(), Context::set_extension(), Context::set_global_object(), HeapObject::set_map_no_write_barrier(), Context::set_previous(), v8::internal::STATIC_ASSERT(), and Context::THROWN_OBJECT_INDEX.
MaybeObject * AllocateCodeCache | ( | ) |
Definition at line 2677 of file heap.cc.
References Heap::AllocateStruct(), v8::internal::CODE_CACHE_TYPE, and v8::internal::SKIP_WRITE_BARRIER.
Referenced by Map::UpdateCodeCache().
MaybeObject * AllocateConstantPoolArray | ( | int | number_of_int64_entries, |
int | number_of_code_ptr_entries, | ||
int | number_of_heap_ptr_entries, | ||
int | number_of_int32_entries | ||
) |
Definition at line 5396 of file heap.cc.
References Heap::AllocateRaw(), ASSERT, HeapObject::cast(), ConstantPoolArray::first_code_ptr_index(), ConstantPoolArray::first_heap_ptr_index(), Heap::isolate(), v8::internal::kPointerSize, v8::internal::MemsetPointer(), ConstantPoolArray::OffsetOfElementAt(), v8::internal::OLD_POINTER_SPACE, HeapObject::RawField(), HeapObject::set_map_no_write_barrier(), ConstantPoolArray::SetEntryCounts(), ConstantPoolArray::SizeFor(), and v8::internal::TENURED.
Referenced by Heap::CopyConstantPoolArrayWithMap().
|
inline |
Definition at line 713 of file heap.h.
References Heap::AllocateJSArrayAndStorage(), and v8::internal::DONT_INITIALIZE_ARRAY_ELEMENTS.
MaybeObject * AllocateExternal | ( | void * | value | ) |
Definition at line 5637 of file heap.cc.
References Heap::AllocateForeign(), Heap::AllocateJSObjectFromMap(), and JSObject::SetInternalField().
MaybeObject * AllocateExternalArray | ( | int | length, |
ExternalArrayType | array_type, | ||
void * | external_pointer, | ||
PretenureFlag | pretenure | ||
) |
Definition at line 4046 of file heap.cc.
References Heap::AllocateRaw(), ExternalArray::kAlignedSize, Heap::MapForExternalArrayType(), and v8::internal::OLD_DATA_SPACE.
MaybeObject * AllocateExternalStringFromAscii | ( | const ExternalAsciiString::Resource * | resource | ) |
Definition at line 3912 of file heap.cc.
References Heap::Allocate(), ExternalAsciiString::cast(), Heap::isolate(), Name::kEmptyHashField, String::kMaxLength, String::ExternalAsciiStringResource::length(), v8::internal::NEW_SPACE, Name::set_hash_field(), String::set_length(), ExternalAsciiString::set_resource(), and Isolate::ThrowInvalidStringLength().
MaybeObject * AllocateExternalStringFromTwoByte | ( | const ExternalTwoByteString::Resource * | resource | ) |
Definition at line 3934 of file heap.cc.
References Heap::Allocate(), ExternalTwoByteString::cast(), String::ExternalStringResource::data(), Heap::isolate(), String::IsOneByte(), Name::kEmptyHashField, String::kMaxLength, String::ExternalStringResource::length(), v8::internal::NEW_SPACE, Name::set_hash_field(), String::set_length(), ExternalTwoByteString::set_resource(), and Isolate::ThrowInvalidStringLength().
MaybeObject * AllocateFixedArray | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5297 of file heap.cc.
Referenced by ElementsAccessorBase< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS > >::AddElementsToFixedArray(), SharedFunctionInfo::AddToOptimizedCodeMap(), DescriptorArray::Allocate(), DeoptimizationInputData::Allocate(), DeoptimizationOutputData::Allocate(), Heap::AllocateCatchContext(), Heap::AllocateFunctionContext(), Heap::AllocateGlobalContext(), Heap::AllocateHashTable(), Heap::AllocateJSObjectFromMap(), Heap::AllocateModuleContext(), Heap::AllocateNativeContext(), Heap::AllocateScopeInfo(), Heap::AllocateWithContext(), CodeCacheHashTableKey::AsObject(), StringSharedKey::AsObject(), FixedArray::CopySize(), Heap::CreateApiObjects(), Dictionary< Shape, Key >::GenerateNewEnumerationIndices(), Heap::ReinitializeJSGlobalProxy(), Heap::ReinitializeJSReceiver(), TEST(), and NameDictionary::TransformPropertiesToFastFor().
MaybeObject * AllocateFixedArrayWithHoles | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5302 of file heap.cc.
Referenced by Heap::AllocateBlockContext(), Heap::AllocateJSArrayAndStorage(), and Heap::AllocateJSArrayStorage().
MaybeObject * AllocateFixedDoubleArrayWithHoles | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5355 of file heap.cc.
References FixedArrayBase::set_length(), HeapObject::set_map_no_write_barrier(), and FixedDoubleArray::set_the_hole().
Referenced by Heap::AllocateJSArrayAndStorage(), and Heap::AllocateJSArrayStorage().
MaybeObject * AllocateFixedTypedArray | ( | int | length, |
ExternalArrayType | array_type, | ||
PretenureFlag | pretenure | ||
) |
Definition at line 4087 of file heap.cc.
References Heap::AllocateRaw(), FixedTypedArrayBase::DataPtr(), FixedTypedArrayBase::DataSize(), FixedTypedArrayBase::kDataOffset, v8::kExternalFloat64Array, v8::internal::kPointerSize, Heap::MapForFixedTypedArray(), OBJECT_POINTER_ALIGN, v8::internal::OLD_DATA_SPACE, FixedArrayBase::set_length(), and HeapObject::set_map().
MaybeObject * AllocateForeign | ( | Address | address, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 3837 of file heap.cc.
References Heap::Allocate(), Page::kMaxRegularHeapObjectSize, Foreign::kSize, v8::internal::NEW_SPACE, v8::internal::OLD_DATA_SPACE, Foreign::set_foreign_address(), v8::internal::STATIC_ASSERT(), and v8::internal::TENURED.
Referenced by Heap::AllocateExternal().
MaybeObject * AllocateFunction | ( | Map * | function_map, |
SharedFunctionInfo * | shared, | ||
Object * | prototype, | ||
PretenureFlag | pretenure = TENURED |
||
) |
Definition at line 4386 of file heap.cc.
References Heap::Allocate(), JSFunction::cast(), v8::internal::NEW_SPACE, v8::internal::OLD_POINTER_SPACE, and v8::internal::TENURED.
Referenced by TEST().
MaybeObject * AllocateFunctionContext | ( | int | length, |
JSFunction * | function | ||
) |
Definition at line 5556 of file heap.cc.
References Heap::AllocateFixedArray(), ASSERT, Smi::FromInt(), Context::MIN_CONTEXT_SLOTS, Context::set_closure(), Context::set_extension(), Context::set_global_object(), HeapObject::set_map_no_write_barrier(), and Context::set_previous().
MaybeObject * AllocateGlobalContext | ( | JSFunction * | function, |
ScopeInfo * | scope_info | ||
) |
Definition at line 5523 of file heap.cc.
References Heap::AllocateFixedArray(), ASSERT, ScopeInfo::ContextLength(), Context::IsGlobalContext(), Context::set_closure(), Context::set_extension(), Context::set_global_object(), HeapObject::set_map_no_write_barrier(), Context::set_previous(), and v8::internal::TENURED.
MaybeObject * AllocateHashTable | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5457 of file heap.cc.
References Heap::AllocateFixedArray(), and ASSERT.
MaybeObject * AllocateHeapNumber | ( | double | value, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 2969 of file heap.cc.
References Heap::AllocateRaw(), HeapObject::cast(), HeapNumber::cast(), Page::kMaxRegularHeapObjectSize, HeapNumber::kSize, v8::internal::OLD_DATA_SPACE, HeapObject::set_map_no_write_barrier(), HeapNumber::set_value(), and v8::internal::STATIC_ASSERT().
Referenced by Object::AllocateNewStorageFor(), Heap::NumberFromDouble(), Heap::NumberFromInt32(), Heap::NumberFromUint32(), JSObject::PrepareSlowElementsForSort(), v8::internal::RUNTIME_FUNCTION(), ExternalFloat32Array::SetValue(), and ExternalFloat64Array::SetValue().
|
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().
|
inline |
Referenced by InternalizedStringKey::AsObject().
MUST_USE_RESULT MaybeObject* AllocateInternalizedStringImpl | ( | T | t, |
int | chars, | ||
uint32_t | hash_field | ||
) |
MaybeObject* AllocateInternalizedStringImpl | ( | T | t, |
int | chars, | ||
uint32_t | hash_field | ||
) |
Definition at line 5034 of file heap.cc.
References Heap::AllocateRaw(), ASSERT, ASSERT_EQ, String::cast(), SeqOneByteString::cast(), SeqTwoByteString::cast(), Heap::isolate(), String::kMaxLength, v8::internal::map, v8::internal::OLD_DATA_SPACE, Name::set_hash_field(), String::set_length(), v8::internal::size, HeapObject::Size(), SeqOneByteString::SizeFor(), SeqTwoByteString::SizeFor(), v8::internal::TENURED, and Isolate::ThrowInvalidStringLength().
MaybeObject * AllocateJSArrayAndStorage | ( | ElementsKind | elements_kind, |
int | length, | ||
int | capacity, | ||
ArrayStorageAllocationMode | mode = DONT_INITIALIZE_ARRAY_ELEMENTS , |
||
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 4564 of file heap.cc.
References Heap::AllocateFixedArrayWithHoles(), Heap::AllocateFixedDoubleArrayWithHoles(), Heap::AllocateUninitializedFixedArray(), Heap::AllocateUninitializedFixedDoubleArray(), ASSERT, v8::internal::DONT_INITIALIZE_ARRAY_ELEMENTS, Smi::FromInt(), v8::internal::INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, v8::internal::IsFastDoubleElementsKind(), v8::internal::IsFastSmiOrObjectElementsKind(), v8::internal::NULL, and JSArray::set_length().
Referenced by Heap::AllocateEmptyJSArray().
MUST_USE_RESULT MaybeObject* AllocateJSArrayBuffer | ( | ) |
MaybeObject * AllocateJSArrayStorage | ( | JSArray * | array, |
int | length, | ||
int | capacity, | ||
ArrayStorageAllocationMode | mode = DONT_INITIALIZE_ARRAY_ELEMENTS |
||
) |
Definition at line 4610 of file heap.cc.
References Heap::AllocateFixedArrayWithHoles(), Heap::AllocateFixedDoubleArrayWithHoles(), Heap::AllocateUninitializedFixedArray(), Heap::AllocateUninitializedFixedDoubleArray(), ASSERT, v8::internal::DONT_INITIALIZE_ARRAY_ELEMENTS, Smi::FromInt(), JSObject::GetElementsKind(), v8::internal::INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, v8::internal::IsFastDoubleElementsKind(), v8::internal::IsFastSmiOrObjectElementsKind(), v8::internal::NULL, and JSArray::set_length().
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 | ||
) |
Definition at line 4686 of file heap.cc.
References Heap::Allocate(), Heap::AllocateMap(), Smi::FromInt(), JSProxy::InitializeBody(), Map::instance_size(), v8::internal::JS_FUNCTION_PROXY_TYPE, JSFunctionProxy::kSize, v8::internal::map, v8::internal::NEW_SPACE, and v8::internal::SKIP_WRITE_BARRIER.
MaybeObject * AllocateJSMessageObject | ( | String * | type, |
JSArray * | arguments, | ||
int | start_position, | ||
int | end_position, | ||
Object * | script, | ||
Object * | stack_frames | ||
) |
Definition at line 3888 of file heap.cc.
References Heap::Allocate(), JSMessageObject::cast(), JSObject::initialize_elements(), v8::internal::message, v8::internal::NEW_SPACE, JSMessageObject::set_end_position(), JSMessageObject::set_start_position(), and v8::internal::SKIP_WRITE_BARRIER.
Definition at line 4549 of file heap.cc.
References Heap::AllocateJSObjectFromMap(), Heap::AllocateMap(), v8::internal::JS_MODULE_TYPE, JSModule::kSize, v8::internal::map, and v8::internal::TENURED.
MaybeObject * AllocateJSObject | ( | JSFunction * | constructor, |
PretenureFlag | pretenure = NOT_TENURED , |
||
AllocationSite * | allocation_site = NULL |
||
) |
Definition at line 4530 of file heap.cc.
References Heap::AllocateJSObjectFromMap(), ASSERT, JSFunction::has_initial_map(), and JSFunction::initial_map().
Referenced by TEST().
MaybeObject * AllocateJSObjectFromMap | ( | Map * | map, |
PretenureFlag | pretenure = NOT_TENURED , |
||
bool | alloc_props = true , |
||
AllocationSite * | allocation_site = NULL |
||
) |
Definition at line 4488 of file heap.cc.
References Heap::Allocate(), Heap::AllocateFixedArray(), ASSERT, JSObject::cast(), Map::InitialPropertiesLength(), Map::instance_size(), Map::instance_type(), v8::internal::JS_BUILTINS_OBJECT_TYPE, v8::internal::JS_FUNCTION_TYPE, v8::internal::JS_GLOBAL_OBJECT_TYPE, obj, and v8::internal::OLD_POINTER_SPACE.
Referenced by Heap::AllocateExternal(), Heap::AllocateJSModule(), Heap::AllocateJSObject(), Heap::CreateApiObjects(), and TEST().
Definition at line 4666 of file heap.cc.
References Heap::Allocate(), Heap::AllocateMap(), Smi::FromInt(), JSProxy::InitializeBody(), Map::instance_size(), v8::internal::JS_PROXY_TYPE, JSProxy::kSize, v8::internal::map, v8::internal::NEW_SPACE, and v8::internal::SKIP_WRITE_BARRIER.
MaybeObject * AllocateMap | ( | InstanceType | instance_type, |
int | instance_size, | ||
ElementsKind | elements_kind = TERMINAL_FAST_ELEMENTS_KIND |
||
) |
Definition at line 2643 of file heap.cc.
References Heap::AllocateRaw(), DependentCode::cast(), BitFieldBase< int, shift, size, uint32_t >::encode(), BitFieldBase< bool, shift, size, uint32_t >::encode(), StaticVisitorBase::GetVisitorId(), Map::init_back_pointer(), Map::kIsExtensible, Map::kSize, v8::internal::map, v8::internal::MAP_SPACE, Map::set_bit_field(), Map::set_bit_field2(), Map::set_bit_field3(), Map::set_elements_kind(), Map::set_inobject_properties(), Map::set_instance_size(), Map::set_instance_type(), HeapObject::set_map_no_write_barrier(), Map::set_pre_allocated_property_fields(), Map::set_unused_property_fields(), Map::set_visitor_id(), and v8::internal::SKIP_WRITE_BARRIER.
Referenced by Heap::AllocateJSFunctionProxy(), Heap::AllocateJSModule(), Heap::AllocateJSProxy(), Heap::CreateApiObjects(), Map::RawCopy(), Heap::ReinitializeJSReceiver(), and TEST().
MaybeObject * AllocateModuleContext | ( | ScopeInfo * | scope_info | ) |
Definition at line 5542 of file heap.cc.
References Heap::AllocateFixedArray(), ScopeInfo::ContextLength(), Smi::FromInt(), Context::set_extension(), HeapObject::set_map_no_write_barrier(), and v8::internal::TENURED.
MaybeObject * AllocateNativeContext | ( | ) |
Definition at line 5508 of file heap.cc.
References Heap::AllocateFixedArray(), ASSERT, Context::IsNativeContext(), Context::NATIVE_CONTEXT_SLOTS, and HeapObject::set_map_no_write_barrier().
|
inline |
Definition at line 138 of file heap-inl.h.
References HeapObject::address(), Heap::AllocateRaw(), ASSERT_EQ, String::cast(), Heap::isolate(), SeqString::kHeaderSize, String::kMaxLength, Vector< T >::length(), v8::internal::map, OS::MemCopy(), v8::internal::OLD_DATA_SPACE, Name::set_hash_field(), String::set_length(), v8::internal::size, HeapObject::Size(), SeqOneByteString::SizeFor(), Vector< T >::start(), v8::internal::TENURED, and Isolate::ThrowInvalidStringLength().
Referenced by Heap::AllocateInternalizedStringFromUtf8(), OneByteStringKey::AsObject(), and SubStringKey< Char >::AsObject().
MaybeObject * AllocatePartialMap | ( | InstanceType | instance_type, |
int | instance_size | ||
) |
Definition at line 2619 of file heap.cc.
References Heap::AllocateRaw(), BitFieldBase< int, shift, size, uint32_t >::encode(), BitFieldBase< bool, shift, size, uint32_t >::encode(), StaticVisitorBase::GetVisitorId(), Map::kSize, and v8::internal::MAP_SPACE.
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().
|
inline |
Definition at line 217 of file heap-inl.h.
References HeapObject::address(), PagedSpace::AllocateRaw(), LargeObjectSpace::AllocateRaw(), HeapProfiler::AllocationEvent(), Heap::always_allocate(), ASSERT, v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, Isolate::counters(), Isolate::heap_profiler(), HeapProfiler::is_tracking_allocations(), v8::internal::LO_SPACE, v8::internal::MAP_SPACE, v8::internal::NEW_SPACE, v8::internal::NOT_EXECUTABLE, Heap::NOT_IN_GC, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, v8::internal::profiler(), v8::internal::PROPERTY_CELL_SPACE, and Failure::RetryAfterGC().
Referenced by Heap::Allocate(), Heap::AllocateArgumentsObject(), Heap::AllocateByteArray(), Heap::AllocateConstantPoolArray(), Heap::AllocateExternalArray(), Heap::AllocateFixedTypedArray(), Heap::AllocateHeapNumber(), Heap::AllocateInternalizedStringImpl(), Heap::AllocateMap(), Heap::AllocateOneByteInternalizedString(), Heap::AllocatePartialMap(), Heap::AllocateRawOneByteString(), Heap::AllocateRawTwoByteString(), Heap::AllocateSymbol(), Heap::AllocateTwoByteInternalizedString(), Heap::CopyCode(), Heap::CopyJSObject(), Heap::CreateCode(), and TEST().
MaybeObject * AllocateRawOneByteString | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5087 of file heap.cc.
References Heap::AllocateRaw(), ASSERT, ASSERT_EQ, HeapObject::cast(), String::cast(), Heap::isolate(), Name::kEmptyHashField, String::kMaxLength, SeqOneByteString::kMaxSize, v8::internal::OLD_DATA_SPACE, Name::set_hash_field(), String::set_length(), HeapObject::set_map_no_write_barrier(), SeqOneByteString::SizeFor(), and Isolate::ThrowInvalidStringLength().
Referenced by Heap::AllocateStringFromOneByte(), and Heap::AllocateStringFromTwoByte().
MaybeObject * AllocateRawTwoByteString | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5111 of file heap.cc.
References Heap::AllocateRaw(), ASSERT, ASSERT_EQ, HeapObject::cast(), String::cast(), Heap::isolate(), Name::kEmptyHashField, String::kMaxLength, SeqTwoByteString::kMaxSize, v8::internal::OLD_DATA_SPACE, Name::set_hash_field(), String::set_length(), HeapObject::set_map_no_write_barrier(), SeqTwoByteString::SizeFor(), and Isolate::ThrowInvalidStringLength().
Referenced by Heap::AllocateStringFromTwoByte(), Heap::AllocateStringFromUtf8Slow(), and Heap::LookupSingleCharacterStringFromCode().
MaybeObject * AllocateScopeInfo | ( | int | length | ) |
Definition at line 5628 of file heap.cc.
References Heap::AllocateFixedArray(), HeapObject::set_map_no_write_barrier(), and v8::internal::TENURED.
MaybeObject * AllocateSharedFunctionInfo | ( | Object * | name | ) |
Definition at line 3849 of file heap.cc.
References Heap::Allocate(), Builtins::builtin(), Isolate::builtins(), ScopeInfo::Empty(), Smi::FromInt(), v8::internal::OLD_POINTER_SPACE, SharedFunctionInfo::set_ast_node_count(), SharedFunctionInfo::set_compiler_hints(), SharedFunctionInfo::set_counters(), SharedFunctionInfo::set_end_position(), SharedFunctionInfo::set_expected_nof_properties(), SharedFunctionInfo::set_formal_parameter_count(), SharedFunctionInfo::set_function_token_position(), SharedFunctionInfo::set_length(), SharedFunctionInfo::set_num_literals(), SharedFunctionInfo::set_opt_count_and_bailout_reason(), SharedFunctionInfo::set_start_position_and_type(), and v8::internal::SKIP_WRITE_BARRIER.
Referenced by Heap::ReinitializeJSReceiver(), and TEST().
MaybeObject * AllocateStringFromOneByte | ( | Vector< const uint8_t > | str, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 4885 of file heap.cc.
References Heap::AllocateRawOneByteString(), SeqOneByteString::cast(), v8::internal::CopyChars(), and Heap::LookupSingleCharacterStringFromCode().
Referenced by Heap::AllocateStringFromOneByte(), Heap::AllocateStringFromUtf8(), and Heap::NumberToString().
|
inline |
Definition at line 868 of file heap.h.
References Heap::AllocateStringFromOneByte().
MaybeObject * AllocateStringFromTwoByte | ( | Vector< const uc16 > | str, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 4939 of file heap.cc.
References Heap::AllocateRawOneByteString(), Heap::AllocateRawTwoByteString(), SeqOneByteString::cast(), SeqTwoByteString::cast(), v8::internal::CopyChars(), and String::IsOneByte().
|
inline |
Definition at line 88 of file heap-inl.h.
References Heap::AllocateStringFromOneByte(), Heap::AllocateStringFromUtf8Slow(), Vector< T >::length(), String::NonAsciiStart(), and Vector< T >::start().
MaybeObject * AllocateStringFromUtf8Slow | ( | Vector< const char > | str, |
int | non_ascii_start, | ||
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 4905 of file heap.cc.
References Heap::AllocateRawTwoByteString(), ASSERT, SeqTwoByteString::cast(), SeqTwoByteString::GetChars(), Isolate::unicode_cache(), and UnicodeCache::utf8_decoder().
Referenced by Heap::AllocateStringFromUtf8().
MaybeObject * AllocateStruct | ( | InstanceType | type | ) |
Definition at line 5651 of file heap.cc.
References Heap::Allocate(), Struct::cast(), Struct::InitializeBody(), Map::instance_size(), Failure::InternalError(), MAKE_CASE, v8::internal::map, v8::internal::OLD_POINTER_SPACE, STRUCT_LIST, v8::internal::TENURED, and UNREACHABLE.
Referenced by Heap::AllocateAccessorPair(), Heap::AllocateAliasedArgumentsEntry(), Heap::AllocateCodeCache(), Heap::AllocatePolymorphicCodeCache(), and Heap::AllocateTypeFeedbackInfo().
MaybeObject * AllocateSymbol | ( | ) |
Definition at line 5469 of file heap.cc.
References Heap::AllocateRaw(), ASSERT, HeapObject::cast(), Symbol::cast(), Smi::FromInt(), Heap::isolate(), Name::kHashBitMask, Name::kHashShift, Name::kIsNotArrayIndexMask, Page::kMaxRegularHeapObjectSize, Symbol::kSize, v8::internal::OLD_POINTER_SPACE, Isolate::random_number_generator(), Name::set_hash_field(), HeapObject::set_map_no_write_barrier(), and v8::internal::STATIC_ASSERT().
Referenced by Heap::AllocatePrivateSymbol().
|
inline |
Definition at line 171 of file heap-inl.h.
References HeapObject::address(), Heap::AllocateRaw(), ASSERT_EQ, String::cast(), Heap::isolate(), SeqString::kHeaderSize, String::kMaxLength, v8::internal::kUC16Size, Vector< T >::length(), v8::internal::map, OS::MemCopy(), v8::internal::OLD_DATA_SPACE, Name::set_hash_field(), String::set_length(), v8::internal::size, HeapObject::Size(), SeqTwoByteString::SizeFor(), Vector< T >::start(), v8::internal::TENURED, and Isolate::ThrowInvalidStringLength().
Referenced by TwoByteStringKey::AsObject(), and SubStringKey< Char >::AsObject().
MaybeObject * AllocateTypeFeedbackInfo | ( | ) |
Definition at line 2705 of file heap.cc.
References Heap::AllocateStruct(), v8::internal::info, TypeFeedbackInfo::initialize_storage(), v8::internal::SKIP_WRITE_BARRIER, and v8::internal::TYPE_FEEDBACK_INFO_TYPE.
MaybeObject * AllocateUninitializedFixedArray | ( | int | length | ) |
Definition at line 5308 of file heap.cc.
References FixedArray::cast(), v8::internal::NOT_TENURED, obj, and FixedArrayBase::set_length().
Referenced by Heap::AllocateJSArrayAndStorage(), Heap::AllocateJSArrayStorage(), and PolymorphicCodeCacheHashTableKey::AsObject().
MaybeObject * AllocateUninitializedFixedDoubleArray | ( | int | length, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 5338 of file heap.cc.
References FixedArrayBase::set_length(), and HeapObject::set_map_no_write_barrier().
Referenced by Heap::AllocateJSArrayAndStorage(), and Heap::AllocateJSArrayStorage().
MaybeObject * AllocateWithContext | ( | JSFunction * | function, |
Context * | previous, | ||
JSReceiver * | extension | ||
) |
Definition at line 5593 of file heap.cc.
References Heap::AllocateFixedArray(), Context::global_object(), Context::MIN_CONTEXT_SLOTS, Context::set_closure(), Context::set_extension(), Context::set_global_object(), HeapObject::set_map_no_write_barrier(), and Context::set_previous().
|
inline |
Definition at line 1364 of file heap.h.
Referenced by Heap::AllocateAllocationSite(), Heap::DeoptMarkedAllocationSites(), Deserializer::Deserialize(), AllocationSite::IsNestedSite(), and TEST().
|
inline |
Definition at line 421 of file heap-inl.h.
References HeapObject::address(), ExternalString::cast(), v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, v8::internal::CODE_TYPE, MemoryChunk::FromAddress(), Space::identity(), Map::instance_type(), ExternalString::is_short(), Object::IsFiller(), v8::internal::LO_SPACE, HeapObject::map(), v8::internal::MAP_SPACE, v8::internal::NEW_SPACE, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, MemoryChunk::owner(), v8::internal::PROPERTY_CELL_SPACE, Heap::TargetSpaceId(), and UNREACHABLE.
|
inline |
Definition at line 668 of file heap.h.
Referenced by Heap::AllocateRaw(), Heap::CopyJSObject(), and TEST().
|
inline |
Definition at line 1872 of file heap.h.
Referenced by StatisticsExtension::GetCounters().
|
inline |
Definition at line 1359 of file heap.h.
Referenced by Runtime::SetupArrayBuffer().
intptr_t Available | ( | ) |
Definition at line 247 of file heap.cc.
References PagedSpace::Available(), NewSpace::Available(), and Heap::HasBeenSetUp().
Referenced by Heap::PrintShortHeapStatistics(), and Heap::SetUp().
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().
bool CanMoveObjectStart | ( | HeapObject * | object | ) |
Definition at line 4019 of file heap.cc.
References Heap::Contains(), MemoryChunk::FromAddress(), Heap::InOldDataSpace(), Heap::InOldPointerSpace(), Heap::lo_space(), MemoryChunk::parallel_sweeping(), and MemoryChunk::PARALLEL_SWEEPING_FINALIZE.
Referenced by v8::internal::BUILTIN().
intptr_t Capacity | ( | ) |
Definition at line 189 of file heap.cc.
References PagedSpace::Capacity(), NewSpace::Capacity(), and Heap::HasBeenSetUp().
Referenced by Heap::SetUp().
|
inline |
Definition at line 642 of file heap.h.
Referenced by MarkCompactCollector::ClearMarkbits(), StoreBuffer::Compact(), StoreBuffer::EnterDirectlyIntoStoreBuffer(), HeapSnapshotGenerator::GenerateSnapshot(), StatisticsExtension::GetCounters(), HeapObjectIterator::HeapObjectIterator(), StoreBuffer::Mark(), and Heap::paged_space().
void CheckNewSpaceExpansionCriteria | ( | ) |
Definition at line 1372 of file heap.cc.
References NewSpace::Capacity(), NewSpace::Grow(), and NewSpace::MaximumCapacity().
void CheckpointObjectStats | ( | ) |
Definition at line 7818 of file heap.cc.
References ADJUST_LAST_TIME_OBJECT_COUNT, CODE_AGE_LIST_COMPLETE, CODE_KIND_LIST, Isolate::counters(), FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST, INSTANCE_TYPE_LIST, Heap::isolate(), OS::MemCopy(), and LazyInstanceImpl< T, AllocationTrait, CreateTrait, InitOnceTrait, DestroyTrait >::Pointer().
void ClearAllICsByKind | ( | Code::Kind | kind | ) |
Definition at line 483 of file heap.cc.
References Code::cast(), Code::ClearInlineCaches(), v8::internal::code(), Heap::code_space(), Code::kind(), HeapObjectIterator::Next(), and v8::internal::NULL.
|
inline |
Definition at line 754 of file heap-inl.h.
Referenced by JSObject::SetPrototype().
void ClearJSFunctionResultCaches | ( | ) |
Definition at line 995 of file heap.cc.
References Isolate::bootstrapper(), Context::cast(), FixedArray::cast(), JSFunctionResultCache::cast(), FixedArray::get(), Bootstrapper::IsActive(), Context::JSFUNCTION_RESULT_CACHES_INDEX, FixedArrayBase::length(), and Context::NEXT_CONTEXT_LINK.
Referenced by THREADED_TEST().
void ClearNormalizedMapCaches | ( | ) |
Definition at line 1018 of file heap.cc.
References Isolate::bootstrapper(), Context::cast(), NormalizedMapCache::cast(), NormalizedMapCache::Clear(), FixedArray::get(), Heap::incremental_marking(), Bootstrapper::IsActive(), Context::NEXT_CONTEXT_LINK, and Context::NORMALIZED_MAP_CACHE_INDEX.
|
inline |
Definition at line 640 of file heap.h.
Referenced by Heap::ClearAllICsByKind(), MarkCompactCollector::ClearMarkbits(), StoreBuffer::Compact(), Heap::CopyCode(), Heap::CreateCode(), Deserializer::DeserializePartial(), StoreBuffer::EnterDirectlyIntoStoreBuffer(), InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer(), HeapSnapshotGenerator::GenerateSnapshot(), StatisticsExtension::GetCounters(), HeapObjectIterator::HeapObjectIterator(), StoreBuffer::Mark(), Heap::paged_space(), MarkCompactCollector::StartCompaction(), TEST(), and UNINITIALIZED_TEST().
void CollectAllAvailableGarbage | ( | const char * | gc_reason = NULL | ) |
Definition at line 743 of file heap.cc.
References CompilationCache::Clear(), Heap::CollectGarbage(), Isolate::compilation_cache(), OptimizingCompilerThread::Flush(), Heap::incremental_marking(), Heap::isolate(), Heap::kMakeHeapIterableMask, Heap::kNoGCFlags, Heap::kReduceMemoryFootprintMask, Heap::mark_compact_collector(), v8::internal::MARK_COMPACTOR, v8::internal::NULL, Isolate::optimizing_compiler_thread(), MarkCompactCollector::SetFlags(), NewSpace::Shrink(), and IncrementalMarking::UncommitMarkingDeque().
Referenced by DeclarationContext::Check(), V8::LowMemoryNotification(), ReleaseStackTraceDataTest(), TEST(), THREADED_TEST(), and UNINITIALIZED_TEST().
void CollectAllGarbage | ( | int | flags, |
const char * | gc_reason = NULL , |
||
const GCCallbackFlags | gc_callback_flags = kNoGCCallbackFlags |
||
) |
Definition at line 731 of file heap.cc.
References Heap::CollectGarbage(), Heap::kNoGCFlags, v8::internal::OLD_POINTER_SPACE, and MarkCompactCollector::SetFlags().
Referenced by Heap::AdjustAmountOfExternalAllocatedMemory(), DirectApiCallback(), DisposeAndForceGcCallback(), Heap::EnsureHeapIsIterable(), EpilogueCallbackAlloc(), FailedAccessCheckCallbackGC(), HeapProfiler::FindHeapObjectById(), HeapSnapshotGenerator::GenerateSnapshot(), StatisticsExtension::GetCounters(), Execution::HandleStackGuardInterrupt(), Heap::IdleNotification(), Logger::LogAccessorCallbacks(), Logger::LogCodeObjects(), Logger::LogCompiledFunctions(), main(), Runtime::PerformGC(), PrologueCallbackAlloc(), Isolate::RequestGarbageCollectionForTesting(), ThreadB::Run(), TEST(), TestViewFromApi(), THREADED_TEST(), and HeapObjectsMap::UpdateHeapObjectsMap().
|
inline |
Definition at line 554 of file heap-inl.h.
References v8::internal::NULL.
Referenced by DeclarationContext::Check(), Heap::CollectAllAvailableGarbage(), Heap::CollectAllGarbage(), Runtime::PerformGC(), Isolate::RequestGarbageCollectionForTesting(), Heap::ReserveSpace(), TEST(), and THREADED_TEST().
intptr_t CommittedMemory | ( | ) |
Definition at line 202 of file heap.cc.
References PagedSpace::CommittedMemory(), NewSpace::CommittedMemory(), Heap::HasBeenSetUp(), and LargeObjectSpace::Size().
Referenced by Isolate::GetHeapStatistics(), Heap::PrintShortHeapStatistics(), and Heap::UpdateMaximumCommitted().
intptr_t CommittedMemoryExecutable | ( | ) |
Definition at line 230 of file heap.cc.
References Heap::HasBeenSetUp(), Heap::isolate(), Isolate::memory_allocator(), and MemoryAllocator::SizeExecutable().
Referenced by Isolate::GetHeapStatistics().
size_t CommittedPhysicalMemory | ( | ) |
Definition at line 216 of file heap.cc.
References PagedSpace::CommittedPhysicalMemory(), NewSpace::CommittedPhysicalMemory(), LargeObjectSpace::CommittedPhysicalMemory(), and Heap::HasBeenSetUp().
Referenced by Isolate::GetHeapStatistics().
|
inline |
Definition at line 764 of file heap-inl.h.
bool ConfigureHeap | ( | int | max_semispace_size, |
intptr_t | max_old_gen_size, | ||
intptr_t | max_executable_size | ||
) |
Definition at line 6375 of file heap.cc.
References ASSERT, v8::internal::FIRST_PAGED_SPACE, Heap::HasBeenSetUp(), Snapshot::IsEnabled(), JSObject::kInitialMaxFastElementArray, Page::kMaxRegularHeapObjectSize, Page::kPageSize, AllocationMemento::kSize, JSArray::kSize, v8::internal::LAST_PAGED_SPACE, v8::internal::Max(), v8::internal::MB, v8::internal::Min(), v8::internal::PrintPID(), v8::internal::RoundUp(), v8::internal::RoundUpToPowerOf2(), and FixedArray::SizeFor().
Referenced by Heap::ConfigureHeapDefault(), v8::SetResourceConstraints(), and TEST().
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 | ( | Address | addr | ) |
Definition at line 5929 of file heap.cc.
References PagedSpace::Contains(), Heap::HasBeenSetUp(), MemoryAllocator::IsOutsideAllocatedSpace(), Isolate::memory_allocator(), LargeObjectSpace::SlowContains(), and NewSpace::ToSpaceContains().
Referenced by Heap::CanMoveObjectStart(), Heap::Contains(), HeapObject::HeapObjectShortPrint(), MarkCompactMarkingVisitor::INLINE(), JSObject::JSObjectShortPrint(), StringStream::PrintFunction(), StringStream::PrintSecurityTokenIfChanged(), StringStream::PrintUsingMap(), and VerifyPointersVisitor::VisitPointers().
bool Contains | ( | HeapObject * | value | ) |
Definition at line 5924 of file heap.cc.
References HeapObject::address(), and Heap::Contains().
MaybeObject * CopyAndTenureFixedCOWArray | ( | FixedArray * | src | ) |
Definition at line 5166 of file heap.cc.
References HeapObject::cast(), FixedArray::cast(), FixedArray::get(), HeapObject::GetWriteBarrierMode(), Heap::InNewSpace(), FixedArrayBase::length(), v8::internal::mode(), obj, FixedArray::set(), FixedArrayBase::set_length(), HeapObject::set_map_no_write_barrier(), and v8::internal::TENURED.
Definition at line 462 of file heap-inl.h.
References v8::internal::CopyWords(), and v8::internal::kPointerSize.
Referenced by Heap::AllocateArgumentsObject(), Heap::CopyCode(), Heap::CopyConstantPoolArrayWithMap(), Heap::CopyFixedArrayWithMap(), Heap::CopyFixedDoubleArrayWithMap(), and Heap::CopyJSObject().
MaybeObject * CopyCode | ( | Code * | code | ) |
Definition at line 4220 of file heap.cc.
References HeapObject::address(), Heap::AllocateRaw(), LargeObjectSpace::AllocateRaw(), ASSERT, Code::cast(), Isolate::code_range(), v8::internal::CODE_SPACE, Heap::code_space(), Code::constant_pool(), CodeRange::contains(), Heap::CopyBlock(), Heap::CopyConstantPoolArray(), v8::internal::EXECUTABLE, CodeRange::exists(), Code::Relocate(), Code::set_constant_pool(), and HeapObject::Size().
Definition at line 4261 of file heap.cc.
References HeapObject::address(), Heap::AllocateByteArray(), Heap::AllocateRaw(), LargeObjectSpace::AllocateRaw(), PagedSpace::AreaSize(), ASSERT, ByteArray::cast(), Code::cast(), Isolate::code_range(), v8::internal::CODE_SPACE, Heap::code_space(), Code::constant_pool(), CodeRange::contains(), v8::internal::CopyBytes(), Heap::CopyConstantPoolArray(), v8::internal::EXECUTABLE, CodeRange::exists(), Code::instruction_end(), Code::instruction_size(), v8::internal::kObjectAlignment, Vector< T >::length(), Code::Relocate(), Code::relocation_start(), v8::internal::RoundUp(), Code::set_constant_pool(), Code::SizeFor(), Vector< T >::start(), and v8::internal::TENURED.
|
inline |
Definition at line 212 of file heap-inl.h.
References Heap::CopyConstantPoolArrayWithMap(), and HeapObject::map().
Referenced by ConstantPoolArray::Copy(), and Heap::CopyCode().
MaybeObject * CopyConstantPoolArrayWithMap | ( | ConstantPoolArray * | src, |
Map * | map | ||
) |
Definition at line 5241 of file heap.cc.
References HeapObject::address(), Heap::AllocateConstantPoolArray(), HeapObject::cast(), Heap::CopyBlock(), ConstantPoolArray::count_of_code_ptr_entries(), ConstantPoolArray::count_of_heap_ptr_entries(), ConstantPoolArray::count_of_int32_entries(), ConstantPoolArray::count_of_int64_entries(), FixedArrayBase::kLengthOffset, obj, HeapObject::set_map_no_write_barrier(), and ConstantPoolArray::SizeFor().
Referenced by Heap::CopyConstantPoolArray().
|
inline |
Definition at line 202 of file heap-inl.h.
References Heap::CopyFixedArrayWithMap(), and HeapObject::map().
Referenced by FixedArray::Copy(), and Heap::CopyJSObject().
MaybeObject * CopyFixedArrayWithMap | ( | FixedArray * | src, |
Map * | map | ||
) |
Definition at line 5198 of file heap.cc.
References HeapObject::address(), HeapObject::cast(), FixedArray::cast(), Heap::CopyBlock(), FixedArray::get(), HeapObject::GetWriteBarrierMode(), Heap::InNewSpace(), v8::internal::kPointerSize, FixedArrayBase::length(), v8::internal::mode(), v8::internal::NOT_TENURED, obj, FixedArray::set(), FixedArrayBase::set_length(), HeapObject::set_map_no_write_barrier(), and FixedArray::SizeFor().
Referenced by Heap::CopyFixedArray(), and JSObject::EnsureWritableFastElements().
|
inline |
Definition at line 207 of file heap-inl.h.
References Heap::CopyFixedDoubleArrayWithMap(), and HeapObject::map().
Referenced by FixedDoubleArray::Copy(), and Heap::CopyJSObject().
MaybeObject * CopyFixedDoubleArrayWithMap | ( | FixedDoubleArray * | src, |
Map * | map | ||
) |
Definition at line 5224 of file heap.cc.
References HeapObject::address(), HeapObject::cast(), Heap::CopyBlock(), FixedArrayBase::kLengthOffset, FixedArrayBase::length(), v8::internal::NOT_TENURED, obj, HeapObject::set_map_no_write_barrier(), and FixedDoubleArray::SizeFor().
Referenced by Heap::CopyFixedDoubleArray().
MaybeObject * CopyJSObject | ( | JSObject * | source, |
AllocationSite * | site = NULL |
||
) |
Definition at line 4712 of file heap.cc.
References HeapObject::address(), Heap::AllocateRaw(), Heap::always_allocate(), ASSERT, AllocationSite::CanTrack(), HeapObject::cast(), JSObject::cast(), FixedArrayBase::cast(), FixedArray::cast(), FixedDoubleArray::cast(), Heap::CopyBlock(), Heap::CopyFixedArray(), Heap::CopyFixedDoubleArray(), JSObject::GetElementsKind(), JSObject::HasFastDoubleElements(), Heap::InNewSpace(), Map::instance_size(), JSObject::kHeaderSize, AllocationMemento::kSize, HeapObject::map(), v8::internal::NEW_SPACE, v8::internal::NULL, v8::internal::OLD_POINTER_SPACE, v8::internal::SKIP_WRITE_BARRIER, SLOW_ASSERT, and v8::internal::UPDATE_WRITE_BARRIER.
Referenced by JSObject::Copy(), JSObjectWalkVisitor< ContextObject >::StructureWalk(), and TEST().
bool CreateApiObjects | ( | ) |
Definition at line 3056 of file heap.cc.
References Heap::AllocateFixedArray(), Heap::AllocateJSObjectFromMap(), Heap::AllocateMap(), JSObject::cast(), FixedArray::cast(), Map::cast(), Smi::FromInt(), v8::internal::JS_OBJECT_TYPE, JSObject::kHeaderSize, obj, FixedArray::set(), Map::set_elements_kind(), and v8::internal::TERMINAL_FAST_ELEMENTS_KIND.
Referenced by Heap::CreateHeapObjects().
MaybeObject * CreateCode | ( | const CodeDesc & | desc, |
Code::Flags | flags, | ||
Handle< Object > | self_reference, | ||
bool | immovable = false , |
||
bool | crankshafted = false , |
||
int | prologue_offset = Code::kPrologueOffsetNotSet |
||
) |
Definition at line 4119 of file heap.cc.
References HeapObject::address(), Heap::AllocateByteArray(), Assembler::AllocateConstantPool(), Heap::AllocateRaw(), LargeObjectSpace::AllocateRaw(), PagedSpace::AreaSize(), ASSERT, Code::cast(), v8::internal::code(), Isolate::code_range(), v8::internal::CODE_SPACE, Heap::code_space(), MemoryChunk::Contains(), CodeRange::contains(), Code::CopyFrom(), Heap::CreateFillerObjectAt(), v8::internal::EXECUTABLE, CodeRange::exists(), PagedSpace::FirstPage(), Smi::FromInt(), CodeDesc::instr_size, v8::internal::IsAligned(), Isolate::IsDebuggerActive(), v8::internal::kCodeAlignment, Code::kind(), v8::internal::kObjectAlignment, CodeDesc::origin, Assembler::PopulateConstantPool(), CodeDesc::reloc_size, v8::internal::RoundUp(), Code::set_constant_pool(), Code::set_flags(), Code::set_has_debug_break_slots(), Code::set_ic_age(), Code::set_instruction_size(), Code::set_is_crankshafted(), HeapObject::set_map_no_write_barrier(), Code::set_marked_for_deoptimization(), Code::set_prologue_offset(), Code::set_raw_kind_specific_flags1(), Code::set_raw_kind_specific_flags2(), Code::SizeFor(), v8::internal::SKIP_WRITE_BARRIER, and v8::internal::TENURED.
Referenced by Builtins::SetUp(), and TEST().
void CreateFillerObjectAt | ( | Address | addr, |
int | size | ||
) |
Definition at line 4005 of file heap.cc.
References FreeSpace::cast(), HeapObject::FromAddress(), HeapObject::set_map_no_write_barrier(), and FreeSpace::set_size().
Referenced by NewSpace::AddFreshPage(), Heap::CreateCode(), PagedSpace::EvictEvacuationCandidatesFromFreeLists(), String::MakeExternal(), JSObject::MigrateToMap(), JSObject::NormalizeProperties(), Heap::ReinitializeJSReceiver(), TEST(), and SeqString::Truncate().
bool CreateHeapObjects | ( | ) |
Definition at line 6672 of file heap.cc.
References Heap::CreateApiObjects().
|
inline |
Definition at line 1295 of file heap.h.
References v8::internal::PrintF().
Referenced by MemoryChunk::set_scan_on_scavenge(), and MemoryChunk::Unlink().
void DeoptMarkedAllocationSites | ( | ) |
Definition at line 571 of file heap.cc.
References Heap::allocation_sites_list(), AllocationSite::cast(), AllocationSite::deopt_dependent_code(), Deoptimizer::DeoptimizeMarkedCode(), DependentCode::kAllocationSiteTenuringChangedGroup, and AllocationSite::set_deopt_dependent_code().
Referenced by Execution::HandleStackGuardInterrupt().
void DisableInlineAllocation | ( | ) |
Definition at line 6538 of file heap.cc.
References Heap::new_space(), v8::internal::NULL, and NewSpace::UpdateInlineAllocationLimit().
Referenced by HeapProfiler::StartHeapObjectsTracking(), and TEST().
|
inline |
Definition at line 1815 of file heap.h.
References VisitorDispatchTable< Callback >::GetVisitor(), v8::internal::map, and obj.
ExternalArray * EmptyExternalArrayForMap | ( | Map * | map | ) |
Definition at line 3807 of file heap.cc.
References FixedArrayBase::cast(), Map::elements_kind(), and Heap::RootIndexForEmptyExternalArray().
Referenced by JSObject::initialize_elements().
FixedTypedArrayBase * EmptyFixedTypedArrayForMap | ( | Map * | map | ) |
Definition at line 3813 of file heap.cc.
References FixedTypedArrayBase::cast(), Map::elements_kind(), and Heap::RootIndexForEmptyFixedTypedArray().
Referenced by JSObject::initialize_elements().
void EnableInlineAllocation | ( | ) |
Definition at line 6529 of file heap.cc.
References Heap::new_space(), and NewSpace::UpdateInlineAllocationLimit().
Referenced by HeapProfiler::StopHeapObjectsTracking(), and TEST().
void EnsureHeapIsIterable | ( | ) |
Definition at line 5679 of file heap.cc.
References ASSERT, Heap::CollectAllGarbage(), Heap::IsHeapIterable(), and Heap::kMakeHeapIterableMask.
Referenced by TEST().
|
inline |
Definition at line 1793 of file heap.h.
References PagedSpace::EnsureSweeperProgress(), Heap::old_data_space(), and Heap::old_pointer_space().
Referenced by IncrementalMarking::Step().
void EnsureWeakObjectToCodeTable | ( | ) |
Definition at line 6880 of file heap.cc.
References Heap::isolate(), and Heap::weak_object_to_code_table().
Referenced by v8::internal::AddWeakObjectToCodeDependency().
|
inline |
Definition at line 1799 of file heap.h.
Referenced by ExternalizeStringExtension::Externalize(), String::MakeExternal(), and String::NewExternal().
|
static |
Definition at line 6887 of file heap.cc.
References V8::FatalProcessOutOfMemory().
Referenced by HashTable< Shape, Key >::Allocate(), Heap::AllocateByteArray(), and Runtime::OutOfMemory().
|
inline |
Definition at line 291 of file heap-inl.h.
References ASSERT, String::ExternalStringResourceBase::Dispose(), v8::internal::kHeapObjectTag, ExternalString::kResourceOffset, and v8::internal::NULL.
Referenced by ExternalStringTable::TearDown(), and StringTableCleaner< finalize_external_strings >::VisitPointers().
void FreeQueuedChunks | ( | ) |
Definition at line 7742 of file heap.cc.
References MemoryChunk::ABOUT_TO_BE_FREED, MemoryChunk::address(), StoreBuffer::Compact(), StoreBuffer::Filter(), MemoryAllocator::Free(), MemoryChunk::FromAddress(), Isolate::heap(), Space::identity(), Page::kPageSize, v8::internal::LO_SPACE, Heap::lo_space(), Isolate::memory_allocator(), v8::internal::Min(), MemoryChunk::next_chunk(), v8::internal::NULL, MemoryChunk::owner(), MemoryChunk::set_owner(), MemoryChunk::set_size(), MemoryChunk::SetArea(), MemoryChunk::SetFlag(), MemoryChunk::size(), and Heap::store_buffer().
Referenced by PagedSpace::AdvanceSweeper(), and LargeObjectSpace::FreeUnmarkedObjects().
|
inline |
Definition at line 1508 of file heap.h.
Referenced by GlobalHandles::PostGarbageCollectionProcessing(), Heap::ProcessWeakReferences(), IncrementalMarking::Start(), IncrementalMarking::Step(), and IncrementalMarking::WorthActivating().
|
inline |
|
inline |
Definition at line 1746 of file heap.h.
Referenced by Heap::TearDown().
|
inline |
Definition at line 1743 of file heap.h.
Referenced by Heap::TearDown().
|
inline |
Definition at line 1749 of file heap.h.
Referenced by Heap::TearDown().
Definition at line 3599 of file heap.cc.
References Smi::cast(), String::cast(), and Object::Number().
Referenced by Heap::NumberToString().
|
inline |
Definition at line 1569 of file heap.h.
References v8::internal::NOT_TENURED, and v8::internal::TENURED.
|
inline |
Definition at line 1862 of file heap.h.
Referenced by Compiler::CompileScript(), Compiler::GetFunctionFromEval(), and Factory::NewFunctionFromSharedFunctionInfo().
bool HasBeenSetUp | ( | ) |
Definition at line 260 of file heap.cc.
References v8::internal::NULL.
Referenced by Heap::AdjustAmountOfExternalAllocatedMemory(), Heap::Available(), Heap::Capacity(), Heap::CommittedMemory(), Heap::CommittedMemoryExecutable(), Heap::CommittedPhysicalMemory(), Heap::ConfigureHeap(), Heap::Contains(), Heap::InSpace(), and Heap::UpdateMaximumCommitted().
|
inline |
Definition at line 1831 of file heap.h.
References ASSERT.
Referenced by check(), HeapObjectsMap::GenerateId(), Heap::InternalizeUtf8String(), Heap::LookupSingleCharacterStringFromCode(), and Heap::ReinitializeJSReceiver().
|
inline |
Definition at line 1349 of file heap.h.
Referenced by JSObject::DefineAccessor(), Isolate::MayNamedAccess(), JSObject::SetLocalPropertyIgnoreAttributes(), and JSObject::SetPropertyForResult().
bool IdleNotification | ( | int | hint | ) |
Definition at line 5710 of file heap.cc.
References Heap::AdvanceSweepers(), Heap::CollectAllGarbage(), Isolate::counters(), Serializer::enabled(), Heap::incremental_marking(), Heap::IsSweepingComplete(), IncrementalMarking::kAllocatedThreshold, Heap::kReduceMemoryFootprintMask, Heap::mark_compact_collector(), v8::internal::Max(), v8::internal::Min(), and IncrementalMarking::Start().
Referenced by V8::IdleNotification().
|
inline |
Definition at line 1730 of file heap.h.
References v8::internal::size.
Referenced by RegExpCompiler::Assemble().
|
inline |
Definition at line 1288 of file heap.h.
References v8::internal::PrintF().
Referenced by MemoryChunk::set_scan_on_scavenge().
|
inline |
Definition at line 1781 of file heap.h.
Referenced by Heap::AdjustLiveBytes(), FreeList::Allocate(), LargeObjectSpace::AllocateRaw(), Heap::ClearNormalizedMapCaches(), Heap::CollectAllAvailableGarbage(), MarkCompactCollector::CollectGarbage(), Map::DeprecateTarget(), CodeFlusher::EvictCandidate(), CodeFlusher::EvictOptimizedCodeMap(), HeapObject::GetWriteBarrierMode(), Heap::IdleNotification(), Page::Initialize(), IncrementalMarkingMarkingVisitor::INLINE(), MarkCompactCollector::InvalidateCode(), Heap::IterateAndMarkPointersToFromSpace(), Heap::MoveElements(), Heap::OldGenerationAllocationLimitReached(), MarkCompactCollector::Prepare(), IncrementalMarking::RecordWriteFromCode(), JSFunction::set_code(), HeapObject::set_map(), MemoryChunk::set_scan_on_scavenge(), Map::ShareDescriptor(), Heap::TearDown(), TEST(), Marking::TransferMark(), and IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental().
|
inline |
Definition at line 1734 of file heap.h.
References v8::internal::size.
Referenced by CodeGenerator::MakeCodeEpilogue().
|
inline |
|
inline |
Definition at line 321 of file heap-inl.h.
References NewSpace::FromSpaceContains().
Referenced by Heap::IterateAndMarkPointersToFromSpace(), CodeFlusher::IteratePointersToFromSpace(), ScavengeWeakObjectRetainer::RetainAs(), Heap::ScavengeObject(), Heap::UpdateAllocationSiteFeedback(), Heap::UpdateNewSpaceReferencesInExternalStringTable(), and PointersUpdatingVisitor::UpdateSlot().
|
inline |
Definition at line 1939 of file heap.h.
Referenced by Deserializer::Deserialize().
|
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 | ) |
|
inline |
Definition at line 1607 of file heap.h.
Referenced by FreeList::Allocate().
|
inline |
Definition at line 307 of file heap-inl.h.
References ASSERT, NewSpace::Contains(), Heap::InToSpace(), and Heap::NOT_IN_GC.
Referenced by ExternalStringTable::AddString(), Heap::AddWeakObjectToCodeDependency(), ExternalStringTable::CleanUp(), Map::ClearCodeCache(), Heap::CopyAndTenureFixedCOWArray(), Heap::CopyFixedArrayWithMap(), Heap::CopyJSObject(), GlobalHandles::Create(), EternalHandles::Create(), Runtime::CreateArrayLiteralBoilerplate(), FastElementsAccessor< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS >, kPointerSize >::DeleteCommon(), HashTable< Shape, Key >::EnsureCapacity(), HeapObject::GetWriteBarrierMode(), JSObject::InitializeBody(), Heap::InternalizedStringMapForString(), Heap::IterateAndMarkPointersToFromSpace(), MarkCompactCollector::MigrateObject(), Heap::MoveElements(), V8_FINAL< kOperandKind, kNumCachedOperands >::New(), FixedArray::NoIncrementalWriteBarrierSet(), FixedArray::NoWriteBarrierSet(), GlobalHandles::PostGarbageCollectionProcessing(), EternalHandles::PostGarbageCollectionProcessing(), JSObject::PrepareElementsForSort(), Heap::RootCanBeTreatedAsConstant(), Serializer::RootIndex(), HashTable< Shape, Key >::Shrink(), TEST(), THREADED_TEST(), KeyedLookupCache::Update(), IncrementalMarking::UpdateMarkingDequeAfterScavenge(), Heap::UpdateNewSpaceReferencesInExternalStringTable(), and NewSpaceScavenger::VisitPointer().
|
inline |
Definition at line 316 of file heap-inl.h.
References NewSpace::Contains().
|
inline |
|
inline |
Definition at line 341 of file heap-inl.h.
References PagedSpace::Contains().
Referenced by Heap::CanMoveObjectStart(), and Heap::InOldDataSpace().
|
inline |
Definition at line 346 of file heap-inl.h.
References Heap::InOldDataSpace().
|
inline |
Definition at line 331 of file heap-inl.h.
References PagedSpace::Contains().
Referenced by Heap::CanMoveObjectStart(), and Heap::InOldPointerSpace().
|
inline |
Definition at line 336 of file heap-inl.h.
References Heap::InOldPointerSpace().
bool InSpace | ( | Address | addr, |
AllocationSpace | space | ||
) |
Definition at line 5948 of file heap.cc.
References v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, PagedSpace::Contains(), Heap::HasBeenSetUp(), MemoryAllocator::IsOutsideAllocatedSpace(), v8::internal::LO_SPACE, v8::internal::MAP_SPACE, Isolate::memory_allocator(), v8::internal::NEW_SPACE, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, v8::internal::PROPERTY_CELL_SPACE, LargeObjectSpace::SlowContains(), and NewSpace::ToSpaceContains().
Referenced by Heap::InSpace(), Serializer::SpaceOfObject(), and TEST().
bool InSpace | ( | HeapObject * | value, |
AllocationSpace | space | ||
) |
Definition at line 5943 of file heap.cc.
References HeapObject::address(), and Heap::InSpace().
Definition at line 4959 of file heap.cc.
References v8::internal::CONS_ASCII_STRING_TYPE, v8::internal::CONS_STRING_TYPE, v8::internal::EXTERNAL_ASCII_STRING_TYPE, v8::internal::EXTERNAL_STRING_TYPE, v8::internal::EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, Heap::InNewSpace(), Map::instance_type(), HeapObject::map(), v8::internal::NULL, v8::internal::SHORT_EXTERNAL_ASCII_STRING_TYPE, v8::internal::SHORT_EXTERNAL_STRING_TYPE, v8::internal::SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, and v8::internal::STRING_TYPE.
Referenced by InternalizedStringKey::AsObject().
MaybeObject * InternalizeString | ( | String * | str | ) |
Definition at line 6009 of file heap.cc.
References ASSERT, Heap::kStringTableRootIndex, and v8::internal::NULL.
Referenced by RegExpResultsCache::Enter(), and NameDictionary::TransformPropertiesToFastFor().
Definition at line 6025 of file heap.cc.
Referenced by ContextSlotCache::Update(), and KeyedLookupCache::Update().
MaybeObject * InternalizeStringWithKey | ( | HashTableKey * | key | ) |
Definition at line 6034 of file heap.cc.
References ASSERT, Heap::kStringTableRootIndex, and v8::internal::NULL.
Referenced by Heap::InternalizeUtf8String(), Heap::LookupSingleCharacterStringFromCode(), and Heap::ReinitializeJSReceiver().
|
inline |
Definition at line 1222 of file heap.h.
References v8::internal::CStrVector().
Referenced by Oddball::Initialize(), Runtime::InitializeIntrinsicFunctionNames(), and TEST().
MaybeObject * InternalizeUtf8String | ( | Vector< const char > | str | ) |
Definition at line 6003 of file heap.cc.
References Heap::HashSeed(), and Heap::InternalizeStringWithKey().
|
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().
|
inline |
Definition at line 1510 of file heap.h.
Referenced by String::MakeExternal().
|
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().
|
inline |
Definition at line 105 of file heap-inl.h.
References Vector< T >::length().
|
inline |
Definition at line 113 of file heap-inl.h.
References String::IsOneByteRepresentation().
|
inlinestatic |
Referenced by Heap::AllocateInternalizedStringFromUtf8(), and Heap::AllocateInternalizedStringImpl().
|
inline |
Definition at line 1785 of file heap.h.
References MarkCompactCollector::IsConcurrentSweepingInProgress(), PagedSpace::IsLazySweepingComplete(), Heap::mark_compact_collector(), Heap::old_data_space(), and Heap::old_pointer_space().
Referenced by Heap::IdleNotification(), and IncrementalMarking::Start().
void IterateAndMarkPointersToFromSpace | ( | Address | start, |
Address | end, | ||
ObjectSlotCallback | callback | ||
) |
Definition at line 6063 of file heap.cc.
References HeapObject::cast(), StoreBuffer::EnterDirectlyIntoStoreBuffer(), HeapObject::FromAddress(), Heap::incremental_marking(), Heap::InFromSpace(), Heap::InNewSpace(), Heap::InToSpace(), v8::internal::kPointerSize, Heap::mark_compact_collector(), and SLOW_ASSERT.
void IterateRoots | ( | ObjectVisitor * | v, |
VisitMode | mode | ||
) |
Definition at line 6266 of file heap.cc.
References Heap::IterateStrongRoots(), and Heap::IterateWeakRoots().
Referenced by V8HeapExplorer::AddRootEntries(), and V8HeapExplorer::IterateAndExtractReferences().
void IterateSmiRoots | ( | ObjectVisitor * | v | ) |
Definition at line 6284 of file heap.cc.
References Heap::isolate(), Heap::kRootListLength, and Heap::kSmiRootsStart.
Referenced by Deserializer::Deserialize(), and StartupSerializer::SerializeStrongReferences().
void IterateStrongRoots | ( | ObjectVisitor * | v, |
VisitMode | mode | ||
) |
Definition at line 6292 of file heap.cc.
References Isolate::bootstrapper(), Isolate::builtins(), Isolate::compilation_cache(), Isolate::deoptimizer_data(), Isolate::eternal_handles(), Isolate::global_handles(), Isolate::handle_scope_implementer(), ThreadManager::Iterate(), Bootstrapper::Iterate(), SerializerDeserializer::Iterate(), CompilationCache::Iterate(), HandleScopeImplementer::Iterate(), Isolate::Iterate(), GlobalHandles::IterateAllRoots(), EternalHandles::IterateAllRoots(), Builtins::IterateBuiltins(), Isolate::IterateDeferredHandles(), EternalHandles::IterateNewSpaceRoots(), GlobalHandles::IterateNewSpaceStrongAndDependentRoots(), GlobalHandles::IterateStrongRoots(), Heap::kStrongRootListLength, v8::internal::NULL, Isolate::thread_manager(), v8::internal::VISIT_ALL, v8::internal::VISIT_ALL_IN_SCAVENGE, v8::internal::VISIT_ALL_IN_SWEEP_NEWSPACE, and v8::internal::VISIT_ONLY_STRONG.
Referenced by Deserializer::Deserialize(), Heap::IterateRoots(), and StartupSerializer::SerializeStrongReferences().
void IterateWeakRoots | ( | ObjectVisitor * | v, |
VisitMode | mode | ||
) |
Definition at line 6272 of file heap.cc.
References ExternalStringTable::Iterate(), Heap::kStringTableRootIndex, v8::internal::VISIT_ALL_IN_SCAVENGE, and v8::internal::VISIT_ALL_IN_SWEEP_NEWSPACE.
Referenced by Deserializer::Deserialize(), Heap::IterateRoots(), and StartupSerializer::SerializeWeakReferences().
|
inline |
Definition at line 646 of file heap.h.
Referenced by IncrementalMarking::Abort(), v8::internal::BUILTIN(), Heap::CanMoveObjectStart(), MarkCompactCollector::ClearMarkbits(), Heap::FreeQueuedChunks(), MemoryChunk::FromAnyPointerAddress(), InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer(), StatisticsExtension::GetCounters(), TEST(), and StoreBuffer::Verify().
MaybeObject * LookupSingleCharacterStringFromCode | ( | uint16_t | code | ) |
Definition at line 3962 of file heap.cc.
References Heap::AllocateRawTwoByteString(), v8::internal::code(), Heap::HashSeed(), Heap::InternalizeStringWithKey(), String::kMaxOneByteCharCode, and SeqTwoByteString::SeqTwoByteStringSet().
Referenced by Heap::AllocateStringFromOneByte(), and v8::internal::LookupSingleCharacterStringFromCode().
DependentCode * LookupWeakObjectToCodeDependency | ( | Object * | obj | ) |
Definition at line 6873 of file heap.cc.
References WeakHashTable::cast(), DependentCode::cast(), and WeakHashTable::Lookup().
Referenced by v8::internal::AddWeakObjectToCodeDependency().
|
inline |
Definition at line 641 of file heap.h.
Referenced by MarkCompactCollector::ClearMarkbits(), HeapSnapshotGenerator::GenerateSnapshot(), HeapObjectIterator::HeapObjectIterator(), Heap::paged_space(), and StoreBuffer::Verify().
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().
|
inline |
Definition at line 1769 of file heap.h.
Referenced by Context::AddOptimizedFunction(), Heap::AdvanceSweepers(), Map::ClearNonLiveTransitions(), SharedFunctionInfo::ClearOptimizedCodeMap(), Heap::CollectAllAvailableGarbage(), PagedSpace::EnsureSweeperProgress(), LargeObjectSpace::FreeUnmarkedObjects(), Heap::IdleNotification(), IncrementalMarkingMarkingVisitor::INLINE(), MarkCompactMarkingVisitor::INLINE(), Heap::IsSweepingComplete(), Heap::IterateAndMarkPointersToFromSpace(), StaticMarkingVisitor< StaticVisitor >::MarkMapContents(), StaticMarkingVisitor< StaticVisitor >::MarkTransitionArray(), Heap::ProcessWeakReferences(), IncrementalMarking::RecordWriteIntoCodeSlow(), IncrementalMarking::RecordWriteOfCodeEntrySlow(), IncrementalMarking::RecordWriteSlow(), SharedFunctionInfo::ReplaceCode(), MarkCompactWeakObjectRetainer::RetainAs(), Heap::SetUp(), Heap::TearDown(), MarkCompactCollector::TryPromoteObject(), and MarkCompactMarkingVisitor::VisitWeakCollection().
|
inline |
Definition at line 1756 of file heap.h.
Referenced by Heap::AddMarkingTime(), and Heap::TearDown().
|
inline |
Definition at line 600 of file heap.h.
Referenced by Heap::SetUp(), and TEST().
|
inline |
Definition at line 616 of file heap.h.
Referenced by Heap::TearDown().
|
inline |
|
inline |
Definition at line 593 of file heap.h.
Referenced by Isolate::GetHeapStatistics(), Heap::SetUp(), and TEST().
|
inline |
Definition at line 596 of file heap.h.
Referenced by IncrementalMarking::Step(), and TEST().
Definition at line 469 of file heap-inl.h.
References ASSERT, v8::internal::IsAligned(), v8::internal::kPointerSize, and OS::MemMove().
Referenced by MarkCompactCollector::MigrateObject().
void MoveElements | ( | FixedArray * | array, |
int | dst_index, | ||
int | src_index, | ||
int | len | ||
) |
Definition at line 883 of file heap.cc.
References HeapObject::address(), ASSERT, FixedArray::data_start(), Heap::incremental_marking(), Heap::InNewSpace(), v8::internal::kPointerSize, HeapObject::map(), OS::MemMove(), FixedArray::OffsetOfElementAt(), and IncrementalMarking::RecordWrites().
Referenced by v8::internal::BUILTIN().
|
inline |
Definition at line 1370 of file heap.h.
Referenced by MarkCompactCollector::CollectEvacuationCandidates().
|
inline |
Definition at line 1354 of file heap.h.
Referenced by Context::AddOptimizedFunction(), CountNativeContexts(), Deoptimizer::DeoptimizeAll(), Deoptimizer::DeoptimizeMarkedCode(), Deoptimizer::GetDeoptimizedCodeCount(), IncrementalMarking::Hurry(), TEST(), and Deoptimizer::VisitAllOptimizedFunctions().
|
inline |
Definition at line 637 of file heap.h.
Referenced by IncrementalMarking::Abort(), PromotionQueue::ActivateGuardIfOnTheSamePage(), MarkCompactCollector::ClearMarkbits(), Heap::DisableInlineAllocation(), Heap::EnableInlineAllocation(), StoreBuffer::EnterDirectlyIntoStoreBuffer(), IncrementalMarking::Finalize(), StatisticsExtension::GetCounters(), PromotionQueue::Initialize(), PromotionQueue::insert(), Runtime::PerformGC(), IncrementalMarking::PrepareForScavenge(), Heap::ReserveSpace(), IncrementalMarking::Start(), TEST(), and SeqString::Truncate().
|
inline |
Definition at line 679 of file heap.h.
References NewSpace::allocation_limit_address().
|
inline |
Definition at line 676 of file heap.h.
References NewSpace::allocation_top_address().
|
inline |
Definition at line 634 of file heap.h.
References NewSpace::mask().
|
inline |
Definition at line 633 of file heap.h.
References NewSpace::start().
|
inline |
Definition at line 635 of file heap.h.
References NewSpace::top().
Referenced by StringTracker::IsFreshUnusedString(), and StringTracker::RecordWrite().
|
inline |
Definition at line 1691 of file heap.h.
References NewSpace::Capacity(), and Heap::PromotedTotalSize().
Referenced by IncrementalMarking::OldSpaceStep().
int NotifyContextDisposed | ( | ) |
Definition at line 872 of file heap.cc.
References Heap::AgeInlineCaches(), OptimizingCompilerThread::Flush(), Heap::isolate(), and Isolate::optimizing_compiler_thread().
Referenced by V8::ContextDisposedNotification(), and TEST().
MaybeObject * NumberFromDouble | ( | double | value, |
PretenureFlag | pretenure = NOT_TENURED |
||
) |
Definition at line 3819 of file heap.cc.
References Heap::AllocateHeapNumber(), v8::internal::FastD2I(), Smi::FromInt(), and Smi::IsValid().
Referenced by FixedDoubleArray::get(), ExternalFloat32Array::get(), ExternalFloat64Array::get(), JSArray::JSArrayUpdateLengthFromIndex(), and TEST().
|
inline |
Definition at line 272 of file heap-inl.h.
References Heap::AllocateHeapNumber(), v8::internal::FastI2D(), Smi::FromInt(), and Smi::IsValid().
Referenced by ExternalInt32Array::get(), and TEST().
|
inline |
Definition at line 280 of file heap-inl.h.
References Heap::AllocateHeapNumber(), v8::internal::FastUI2D(), Smi::FromInt(), and Smi::IsValid().
Referenced by NumberDictionaryShape::AsObject(), ExternalUint32Array::get(), DictionaryElementsAccessor::SetLengthWithoutNormalize(), ExternalUint32Array::SetValue(), TEST(), and Heap::Uint32ToString().
Definition at line 3639 of file heap.cc.
References Heap::AllocateStringFromOneByte(), ARRAY_SIZE, Smi::cast(), HeapNumber::cast(), String::cast(), Isolate::counters(), v8::internal::CStrVector(), v8::internal::DoubleToCString(), Heap::GetNumberStringCache(), v8::internal::IntToCString(), Heap::SetNumberStringCache(), v8::internal::TENURED, Smi::value(), and HeapNumber::value().
Referenced by Heap::Uint32ToString().
|
inline |
Definition at line 639 of file heap.h.
Referenced by Heap::AdvanceSweepers(), MarkCompactCollector::ClearMarkbits(), StoreBuffer::Compact(), Heap::EnsureSweepersProgressed(), StoreBuffer::EnterDirectlyIntoStoreBuffer(), HeapSnapshotGenerator::GenerateSnapshot(), StatisticsExtension::GetCounters(), HeapObjectIterator::HeapObjectIterator(), MemoryChunk::Initialize(), Heap::IsHeapIterable(), Heap::IsSweepingComplete(), StoreBuffer::Mark(), Heap::paged_space(), SweeperThread::Run(), MarkCompactCollector::SetUp(), and MarkCompactCollector::StartCompaction().
|
inline |
Definition at line 638 of file heap.h.
Referenced by Heap::AdvanceSweepers(), String::CanMakeExternal(), MarkCompactCollector::ClearMarkbits(), Heap::EnsureSweepersProgressed(), HeapSnapshotGenerator::GenerateSnapshot(), StatisticsExtension::GetCounters(), HeapObjectIterator::HeapObjectIterator(), Heap::IsHeapIterable(), Heap::IsSweepingComplete(), String::MakeExternal(), Heap::paged_space(), SweeperThread::Run(), MarkCompactCollector::SetUp(), MarkCompactCollector::StartCompaction(), MarkCompactCollector::SweepInParallel(), TEST(), and StoreBuffer::Verify().
|
inline |
Definition at line 693 of file heap.h.
References PagedSpace::allocation_limit_address().
|
inline |
Definition at line 690 of file heap.h.
References PagedSpace::allocation_top_address().
|
inline |
Definition at line 1596 of file heap.h.
References NewSpace::Capacity(), Heap::kMinimumOldGenerationAllocationLimit, v8::internal::Max(), and v8::internal::Min().
|
inline |
Definition at line 351 of file heap-inl.h.
References Heap::incremental_marking(), and Heap::OldGenerationSpaceAvailable().
|
inline |
Definition at line 1589 of file heap.h.
References Heap::PromotedTotalSize().
|
inline |
Definition at line 1585 of file heap.h.
References Heap::PromotedTotalSize().
Referenced by Heap::OldGenerationAllocationLimitReached().
|
inline |
Definition at line 686 of file heap.h.
References PagedSpace::allocation_limit_address().
|
inline |
Definition at line 683 of file heap.h.
References PagedSpace::allocation_top_address().
|
inline |
Definition at line 647 of file heap.h.
References v8::internal::CELL_SPACE, Heap::cell_space(), v8::internal::CODE_SPACE, Heap::code_space(), v8::internal::LO_SPACE, v8::internal::MAP_SPACE, Heap::map_space(), v8::internal::NEW_SPACE, v8::internal::NULL, v8::internal::OLD_DATA_SPACE, Heap::old_data_space(), v8::internal::OLD_POINTER_SPACE, Heap::old_pointer_space(), v8::internal::PROPERTY_CELL_SPACE, Heap::property_cell_space(), and UNREACHABLE.
Referenced by Heap::ReserveSpace(), TEST(), and MarkCompactCollector::WaitUntilSweepingCompleted().
|
inline |
Definition at line 563 of file heap-inl.h.
References v8::internal::KB, String::length(), obj, and String::TryFlatten().
void PrintShortHeapStatistics | ( | ) |
Definition at line 354 of file heap.cc.
References Heap::Available(), MemoryAllocator::Available(), PagedSpace::Available(), NewSpace::Available(), LargeObjectSpace::Available(), Heap::CommittedMemory(), PagedSpace::CommittedMemory(), NewSpace::CommittedMemory(), LargeObjectSpace::CommittedMemory(), v8::internal::KB, Isolate::memory_allocator(), v8::internal::PrintPID(), MemoryAllocator::Size(), NewSpace::Size(), Heap::SizeOfObjects(), PagedSpace::SizeOfObjects(), LargeObjectSpace::SizeOfObjects(), and V8_PTR_PREFIX.
void ProcessWeakReferences | ( | WeakObjectRetainer * | retainer | ) |
Definition at line 1896 of file heap.cc.
References Heap::gc_state(), MarkCompactCollector::is_compacting(), Heap::MARK_COMPACT, and Heap::mark_compact_collector().
intptr_t PromotedSpaceSizeOfObjects | ( | ) |
Definition at line 6502 of file heap.cc.
References PagedSpace::SizeOfObjects(), and LargeObjectSpace::SizeOfObjects().
Referenced by IncrementalMarking::BlackToGreyAndUnshift(), Heap::PromotedTotalSize(), and IncrementalMarking::WorthActivating().
|
inline |
Definition at line 1578 of file heap.h.
References v8::internal::kMaxInt, and Heap::PromotedSpaceSizeOfObjects().
Referenced by Heap::NextGCIsLikelyToBeFull(), Heap::OldGenerationCapacityAvailable(), Heap::OldGenerationSpaceAvailable(), and IncrementalMarking::Step().
|
inline |
Definition at line 1302 of file heap.h.
Referenced by NewSpace::AddFreshPage().
|
inline |
Definition at line 643 of file heap.h.
Referenced by MarkCompactCollector::ClearMarkbits(), HeapSnapshotGenerator::GenerateSnapshot(), StatisticsExtension::GetCounters(), HeapObjectIterator::HeapObjectIterator(), and Heap::paged_space().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1442 of file heap.h.
Referenced by StoreBuffer::Compact(), StoreBuffer::Mark(), StoreBuffer::SetUp(), and StoreBuffer::TearDown().
void QueueMemoryChunkForFree | ( | MemoryChunk * | chunk | ) |
Definition at line 7736 of file heap.cc.
References MemoryChunk::set_next_chunk().
Referenced by LargeObjectSpace::FreeUnmarkedObjects(), and PagedSpace::ReleasePage().
|
inline |
Definition at line 1896 of file heap.h.
References ASSERT, Heap::FIRST_CODE_AGE_SUB_TYPE, Heap::FIRST_CODE_KIND_SUB_TYPE, Code::kFirstCodeAge, Heap::OBJECT_STATS_COUNT, and v8::internal::size.
Referenced by MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitCode >::Visit().
|
inline |
Definition at line 1910 of file heap.h.
References ASSERT, Heap::FIRST_FIXED_ARRAY_SUB_TYPE, v8::internal::LAST_FIXED_ARRAY_SUB_TYPE, and v8::internal::size.
Referenced by MarkCompactMarkingVisitor::ObjectStatsCountFixedArray(), MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitMap >::Visit(), MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitSharedFunctionInfo >::Visit(), and MarkCompactMarkingVisitor::ObjectStatsTracker< MarkCompactMarkingVisitor::kVisitFixedArray >::Visit().
|
inline |
Definition at line 1890 of file heap.h.
References ASSERT, v8::internal::LAST_TYPE, and v8::internal::size.
Referenced by MarkCompactMarkingVisitor::ObjectStatsVisitBase().
Definition at line 6463 of file heap.cc.
References ASSERT, MemoryAllocator::Available(), PagedSpace::Capacity(), NewSpace::Capacity(), HeapStats::cell_space_capacity, HeapStats::cell_space_size, HeapStats::code_space_capacity, HeapStats::code_space_size, HeapStats::end_marker, OS::GetLastError(), Isolate::global_handles(), Map::instance_type(), Heap::isolate(), HeapStats::kEndMarker, HeapStats::kStartMarker, v8::internal::LAST_TYPE, HeapStats::lo_space_size, HeapObject::map(), HeapStats::map_space_capacity, HeapStats::map_space_size, Isolate::memory_allocator(), HeapStats::memory_allocator_capacity, HeapStats::memory_allocator_size, HeapStats::new_space_capacity, HeapStats::new_space_size, v8::internal::NULL, HeapStats::objects_per_type, HeapStats::old_data_space_capacity, HeapStats::old_data_space_size, HeapStats::old_pointer_space_capacity, HeapStats::old_pointer_space_size, HeapStats::os_error, HeapStats::property_cell_space_capacity, HeapStats::property_cell_space_size, GlobalHandles::RecordStats(), MemoryAllocator::Size(), HeapObject::Size(), LargeObjectSpace::Size(), HeapStats::size_per_type, NewSpace::SizeAsInt(), PagedSpace::SizeOfObjects(), and HeapStats::start_marker.
MaybeObject * ReinitializeJSGlobalProxy | ( | JSFunction * | constructor, |
JSGlobalProxy * | global | ||
) |
Definition at line 4859 of file heap.cc.
References Heap::AllocateFixedArray(), ASSERT, FixedArray::cast(), JSFunction::has_initial_map(), JSFunction::initial_map(), and v8::internal::TENURED.
MaybeObject * ReinitializeJSReceiver | ( | JSReceiver * | object, |
InstanceType | type, | ||
int | size | ||
) |
Definition at line 4797 of file heap.cc.
References HeapObject::address(), Heap::AllocateFixedArray(), Heap::AllocateMap(), Heap::AllocateSharedFunctionInfo(), ASSERT, JSObject::cast(), FixedArray::cast(), JSFunction::cast(), Heap::CreateFillerObjectAt(), v8::internal::FIRST_JS_OBJECT_TYPE, Heap::HashSeed(), Map::inobject_properties(), Map::instance_size(), Heap::InternalizeStringWithKey(), Heap::isolate(), v8::internal::JS_FUNCTION_TYPE, v8::internal::map, HeapObject::map(), v8::internal::name, v8::internal::NULL, JSFunction::set_context(), Map::set_function_with_prototype(), STATIC_ASCII_VECTOR, v8::internal::TENURED, and Map::unused_property_fields().
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 | ) |
Definition at line 6844 of file heap.cc.
References ASSERT, v8::internal::NULL, List< T, P >::Remove(), and UNREACHABLE.
Referenced by Isolate::RemoveGCEpilogueCallback(), and V8::RemoveGCEpilogueCallback().
void RemoveGCPrologueCallback | ( | v8::Isolate::GCPrologueCallback | callback | ) |
Definition at line 6822 of file heap.cc.
References ASSERT, v8::internal::NULL, List< T, P >::Remove(), and UNREACHABLE.
Referenced by Isolate::RemoveGCPrologueCallback(), and V8::RemoveGCPrologueCallback().
void RepairFreeListsAfterBoot | ( | ) |
Definition at line 497 of file heap.cc.
References v8::internal::NULL.
Referenced by Deserializer::Deserialize().
void ReserveSpace | ( | int * | sizes, |
Address * | addresses | ||
) |
Definition at line 941 of file heap.cc.
References HeapObject::address(), PagedSpace::AllocateRaw(), ASSERT, Heap::CollectGarbage(), V8::FatalProcessOutOfMemory(), v8::internal::FIRST_PAGED_SPACE, v8::internal::LAST_PAGED_SPACE, v8::internal::NEW_SPACE, Heap::new_space(), Heap::paged_space(), and FreeListNode::set_size().
Referenced by Deserializer::Deserialize(), and Deserializer::DeserializePartial().
bool RootCanBeTreatedAsConstant | ( | RootListIndex | root_index | ) |
Definition at line 3438 of file heap.cc.
References Heap::InNewSpace(), Heap::RootCanBeWrittenAfterInitialization(), and Heap::roots_array_start().
|
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().
|
inline |
Definition at line 1451 of file heap.h.
Referenced by Heap::RootCanBeTreatedAsConstant(), Serializer::RootIndex(), Serializer::ShouldBeSkipped(), and Serializer::VisitPointers().
|
inlinestatic |
Definition at line 527 of file heap-inl.h.
References ASSERT, HeapObject::GetHeap(), HeapObject::GetIsolate(), Isolate::heap(), Heap::IGNORE_SCRATCHPAD_SLOT, Heap::InFromSpace(), HeapObject::map(), and Heap::UpdateAllocationSiteFeedback().
Referenced by Heap::ScavengePointer(), and NewSpaceScavenger::VisitPointer().
|
inlinestatic |
Definition at line 488 of file heap-inl.h.
References Heap::ScavengeObject().
|
inline |
Definition at line 1361 of file heap.h.
Referenced by Heap::AllocateAllocationSite(), and Deserializer::Deserialize().
|
inline |
Definition at line 1356 of file heap.h.
Referenced by Deserializer::Deserialize(), and Runtime::SetupArrayBuffer().
|
inline |
Definition at line 1351 of file heap.h.
Referenced by Deserializer::Deserialize().
|
inline |
Definition at line 1837 of file heap.h.
References ASSERT, and Smi::FromInt().
|
inline |
Definition at line 1842 of file heap.h.
References ASSERT, and Smi::FromInt().
|
inline |
Definition at line 1847 of file heap.h.
References ASSERT, and Smi::FromInt().
|
inline |
Definition at line 3619 of file heap.cc.
References Smi::cast(), and Object::Number().
Referenced by Heap::NumberToString().
|
inline |
Definition at line 1852 of file heap.h.
References ASSERT, and Smi::FromInt().
void SetStackLimits | ( | ) |
Definition at line 6688 of file heap.cc.
References ASSERT, Heap::isolate(), StackGuard::jslimit(), v8::internal::kSmiTag, v8::internal::kSmiTagMask, v8::internal::NULL, StackGuard::real_jslimit(), and Isolate::stack_guard().
Referenced by StackGuard::ArchiveStackGuard(), StackGuard::ClearThread(), StackGuard::InitThread(), StackGuard::RequestGC(), StackGuard::RequestInstallCode(), and StackGuard::RestoreStackGuard().
bool SetUp | ( | ) |
Definition at line 6564 of file heap.cc.
References ASSERT, Heap::Available(), v8::internal::CallOnce(), Heap::Capacity(), v8::internal::CELL_SPACE, Isolate::code_range(), v8::internal::CODE_SPACE, Heap::ConfigureHeapDefault(), v8::internal::EXECUTABLE, Smi::FromInt(), Heap::isolate(), Name::kHashBitMask, v8::internal::LO_SPACE, LOG, v8::internal::MAP_SPACE, Heap::mark_compact_collector(), Heap::MaxExecutableSize(), Heap::MaxReserved(), Isolate::memory_allocator(), v8::internal::NOT_EXECUTABLE, v8::internal::NULL, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, v8::internal::PROPERTY_CELL_SPACE, Isolate::random_number_generator(), StoreBuffer::SetUp(), MarkCompactCollector::SetUp(), CodeRange::SetUp(), MemoryAllocator::SetUp(), PagedSpace::SetUp(), NewSpace::SetUp(), LargeObjectSpace::SetUp(), and Heap::store_buffer().
|
inline |
Definition at line 357 of file heap-inl.h.
References NewSpace::age_mark(), MemoryChunk::ContainsLimit(), NewSpace::EffectiveCapacity(), NewSpacePage::FromAddress(), MemoryChunk::IsFlagSet(), MemoryChunk::NEW_SPACE_BELOW_AGE_MARK, and NewSpace::Size().
|
inlinestatic |
Definition at line 1486 of file heap.h.
Referenced by SharedFunctionInfo::AddToOptimizedCodeMap(), Heap::AddWeakObjectToCodeDependency(), MemoryAllocator::AllocateChunk(), LargeObjectSpace::AllocateRaw(), Map::ClearTransitions(), MemoryChunk::CommitArea(), and MemoryAllocator::CommitBlock().
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 | ) |
|
inline |
Definition at line 1773 of file heap.h.
Referenced by Heap::FreeQueuedChunks(), MarkCompactCollector::MigrateObject(), Heap::SetUp(), StoreBuffer::StoreBufferOverflow(), and Heap::TearDown().
|
inline |
Definition at line 1453 of file heap.h.
Referenced by StoreBuffer::TopAddress().
|
inline |
Definition at line 1765 of file heap.h.
Referenced by Heap::AddSweepingTime(), and Heap::TearDown().
|
inline |
Definition at line 384 of file heap-inl.h.
References v8::internal::OLD_POINTER_SPACE, and Heap::TargetSpaceId().
Referenced by MarkCompactCollector::TryPromoteObject().
|
inlinestatic |
Definition at line 393 of file heap-inl.h.
References ASSERT, v8::internal::CELL_TYPE, v8::internal::CODE_TYPE, v8::internal::FIRST_NONSTRING_TYPE, v8::internal::kIsIndirectStringMask, v8::internal::kIsIndirectStringTag, v8::internal::LAST_DATA_TYPE, v8::internal::LAST_NAME_TYPE, v8::internal::MAP_TYPE, v8::internal::ODDBALL_TYPE, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, v8::internal::PROPERTY_CELL_TYPE, and v8::internal::SYMBOL_TYPE.
Referenced by Heap::Allocate(), Heap::AllowedToBeMigrated(), and Heap::TargetSpace().
void TearDown | ( | ) |
Definition at line 6705 of file heap.cc.
References Heap::get_max_alive_after_gc(), Heap::get_max_gc_pause(), Heap::get_min_in_mutator(), Isolate::global_handles(), Heap::incremental_marking(), Heap::mark_compact_collector(), Heap::marking_time(), Heap::MaximumCommittedMemory(), PagedSpace::MaximumCommittedMemory(), NewSpace::MaximumCommittedMemory(), LargeObjectSpace::MaximumCommittedMemory(), Isolate::memory_allocator(), v8::internal::NULL, v8::internal::PrintF(), Heap::store_buffer(), Heap::sweeping_time(), IncrementalMarking::TearDown(), StoreBuffer::TearDown(), GlobalHandles::TearDown(), ExternalStringTable::TearDown(), MarkCompactCollector::TearDown(), MemoryAllocator::TearDown(), PagedSpace::TearDown(), NewSpace::TearDown(), LargeObjectSpace::TearDown(), Heap::UpdateMaximumCommitted(), and V8_PTR_PREFIX.
|
inline |
Definition at line 759 of file heap-inl.h.
Referenced by Runtime::HasObjectProperty().
|
inline |
Definition at line 1729 of file heap.h.
Referenced by RegExpCompiler::Assemble().
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().
|
inlinestatic |
Definition at line 493 of file heap-inl.h.
References ASSERT, AllocationSite::CanTrack(), AllocationMemento::cast(), HeapObject::FromAddress(), AllocationMemento::GetAllocationSite(), AllocationSite::IncrementMementoFoundCount(), Heap::InFromSpace(), Map::instance_type(), AllocationMemento::IsValid(), v8::internal::kPointerSize, HeapObject::map(), v8::internal::mode(), and NewSpacePage::OnSamePage().
Referenced by Heap::ScavengeObject().
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 | ) |
Definition at line 1671 of file heap.cc.
References ASSERT, Heap::InFromSpace(), Heap::InNewSpace(), and v8::internal::NULL.
Referenced by Heap::UpdateReferencesInExternalStringTable().
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().
|
inline |
Definition at line 1367 of file heap.h.
Referenced by Heap::EnsureWeakObjectToCodeTable().
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Definition at line 1260 of file heap.h.
Referenced by DirectApiCallback(), EpilogueCallbackAlloc(), PrologueCallbackAlloc(), Isolate::RequestGarbageCollectionForTesting(), MarkCompactCollector::SetFlags(), TEST(), TestViewFromApi(), and THREADED_TEST().
|
static |
Definition at line 1106 of file heap.h.
Referenced by Heap::AllocateArgumentsObject().
|
static |
Definition at line 1104 of file heap.h.
Referenced by Heap::AllocateArgumentsObject(), and v8::internal::BUILTIN().
|
static |
Definition at line 1264 of file heap.h.
Referenced by Heap::CollectAllAvailableGarbage(), Heap::EnsureHeapIsIterable(), HeapProfiler::FindHeapObjectById(), HeapSnapshotGenerator::GenerateSnapshot(), Logger::LogAccessorCallbacks(), Logger::LogCodeObjects(), Logger::LogCompiledFunctions(), TEST(), and HeapObjectsMap::UpdateHeapObjectsMap().
|
static |
Definition at line 1593 of file heap.h.
Referenced by Heap::OldGenerationAllocationLimit().
|
static |
Definition at line 1257 of file heap.h.
Referenced by Heap::AdjustAmountOfExternalAllocatedMemory(), Heap::CollectAllAvailableGarbage(), Heap::CollectAllGarbage(), DisposeAndForceGcCallback(), FailedAccessCheckCallbackGC(), StatisticsExtension::GetCounters(), Execution::HandleStackGuardInterrupt(), main(), Runtime::PerformGC(), ThreadB::Run(), TEST(), and THREADED_TEST().
|
static |
Definition at line 1259 of file heap.h.
Referenced by Heap::CollectAllAvailableGarbage(), Heap::IdleNotification(), MarkCompactCollector::SetFlags(), and TEST().
|
static |
Definition at line 1098 of file heap.h.
Referenced by Heap::AllocateArgumentsObject().
|
static |
Definition at line 1101 of file heap.h.
Referenced by Heap::AllocateArgumentsObject().
|
static |
Definition at line 1258 of file heap.h.
Referenced by MarkCompactCollector::SetFlags().