V8 Project
v8::internal::Interval Class Reference

#include <jsregexp.h>

+ Collaboration diagram for v8::internal::Interval:

Public Member Functions

 Interval ()
 
 Interval (int from, int to)
 
Interval Union (Interval that)
 
bool Contains (int value)
 
bool is_empty ()
 
int from () const
 
int to () const
 

Static Public Member Functions

static Interval Empty ()
 

Static Public Attributes

static const int kNone = -1
 

Private Attributes

int from_
 
int to_
 

Detailed Description

Definition at line 697 of file jsregexp.h.

Constructor & Destructor Documentation

◆ Interval() [1/2]

v8::internal::Interval::Interval ( )
inline

Definition at line 699 of file jsregexp.h.

Referenced by Empty(), and Union().

+ Here is the caller graph for this function:

◆ Interval() [2/2]

v8::internal::Interval::Interval ( int  from,
int  to 
)
inline

Definition at line 700 of file jsregexp.h.

700 : from_(from), to_(to) { }
int from() const
Definition: jsregexp.h:713

Member Function Documentation

◆ Contains()

bool v8::internal::Interval::Contains ( int  value)
inline

Definition at line 709 of file jsregexp.h.

709  {
710  return (from_ <= value) && (value <= to_);
711  }

References from_, and to_.

Referenced by v8::internal::Trace::DeferredAction::Mentions().

+ Here is the caller graph for this function:

◆ Empty()

static Interval v8::internal::Interval::Empty ( )
inlinestatic

Definition at line 715 of file jsregexp.h.

715 { return Interval(); }

References Interval().

Referenced by v8::internal::RegExpTree::CaptureRegisters(), and v8::internal::ListCaptureRegisters().

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

◆ from()

int v8::internal::Interval::from ( ) const
inline

Definition at line 713 of file jsregexp.h.

713 { return from_; }

References from_.

Referenced by v8::internal::AddRange(), v8::internal::ActionNode::ClearCaptures(), v8::internal::Trace::FindAffectedRegisters(), v8::internal::BoyerMoorePositionInfo::SetInterval(), and v8::internal::BoyerMooreLookahead::SetInterval().

+ Here is the caller graph for this function:

◆ is_empty()

bool v8::internal::Interval::is_empty ( )
inline

Definition at line 712 of file jsregexp.h.

712 { return from_ == kNone; }

References from_, and kNone.

◆ to()

int v8::internal::Interval::to ( ) const
inline

Definition at line 714 of file jsregexp.h.

714 { return to_; }

References to_.

Referenced by v8::internal::AddRange(), v8::internal::ActionNode::ClearCaptures(), v8::internal::Trace::FindAffectedRegisters(), v8::internal::BoyerMoorePositionInfo::SetInterval(), and v8::internal::BoyerMooreLookahead::SetInterval().

+ Here is the caller graph for this function:

◆ Union()

Interval v8::internal::Interval::Union ( Interval  that)
inline

Definition at line 701 of file jsregexp.h.

701  {
702  if (that.from_ == kNone)
703  return *this;
704  else if (from_ == kNone)
705  return that;
706  else
707  return Interval(Min(from_, that.from_), Max(to_, that.to_));
708  }
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)

References from_, Interval(), kNone, v8::internal::Max(), v8::internal::Min(), and to_.

Referenced by v8::internal::ListCaptureRegisters().

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

Member Data Documentation

◆ from_

int v8::internal::Interval::from_
private

Definition at line 718 of file jsregexp.h.

Referenced by Contains(), from(), is_empty(), and Union().

◆ kNone

const int v8::internal::Interval::kNone = -1
static

Definition at line 716 of file jsregexp.h.

Referenced by is_empty(), and Union().

◆ to_

int v8::internal::Interval::to_
private

Definition at line 719 of file jsregexp.h.

Referenced by Contains(), to(), and Union().


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