28 #ifndef V8_GLOBAL_HANDLES_H_
29 #define V8_GLOBAL_HANDLES_H_
31 #include "../include/v8.h"
32 #include "../include/v8-profiler.h"
77 : parent(parent), length(length) {
92 : id(id), object(object) {}
95 return id == other.
id;
109 : id(id), info(info) {}
112 return id == other.
id;
116 return id < other.
id;
160 return number_of_global_handles_;
261 ComputeObjectGroupsAndImplicitReferences();
262 return &object_groups_;
266 ComputeObjectGroupsAndImplicitReferences();
267 return &implicit_ref_groups_;
290 void ComputeObjectGroupsAndImplicitReferences();
294 static const int kObjectGroupConnectionsCapacity = 20;
304 int number_of_global_handles_;
307 NodeBlock* first_block_;
310 NodeBlock* first_used_block_;
319 int post_gc_processing_count_;
364 return Get(singleton_handles_[singleton]);
369 return singleton_handles_[singleton] != kInvalidIndex;
376 Create(isolate,
object, &singleton_handles_[singleton]);
377 return Get(singleton_handles_[singleton]);
388 static const int kInvalidIndex = -1;
389 static const int kShift = 8;
390 static const int kSize = 1 << kShift;
391 static const int kMask = 0xff;
394 inline Object** GetLocation(
int index) {
395 ASSERT(index >= 0 && index < size_);
396 return &blocks_[index >> kShift][index & kMask];
400 List<Object**> blocks_;
401 List<int> new_space_indices_;
410 #endif // V8_GLOBAL_HANDLES_H_
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
v8::RetainedObjectInfo * info
bool(* WeakSlotCallbackWithHeap)(Heap *heap, Object **pointer)
void RemoveImplicitRefGroups()
List< ImplicitRefGroup * > * implicit_ref_groups()
static void Destroy(Object **location)
void IdentifyNewSpaceWeakIndependentHandles(WeakSlotCallbackWithHeap f)
Handle< Object > CreateSingleton(Isolate *isolate, Object *object, SingletonHandle singleton)
void PostGarbageCollectionProcessing(Heap *heap)
bool operator==(const ObjectGroupRetainerInfo &other) const
int NumberOfGlobalObjectWeakHandles()
void AddImplicitReferences(HeapObject **parent, Object ***children, size_t length)
bool operator==(const ObjectGroupConnection &other) const
static bool IsNearDeath(Object **location)
void SetReferenceFromGroup(UniqueId id, Object **child)
void IterateWeakRoots(ObjectVisitor *v)
#define ASSERT(condition)
void Create(Isolate *isolate, Object *object, int *index)
void IterateStrongRoots(ObjectVisitor *v)
void AddObjectGroup(Object ***handles, size_t length, v8::RetainedObjectInfo *info)
bool operator<(const ObjectGroupConnection &other) const
int NumberOfWeakHandles()
Handle< Object > Create(Object *value)
static bool IsIndependent(Object **location)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
static void * ClearWeakness(Object **location)
static Handle< Object > CopyGlobal(Object **location)
ObjectGroupConnection(UniqueId id, Object **object)
void IterateAllRoots(ObjectVisitor *v)
int global_handles_count() const
void SetReference(HeapObject **parent, Object **child)
void IterateAllRootsWithClassIds(ObjectVisitor *v)
void IterateNewSpaceRoots(ObjectVisitor *visitor)
void IterateNewSpaceStrongAndDependentRoots(ObjectVisitor *v)
List< ObjectGroup * > * object_groups()
bool IterateObjectGroups(ObjectVisitor *v, WeakSlotCallbackWithHeap can_skip)
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo *info)
bool PostGarbageCollectionProcessing(GarbageCollector collector, GCTracer *tracer)
bool operator<(const ObjectGroupRetainerInfo &other) const
Handle< T > handle(T *t, Isolate *isolate)
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 trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function info
void IdentifyWeakHandles(WeakSlotCallback f)
Handle< Object > Get(int index)
void RecordStats(HeapStats *stats)
RetainedObjectInfo * info
static void MakeWeak(Object **location, void *parameter, WeakCallback weak_callback)
static void MarkPartiallyDependent(Object **location)
void SetObjectGroupId(Object **handle, UniqueId id)
void IterateAllRoots(ObjectVisitor *visitor)
Handle< Object > GetSingleton(SingletonHandle singleton)
ObjectGroupRetainerInfo(UniqueId id, RetainedObjectInfo *info)
static void MarkIndependent(Object **location)
static bool IsWeak(Object **location)
void Print(const v8::FunctionCallbackInfo< v8::Value > &args)
void RemoveObjectGroups()
void IterateAllRootsInNewSpaceWithClassIds(ObjectVisitor *v)
void IterateNewSpaceWeakIndependentRoots(ObjectVisitor *v)
WeakCallbackData< v8::Value, void >::Callback WeakCallback
bool Exists(SingletonHandle singleton)
ObjectGroup(size_t length)
bool(* WeakSlotCallback)(Object **pointer)
ImplicitRefGroup(HeapObject **parent, size_t length)