v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::JSRegExp Class Reference

#include <js-regexp.h>

Inheritance diagram for v8::internal::JSRegExp:
Collaboration diagram for v8::internal::JSRegExp:

Classes

class  BodyDescriptor
 

Public Member Functions

Tagged< Stringsource () const
 
Flags flags () const
 
Tagged< StringEscapedPattern ()
 

Static Public Member Functions

static V8_EXPORT_PRIVATE MaybeDirectHandle< JSRegExpNew (Isolate *isolate, DirectHandle< String > source, Flags flags, uint32_t backtrack_limit=kNoBacktrackLimit)
 
static MaybeDirectHandle< JSRegExpInitialize (DirectHandle< JSRegExp > regexp, DirectHandle< String > source, Flags flags, uint32_t backtrack_limit=kNoBacktrackLimit)
 
static MaybeDirectHandle< JSRegExpInitialize (DirectHandle< JSRegExp > regexp, DirectHandle< String > source, DirectHandle< String > flags_string)
 
static constexpr Flag AsJSRegExpFlag (RegExpFlag f)
 
static constexpr Flags AsJSRegExpFlags (RegExpFlags f)
 
static constexpr RegExpFlags AsRegExpFlags (Flags f)
 
static std::optional< RegExpFlagFlagFromChar (char c)
 
static std::optional< FlagsFlagsFromString (Isolate *isolate, DirectHandle< String > flags)
 
static V8_EXPORT_PRIVATE DirectHandle< StringStringFromFlags (Isolate *isolate, Flags flags)
 
static constexpr int RegistersForCaptureCount (int count)
 
static constexpr int CaptureCountForRegisters (int register_count)
 
static constexpr int Size ()
 

Static Public Attributes

static constexpr int kAtomCaptureCount = 0
 
static constexpr int kAtomRegisterCount = 2
 
static constexpr int kLastIndexOffset = kHeaderSize
 
static constexpr int kInitialLastIndexValue = 0
 
static constexpr int kLastIndexFieldIndex = 0
 
static constexpr int kInObjectFieldCount = 1
 
static constexpr int kSize = kHeaderSize + kInObjectFieldCount * kTaggedSize
 
static constexpr int kExecFunctionDescriptorIndex = 1
 
static constexpr int kSymbolMatchFunctionDescriptorIndex = 15
 
static constexpr int kSymbolMatchAllFunctionDescriptorIndex = 16
 
static constexpr int kSymbolReplaceFunctionDescriptorIndex = 17
 
static constexpr int kSymbolSearchFunctionDescriptorIndex = 18
 
static constexpr int kSymbolSplitFunctionDescriptorIndex = 19
 
static constexpr int kUninitializedValue = -1
 
static constexpr uint32_t kNoBacktrackLimit = 0
 
static constexpr int kTierUpForSubjectLengthValue = 1000
 
static constexpr int kMaxCaptures = 1 << 16
 

Private Types

using FlagsBuffer = base::EmbeddedVector<char, kFlagCount + 1>
 

Static Private Member Functions

static const char * FlagsToString (Flags flags, FlagsBuffer *out_buffer)
 

Friends

class RegExpData
 

Detailed Description

Definition at line 28 of file js-regexp.h.

Member Typedef Documentation

◆ FlagsBuffer

using v8::internal::JSRegExp::FlagsBuffer = base::EmbeddedVector<char, kFlagCount + 1>
private

Definition at line 145 of file js-regexp.h.

Member Function Documentation

◆ AsJSRegExpFlag()

static constexpr Flag v8::internal::JSRegExp::AsJSRegExpFlag ( RegExpFlag f)
inlinestaticconstexpr

Definition at line 51 of file js-regexp.h.

◆ AsJSRegExpFlags()

static constexpr Flags v8::internal::JSRegExp::AsJSRegExpFlags ( RegExpFlags f)
inlinestaticconstexpr

Definition at line 54 of file js-regexp.h.

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

◆ AsRegExpFlags()

static constexpr RegExpFlags v8::internal::JSRegExp::AsRegExpFlags ( Flags f)
inlinestaticconstexpr

Definition at line 57 of file js-regexp.h.

Here is the caller graph for this function:

◆ CaptureCountForRegisters()

static constexpr int v8::internal::JSRegExp::CaptureCountForRegisters ( int register_count)
inlinestaticconstexpr

Definition at line 93 of file js-regexp.h.

Here is the caller graph for this function:

◆ EscapedPattern()

Tagged< String > v8::internal::JSRegExp::EscapedPattern ( )
inline

Definition at line 60 of file js-regexp-inl.h.

Here is the call graph for this function:

◆ FlagFromChar()

static std::optional< RegExpFlag > v8::internal::JSRegExp::FlagFromChar ( char c)
inlinestatic

Definition at line 61 of file js-regexp.h.

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

◆ flags()

JSRegExp::Flags v8::internal::JSRegExp::flags ( ) const
inline

Definition at line 40 of file js-regexp-inl.h.

Here is the call graph for this function:

◆ FlagsFromString()

std::optional< JSRegExp::Flags > v8::internal::JSRegExp::FlagsFromString ( Isolate * isolate,
DirectHandle< String > flags )
static

Definition at line 123 of file js-regexp.cc.

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

◆ FlagsToString()

