Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Attributes | Friends | List of all members
dart::OutSet Class Reference

#include <regexp.h>

Inheritance diagram for dart::OutSet:
dart::ZoneAllocated

Public Member Functions

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

Static Public Attributes

static constexpr unsigned kFirstLimit = 32
 

Friends

class Trace
 

Detailed Description

Definition at line 92 of file regexp.h.

Constructor & Destructor Documentation

◆ OutSet()

dart::OutSet::OutSet ( )
inline

Definition at line 94 of file regexp.h.

94: first_(0), remaining_(nullptr), successors_(nullptr) {}

Member Function Documentation

◆ Extend()

OutSet * dart::OutSet::Extend ( unsigned  value,
Zone zone 
)

Definition at line 4947 of file regexp.cc.

4947 {
4948 if (Get(value)) return this;
4949 if (successors() != nullptr) {
4950 for (int i = 0; i < successors()->length(); i++) {
4951 OutSet* successor = successors()->At(i);
4952 if (successor->Get(value)) return successor;
4953 }
4954 } else {
4955 successors_ = new (zone) ZoneGrowableArray<OutSet*>(2);
4956 }
4957 OutSet* result = new (zone) OutSet(first_, remaining_);
4958 result->Set(value, zone);
4959 successors()->Add(result);
4960 return result;
4961}
bool Get(unsigned value) const
Definition: regexp.cc:4977
uint8_t value
GAsyncResult * result

◆ Get()

bool dart::OutSet::Get ( unsigned  value) const

Definition at line 4977 of file regexp.cc.

4977 {
4978 if (value < kFirstLimit) {
4979 return (first_ & (1 << value)) != 0;
4980 } else if (remaining_ == nullptr) {
4981 return false;
4982 } else {
4983 return ArrayContains(remaining_, value);
4984 }
4985}
static constexpr unsigned kFirstLimit
Definition: regexp.h:97
static bool ArrayContains(ZoneGrowableArray< unsigned > *array, unsigned value)
Definition: regexp.cc:4938

Friends And Related Function Documentation

◆ Trace

friend class Trace
friend

Definition at line 115 of file regexp.h.

Member Data Documentation

◆ kFirstLimit

constexpr unsigned dart::OutSet::kFirstLimit = 32
staticconstexpr

Definition at line 97 of file regexp.h.


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