v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
heap-inl.h File Reference
#include <cmath>
#include "heap.h"
#include "heap-profiler.h"
#include "isolate.h"
#include "list-inl.h"
#include "objects.h"
#include "platform.h"
#include "v8-counters.h"
#include "store-buffer.h"
#include "store-buffer-inl.h"
Include dependency graph for heap-inl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 v8
 
 v8::internal
 

Macros

#define GC_GREEDY_CHECK(ISOLATE)   { }
 
#define CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)
 
#define CALL_AND_RETRY_OR_DIE(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)
 
#define CALL_HEAP_FUNCTION(ISOLATE, FUNCTION_CALL, TYPE)
 
#define CALL_HEAP_FUNCTION_VOID(ISOLATE, FUNCTION_CALL)   CALL_AND_RETRY_OR_DIE(ISOLATE, FUNCTION_CALL, return, return)
 
#define CALL_HEAP_FUNCTION_PASS_EXCEPTION(ISOLATE, FUNCTION_CALL)
 

Macro Definition Documentation

#define CALL_AND_RETRY (   ISOLATE,
  FUNCTION_CALL,
  RETURN_VALUE,
  RETURN_EMPTY 
)
Value:
do { \
GC_GREEDY_CHECK(ISOLATE); \
MaybeObject* __maybe_object__ = FUNCTION_CALL; \
Object* __object__ = NULL; \
if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \
if (!__maybe_object__->IsRetryAfterGC()) RETURN_EMPTY; \
(ISOLATE)->heap()->CollectGarbage(Failure::cast(__maybe_object__)-> \
allocation_space(), \
"allocation failure"); \
__maybe_object__ = FUNCTION_CALL; \
if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \
if (!__maybe_object__->IsRetryAfterGC()) RETURN_EMPTY; \
(ISOLATE)->counters()->gc_last_resort_from_handles()->Increment(); \
(ISOLATE)->heap()->CollectAllAvailableGarbage("last resort gc"); \
{ \
AlwaysAllocateScope __scope__(ISOLATE); \
__maybe_object__ = FUNCTION_CALL; \
} \
if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \
if (__maybe_object__->IsRetryAfterGC()) { \
/* TODO(1181417): Fix this. */ \
v8::internal::Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);\
} \
RETURN_EMPTY; \
} while (false)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
kSerializedDataOffset Object
Definition: objects-inl.h:5016
static void FatalProcessOutOfMemory(const char *location, bool take_snapshot=false)
Definition: heap.cc:6887
#define GC_GREEDY_CHECK(ISOLATE)
Definition: heap-inl.h:634

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

#define CALL_AND_RETRY_OR_DIE (   ISOLATE,
  FUNCTION_CALL,
  RETURN_VALUE,
  RETURN_EMPTY 
)
Value:
ISOLATE, \
FUNCTION_CALL, \
RETURN_VALUE, \
RETURN_EMPTY)
#define CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)
Definition: heap-inl.h:644

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

Referenced by Map::PutPrototypeTransition(), JSObject::SetPropertyWithCallback(), and JSObjectWalkVisitor< ContextObject >::StructureWalk().

#define CALL_HEAP_FUNCTION (   ISOLATE,
  FUNCTION_CALL,
  TYPE 
)
Value:
FUNCTION_CALL, \
return Handle<TYPE>(TYPE::cast(__object__), ISOLATE), \
return Handle<TYPE>()) \
#define CALL_AND_RETRY_OR_DIE(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)
Definition: heap-inl.h:671

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