static const char * v8::internal::JSRegExp::FlagsToString ( Flags flags,
FlagsBuffer * out_buffer )
inlinestaticprivate
Here is the caller graph for this function:

◆ Initialize() [1/2]

MaybeDirectHandle< JSRegExp > v8::internal::JSRegExp::Initialize ( DirectHandle< JSRegExp > regexp,
DirectHandle< String > source,
DirectHandle< String > flags_string )
static

Definition at line 168 of file js-regexp.cc.

Here is the call graph for this function:

◆ Initialize() [2/2]

MaybeDirectHandle< JSRegExp > v8::internal::JSRegExp::Initialize ( DirectHandle< JSRegExp > regexp,
DirectHandle< String > source,
Flags flags,
uint32_t backtrack_limit = kNoBacktrackLimit )
static

Definition at line 328 of file js-regexp.cc.

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

◆ New()

MaybeDirectHandle< JSRegExp > v8::internal::JSRegExp::New ( Isolate * isolate,
DirectHandle< String > source,
Flags flags,
uint32_t backtrack_limit = kNoBacktrackLimit )
static

Definition at line 152 of file js-regexp.cc.

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

◆ RegistersForCaptureCount()

static constexpr int v8::internal::JSRegExp::RegistersForCaptureCount ( int count)
inlinestaticconstexpr

Definition at line 90 of file js-regexp.h.

Here is the caller graph for this function:

◆ Size()

static constexpr int v8::internal::JSRegExp::Size ( )
inlinestaticconstexpr

Definition at line 119 of file js-regexp.h.

Here is the caller graph for this function:

◆ source()

Tagged< String > v8::internal::JSRegExp::source ( ) const
inline

Definition at line 36 of file js-regexp-inl.h.

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

◆ StringFromFlags()

DirectHandle< String > v8::internal::JSRegExp::StringFromFlags ( Isolate * isolate,
Flags flags )
static

Definition at line 144 of file js-regexp.cc.

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

Friends And Related Symbol Documentation

◆ RegExpData

friend class RegExpData
friend

Definition at line 148 of file js-regexp.h.

Member Data Documentation

◆ kAtomCaptureCount

int v8::internal::JSRegExp::kAtomCaptureCount = 0
staticconstexpr

Definition at line 99 of file js-regexp.h.

◆ kAtomRegisterCount

int v8::internal::JSRegExp::kAtomRegisterCount = 2
staticconstexpr

Definition at line 100 of file js-regexp.h.

◆ kExecFunctionDescriptorIndex

int v8::internal::JSRegExp::kExecFunctionDescriptorIndex = 1
staticconstexpr

Definition at line 122 of file js-regexp.h.

◆ kInitialLastIndexValue

int v8::internal::JSRegExp::kInitialLastIndexValue = 0
staticconstexpr

Definition at line 111 of file js-regexp.h.

◆ kInObjectFieldCount

int v8::internal::JSRegExp::kInObjectFieldCount = 1
staticconstexpr

Definition at line 115 of file js-regexp.h.

◆ kLastIndexFieldIndex

int v8::internal::JSRegExp::kLastIndexFieldIndex = 0
staticconstexpr

Definition at line 114 of file js-regexp.h.

◆ kLastIndexOffset

int v8::internal::JSRegExp::kLastIndexOffset = kHeaderSize
staticconstexpr

Definition at line 108 of file js-regexp.h.

◆ kMaxCaptures

int v8::internal::JSRegExp::kMaxCaptures = 1 << 16
staticconstexpr

Definition at line 140 of file js-regexp.h.

◆ kNoBacktrackLimit

uint32_t v8::internal::JSRegExp::kNoBacktrackLimit = 0
staticconstexpr

Definition at line 133 of file js-regexp.h.

◆ kSize

int v8::internal::JSRegExp::kSize = kHeaderSize + kInObjectFieldCount * kTaggedSize
staticconstexpr

Definition at line 118 of file js-regexp.h.

◆ kSymbolMatchAllFunctionDescriptorIndex

int v8::internal::JSRegExp::kSymbolMatchAllFunctionDescriptorIndex = 16
staticconstexpr

Definition at line 124 of file js-regexp.h.

◆ kSymbolMatchFunctionDescriptorIndex

int v8::internal::JSRegExp::kSymbolMatchFunctionDescriptorIndex = 15
staticconstexpr

Definition at line 123 of file js-regexp.h.

◆ kSymbolReplaceFunctionDescriptorIndex

int v8::internal::JSRegExp::kSymbolReplaceFunctionDescriptorIndex = 17
staticconstexpr

Definition at line 125 of file js-regexp.h.

◆ kSymbolSearchFunctionDescriptorIndex

int v8::internal::JSRegExp::kSymbolSearchFunctionDescriptorIndex = 18
staticconstexpr

Definition at line 126 of file js-regexp.h.

◆ kSymbolSplitFunctionDescriptorIndex

int v8::internal::JSRegExp::kSymbolSplitFunctionDescriptorIndex = 19
staticconstexpr

Definition at line 127 of file js-regexp.h.

◆ kTierUpForSubjectLengthValue

int v8::internal::JSRegExp::kTierUpForSubjectLengthValue = 1000
staticconstexpr

Definition at line 137 of file js-regexp.h.

◆ kUninitializedValue

int v8::internal::JSRegExp::kUninitializedValue = -1
staticconstexpr

Definition at line 130 of file js-regexp.h.


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