5#ifndef V8_REGEXP_REGEXP_H_
6#define V8_REGEXP_REGEXP_H_
82 template <
class CharT>
84 const CharT* input,
int input_length,
113 uint32_t result_offsets_vector_length);
124 int32_t* result_offsets_vector,
125 uint32_t result_offsets_vector_length);
130 Address subject_address, int32_t index,
131 int32_t* result_offsets_vector, int32_t result_offsets_vector_length);
270 int last_match_index);
273 int* last_match_index_out);
int32_t * LastSuccessfulMatch() const
RegExpGlobalExecRunner(DirectHandle< RegExpData > regexp_data, DirectHandle< String > subject, Isolate *isolate)
DirectHandle< String > subject_
DirectHandle< RegExpData > regexp_data_
int AdvanceZeroLength(int last_index) const
int32_t * register_array_
RegExpResultVectorScope result_vector_scope_
bool HasException() const
static constexpr int kEntrySize
static bool TryGet(Isolate *isolate, Tagged< String > subject, Tagged< String > pattern, int *number_of_matches_out, int *last_match_index_out)
static constexpr int kNumberOfMatchesIndex
static constexpr int kSubjectIndex
static constexpr int kPatternIndex
static constexpr int kLastMatchIndexIndex
static void TryInsert(Isolate *isolate, Tagged< String > subject, Tagged< String > pattern, int number_of_matches, int last_match_index)
static void Clear(Heap *heap)
static constexpr int kSize
static constexpr int kPatternOffset
@ REGEXP_MULTIPLE_INDICES
@ STRING_SPLIT_SUBSTRINGS
static void Clear(Tagged< FixedArray > cache)
static constexpr int kLastMatchOffset
static void Enter(Isolate *isolate, DirectHandle< String > key_string, DirectHandle< Object > key_pattern, DirectHandle< FixedArray > value_array, DirectHandle< FixedArray > last_match_cache, ResultsCacheType type)
static constexpr int kRegExpResultsCacheSize
static constexpr int kStringOffset
static constexpr int kArrayEntriesPerCacheEntry
static constexpr int kArrayOffset
static Tagged< Object > Lookup(Heap *heap, Tagged< String > key_string, Tagged< Object > key_pattern, Tagged< FixedArray > *last_match_out, ResultsCacheType type)
static constexpr int kInternalRegExpException
static V8_EXPORT_PRIVATE bool CompileForTesting(Isolate *isolate, Zone *zone, RegExpCompileData *input, RegExpFlags flags, DirectHandle< String > pattern, DirectHandle< String > sample_subject, bool is_one_byte)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT std::optional< int > ExperimentalOneshotExec(Isolate *isolate, DirectHandle< JSRegExp > regexp, DirectHandle< String > subject, int index, int32_t *result_offsets_vector, uint32_t result_offsets_vector_length)
static DirectHandle< RegExpMatchInfo > SetLastMatchInfo(Isolate *isolate, DirectHandle< RegExpMatchInfo > last_match_info, DirectHandle< String > subject, int capture_count, int32_t *match)
static V8_EXPORT_PRIVATE intptr_t AtomExecRaw(Isolate *isolate, Address data_address, Address subject_address, int32_t index, int32_t *result_offsets_vector, int32_t result_offsets_vector_length)
static bool VerifySyntax(Zone *zone, uintptr_t stack_limit, const CharT *input, int input_length, RegExpFlags flags, RegExpError *regexp_error_out, const DisallowGarbageCollection &no_gc)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT std::optional< int > Exec(Isolate *isolate, DirectHandle< JSRegExp > regexp, DirectHandle< String > subject, int index, int32_t *result_offsets_vector, uint32_t result_offsets_vector_length)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > Exec_Single(Isolate *isolate, DirectHandle< JSRegExp > regexp, DirectHandle< String > subject, int index, DirectHandle< RegExpMatchInfo > last_match_info)
static V8_EXPORT_PRIVATE void DotPrintForTesting(const char *label, RegExpNode *node)
static constexpr int kInternalRegExpSmallestResult
static bool CanGenerateBytecode()
static DirectHandle< FixedArray > CreateCaptureNameMap(Isolate *isolate, ZoneVector< RegExpCapture * > *named_captures)
static constexpr int kInternalRegExpSuccess
static V8_EXPORT_PRIVATE bool VerifyFlags(RegExpFlags flags)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > ThrowRegExpException(Isolate *isolate, RegExpFlags flags, DirectHandle< String > pattern, RegExpError error)
static bool IsUnmodifiedRegExp(Isolate *isolate, DirectHandle< JSRegExp > regexp)
static const int kRegExpTooLargeToOptimize
static V8_WARN_UNUSED_RESULT bool EnsureFullyCompiled(Isolate *isolate, DirectHandle< RegExpData > re_data, DirectHandle< String > subject)
@ RE_FALLBACK_TO_EXPERIMENTAL
static constexpr int kInternalRegExpRetry
static constexpr int kInternalRegExpFallbackToExperimental
static constexpr int kInternalRegExpFailure
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > Compile(Isolate *isolate, DirectHandle< JSRegExp > re, DirectHandle< String > pattern, RegExpFlags flags, uint32_t backtrack_limit)
refactor address components for immediate indexing make OptimizeMaglevOnNextCall optimize to turbofan instead of maglev filter for tracing turbofan compilation trace turbo cfg trace TurboFan s graph trimmer trace TurboFan s control equivalence trace TurboFan s register allocator trace stack load store counters for optimized code in run fuzzing &&concurrent_recompilation trace_turbo trace_turbo_scheduled trace_turbo_stack_accesses verify TurboFan machine graph of code stubs enable FixedArray bounds checks print TurboFan statistics of wasm compilations maximum cumulative size of bytecode considered for inlining scale factor of bytecode size used to calculate the inlining budget * KB
#define DCHECK_NE(v1, v2)
#define V8_EXPORT_PRIVATE
ZoneVector< RegExpCapture * > * named_captures
DirectHandle< Object > code
RegExpCompilationTarget compilation_target
#define V8_WARN_UNUSED_RESULT