5 #ifndef V8_SMALL_POINTER_LIST_H_
6 #define V8_SMALL_POINTER_LIST_H_
29 if (capacity < 2)
return;
31 if (
list()->capacity() >= capacity)
return;
32 int old_length =
list()->length();
34 list()->Rewind(old_length);
60 return list()->length();
113 return list()->RemoveLast();
122 DCHECK(pos == 0 || pos == 1);
134 if (start == 0 && end >= 0) {
146 return Compare<T>(**a, **b);
160 return reinterpret_cast<T*
>(
data_);
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
bool RemoveElement(const T &elm)
int CountOccurrences(const T &elm, int start, int end) const
void Sort(int(*cmp)(const T *x, const T *y))
Vector< T > AddBlock(T value, int count, AllocationPolicy allocator=AllocationPolicy())
PointerList * list() const
ZoneList< T * > PointerList
STATIC_ASSERT(kTagMask+1<=kPointerAlignment)
SmallPointerList(int capacity, Zone *zone)
static const intptr_t kListTag
void Reserve(int capacity, Zone *zone)
static const intptr_t kEmptyTag
int CountOccurrences(T *pointer, int start, int end) const
T * operator[](int i) const
void Add(T *pointer, Zone *zone)
static const intptr_t kTagMask
DISALLOW_COPY_AND_ASSIGN(SmallPointerList)
static const intptr_t kValueMask
static int compare_value(T *const *a, T *const *b)
void RemoveElement(T *pointer)
static const intptr_t kSingletonTag
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
bool IsAligned(T value, U alignment)
const intptr_t kPointerAlignment
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)