Referenced by v8::internal::AddKeysFromJSArray(), SeededNumberDictionary::AddNumberEntry(), Map::AddTransition(), Map::AsElementsKind(), Factory::BaseNewFunctionFromSharedFunctionInfo(), v8::internal::CacheInitialJSArrayMaps(), JSObject::Copy(), Map::Copy(), Factory::CopyAndTenureFixedCOWArray(), Factory::CopyCode(), Factory::CopyConstantPoolArray(), Map::CopyDropDescriptors(), Factory::CopyFixedArray(), Factory::CopyFixedDoubleArray(), Factory::CopyMap(), Map::CopyReplaceDescriptors(), Factory::CopySizeFixedArray(), DescriptorArray::CopyUpToAddAttributes(), Factory::CopyWithPreallocatedFieldDescriptors(), DictionaryElementsAccessor::DeleteCommon(), v8::internal::DeleteProperty(), Factory::DictionaryAtNumberPut(), ObjectHashSet::EnsureCapacity(), ObjectHashTable::EnsureCapacity(), JSObject::EnsureWritableFastElements(), v8::internal::FlattenGetString(), v8::internal::ForceDeleteProperty(), Accessors::FunctionGetArguments(), Accessors::FunctionGetPrototype(), Accessors::FunctionSetPrototype(), ElementsAccessorBase< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS > >::Get(), JSObject::GetElementsTransitionMap(), Object::GetElementWithReceiver(), v8::internal::GetProperty(), Object::GetProperty(), JSObject::GetPropertyWithCallback(), v8::internal::HasProperty(), Factory::InternalizeString(), Factory::InternalizeStringWithKey(), v8::internal::LookupSingleCharacterStringFromCode(), DescriptorArray::Merge(), v8::internal::NameDictionaryShrink(), Factory::NewAccessorPair(), Factory::NewAllocationSite(), Factory::NewArgumentsObject(), Factory::NewBlockContext(), Factory::NewBox(), Factory::NewByteArray(), Factory::NewCatchContext(), Factory::NewCell(), Factory::NewCode(), Factory::NewConstantPoolArray(), Factory::NewDeoptimizationInputData(), Factory::NewDeoptimizationOutputData(), Factory::NewDescriptorArray(), Factory::NewExternal(), Factory::NewExternalArray(), Factory::NewExternalStringFromAscii(), Factory::NewExternalStringFromTwoByte(), Factory::NewFixedArray(), Factory::NewFixedArrayWithHoles(), Factory::NewFixedDoubleArray(), Factory::NewFixedTypedArray(), Factory::NewForeign(), Factory::NewFunctionContext(), Factory::NewGlobalContext(), Factory::NewHeapNumber(), Factory::NewJSArray(), Factory::NewJSArrayBuffer(), Factory::NewJSArrayWithElements(), Factory::NewJSDataView(), Factory::NewJSGeneratorObject(), Factory::NewJSMessageObject(), Factory::NewJSModule(), Factory::NewJSObject(), Factory::NewJSObjectFromMap(), Factory::NewJSObjectWithMemento(), Factory::NewJSProxy(), Factory::NewJSTypedArray(), Factory::NewMap(), Factory::NewModuleContext(), Factory::NewNameDictionary(), Factory::NewNativeContext(), Factory::NewNeanderObject(), Factory::NewNumber(), Factory::NewNumberFromInt(), Factory::NewNumberFromUint(), Factory::NewObjectHashSet(), Factory::NewObjectHashTable(), Factory::NewPrivateSymbol(), Factory::NewPropertyCellWithHole(), Factory::NewRawConsString(), Factory::NewRawOneByteString(), Factory::NewRawSlicedString(), Factory::NewRawTwoByteString(), Factory::NewScopeInfo(), Factory::NewSeededNumberDictionary(), Factory::NewSharedFunctionInfo(), Factory::NewStringFromOneByte(), Factory::NewStringFromTwoByte(), Factory::NewStringFromUtf8(), Factory::NewStruct(), Factory::NewSymbol(), Factory::NewTypeFeedbackInfo(), Factory::NewUninitializedFixedArray(), Factory::NewUnseededNumberDictionary(), Factory::NewWeakHashTable(), Factory::NewWithContext(), Factory::NumberToString(), JSObject::PrepareSlowElementsForSort(), Map::RawCopy(), v8::internal::ReinitializeJSGlobalProxy(), SeededNumberDictionary::Set(), UnseededNumberDictionary::Set(), DictionaryElementsAccessor::SetLengthWithoutNormalize(), ExternalInt8Array::SetValue(), ExternalUint8Array::SetValue(), ExternalInt16Array::SetValue(), ExternalUint16Array::SetValue(), ExternalInt32Array::SetValue(), ExternalUint32Array::SetValue(), ExternalFloat32Array::SetValue(), ExternalFloat64Array::SetValue(), FixedTypedArray< Traits >::SetValue(), ObjectHashSet::Shrink(), ObjectHashTable::Shrink(), Factory::ToObject(), Factory::Uint32ToString(), and v8::internal::UnionOfKeys().

#define CALL_HEAP_FUNCTION_PASS_EXCEPTION (   ISOLATE,
  FUNCTION_CALL 
)
Value:
CALL_AND_RETRY(ISOLATE, \
FUNCTION_CALL, \
return __object__, \
return __maybe_object__)
#define CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)
Definition: heap-inl.h:644

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

Referenced by Runtime::GetObjectPropertyOrFail(), and Object::GetPropertyOrFail().

#define GC_GREEDY_CHECK (   ISOLATE)    { }

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