V8 Project
v8::internal::OutSet Class Reference

#include <jsregexp.h>

+ Inheritance diagram for v8::internal::OutSet:
+ Collaboration diagram for v8::internal::OutSet:

Public Member Functions

 OutSet ()
 
OutSetExtend (unsigned value, Zone *zone)
 
bool Get (unsigned value) const
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Static Public Attributes

static const unsigned kFirstLimit = 32
 

Private Member Functions

void Set (unsigned value, Zone *zone)
 
ZoneList< OutSet * > * successors (Zone *zone)
 
 OutSet (uint32_t first, ZoneList< unsigned > *remaining)
 

Private Attributes

uint32_t first_
 
ZoneList< unsigned > * remaining_
 
ZoneList< OutSet * > * successors_
 

Friends

class Trace
 

Detailed Description

Definition at line 296 of file jsregexp.h.

Constructor & Destructor Documentation

◆ OutSet() [1/2]

v8::internal::OutSet::OutSet ( )
inline

Definition at line 298 of file jsregexp.h.

ZoneList< unsigned > * remaining_
Definition: jsregexp.h:317
ZoneList< OutSet * > * successors_
Definition: jsregexp.h:318
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

Referenced by Extend().

+ Here is the caller graph for this function:

◆ OutSet() [2/2]

v8::internal::OutSet::OutSet ( uint32_t  first,
ZoneList< unsigned > *  remaining 
)
inlineprivate

Definition at line 314 of file jsregexp.h.

315  : first_(first), remaining_(remaining), successors_(NULL) { }

Member Function Documentation

◆ Extend()

OutSet * v8::internal::OutSet::Extend ( unsigned  value,
Zone zone 
)

Definition at line 5574 of file jsregexp.cc.

5574  {
5575  if (Get(value))
5576  return this;
5577  if (successors(zone) != NULL) {
5578  for (int i = 0; i < successors(zone)->length(); i++) {
5579  OutSet* successor = successors(zone)->at(i);
5580  if (successor->Get(value))
5581  return successor;
5582  }
5583  } else {
5584  successors_ = new(zone) ZoneList<OutSet*>(2, zone);
5585  }
5586  OutSet* result = new(zone) OutSet(first_, remaining_);
5587  result->Set(value, zone);
5588  successors(zone)->Add(result, zone);
5589  return result;
5590 }
bool Get(unsigned value) const
Definition: jsregexp.cc:5605
ZoneList< OutSet * > * successors(Zone *zone)
Definition: jsregexp.h:312

References first_, Get(), NULL, OutSet(), remaining_, Set(), successors(), and successors_.

Referenced by v8::internal::DispatchTable::Entry::AddValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Get()

bool v8::internal::OutSet::Get ( unsigned  value) const

Definition at line 5605 of file jsregexp.cc.

5605  {
5606  if (value < kFirstLimit) {
5607  return (first_ & (1 << value)) != 0;
5608  } else if (remaining_ == NULL) {
5609  return false;
5610  } else {
5611  return remaining_->Contains(value);
5612  }
5613 }
bool Contains(const T &elm) const
Definition: list-inl.h:174
static const unsigned kFirstLimit
Definition: jsregexp.h:301

References v8::internal::List< T, AllocationPolicy >::Contains(), first_, kFirstLimit, NULL, and remaining_.

Referenced by v8::internal::CharacterRangeSplitter::Call(), Extend(), v8::internal::Trace::PerformDeferredActions(), and v8::internal::Trace::RestoreAffectedRegisters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Set()

void v8::internal::OutSet::Set ( unsigned  value,
Zone zone 
)
private

Definition at line 5593 of file jsregexp.cc.

5593  {
5594  if (value < kFirstLimit) {
5595  first_ |= (1 << value);
5596  } else {
5597  if (remaining_ == NULL)
5598  remaining_ = new(zone) ZoneList<unsigned>(1, zone);
5599  if (remaining_->is_empty() || !remaining_->Contains(value))
5600  remaining_->Add(value, zone);
5601  }
5602 }
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
Definition: list-inl.h:17

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::Contains(), first_, kFirstLimit, NULL, and remaining_.

Referenced by Extend(), v8::internal::Trace::FindAffectedRegisters(), and v8::internal::Trace::PerformDeferredActions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ successors()

ZoneList<OutSet*>* v8::internal::OutSet::successors ( Zone zone)
inlineprivate

Definition at line 312 of file jsregexp.h.

312 { return successors_; }

References successors_.

Referenced by Extend().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Trace

friend class Trace
friend

Definition at line 319 of file jsregexp.h.

Member Data Documentation

◆ first_

uint32_t v8::internal::OutSet::first_
private

Definition at line 316 of file jsregexp.h.

Referenced by Extend(), Get(), and Set().

◆ kFirstLimit

const unsigned v8::internal::OutSet::kFirstLimit = 32
static

Definition at line 301 of file jsregexp.h.

Referenced by Get(), and Set().

◆ remaining_

ZoneList<unsigned>* v8::internal::OutSet::remaining_
private

Definition at line 317 of file jsregexp.h.

Referenced by Extend(), Get(), and Set().

◆ successors_

ZoneList<OutSet*>* v8::internal::OutSet::successors_
private

Definition at line 318 of file jsregexp.h.

Referenced by Extend(), and successors().


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