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

Classes

struct  ReplacementPart
 

Public Member Functions

 CompiledReplacement (Isolate *isolate)
 
bool Compile (Isolate *isolate, DirectHandle< JSRegExp > regexp, DirectHandle< RegExpData > regexp_data, DirectHandle< String > replacement, int capture_count, int subject_length)
 
void Apply (ReplacementStringBuilder *builder, int match_from, int match_to, int32_t *match)
 
int parts ()
 

Private Types

enum  PartType {
  SUBJECT_PREFIX = 1 , SUBJECT_SUFFIX , SUBJECT_CAPTURE , REPLACEMENT_SUBSTRING ,
  REPLACEMENT_STRING , EMPTY_REPLACEMENT , NUMBER_OF_PART_TYPES
}
 

Private Member Functions

template<typename Char >
bool ParseReplacementPattern (base::Vector< Char > characters, Tagged< FixedArray > capture_name_map, int capture_count, int subject_length)
 

Private Attributes

base::SmallVector< ReplacementPart, kStaticVectorSlots > parts_
 
DirectHandleSmallVector< String, kStaticVectorSlots > replacement_substrings_
 

Detailed Description

Definition at line 85 of file runtime-regexp.cc.

Member Enumeration Documentation

◆ PartType

Enumerator
SUBJECT_PREFIX 
SUBJECT_SUFFIX 
SUBJECT_CAPTURE 
REPLACEMENT_SUBSTRING 
REPLACEMENT_STRING 
EMPTY_REPLACEMENT 
NUMBER_OF_PART_TYPES 

Definition at line 104 of file runtime-regexp.cc.

Constructor & Destructor Documentation

◆ CompiledReplacement()

v8::internal::CompiledReplacement::CompiledReplacement ( Isolate * isolate)
inlineexplicit

Definition at line 87 of file runtime-regexp.cc.

Member Function Documentation

◆ Apply()

void v8::internal::CompiledReplacement::Apply ( ReplacementStringBuilder * builder,
int match_from,
int match_to,
int32_t * match )

Definition at line 402 of file runtime-regexp.cc.

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

◆ Compile()

bool v8::internal::CompiledReplacement::Compile ( Isolate * isolate,
DirectHandle< JSRegExp > regexp,
DirectHandle< RegExpData > regexp_data,
DirectHandle< String > replacement,
int capture_count,
int subject_length )

Definition at line 344 of file runtime-regexp.cc.

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

◆ ParseReplacementPattern()

template<typename Char >
bool v8::internal::CompiledReplacement::ParseReplacementPattern ( base::Vector< Char > characters,
Tagged< FixedArray > capture_name_map,
int capture_count,
int subject_length )
inlineprivate

Definition at line 164 of file runtime-regexp.cc.

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

◆ parts()

int v8::internal::CompiledReplacement::parts ( )
inline

Definition at line 101 of file runtime-regexp.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ parts_

base::SmallVector<ReplacementPart, kStaticVectorSlots> v8::internal::CompiledReplacement::parts_
private

Definition at line 340 of file runtime-regexp.cc.

◆ replacement_substrings_

DirectHandleSmallVector<String, kStaticVectorSlots> v8::internal::CompiledReplacement::replacement_substrings_
private

Definition at line 341 of file runtime-regexp.cc.


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